初始化
This commit is contained in:
parent
557827e55b
commit
78d29c53b2
|
@ -0,0 +1,7 @@
|
|||
NODE_ENV = 'test'
|
||||
|
||||
|
||||
|
||||
VITE_APP_BASE_URL='http://test-suyuan.lihaink.cn'
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
NODE_ENV = 'production'
|
||||
|
||||
|
||||
|
||||
VITE_APP_BASE_URL='http://ceshi-suyuan.lihaink.cn'
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
NODE_ENV = 'development'
|
||||
|
||||
# Base API
|
||||
VITE_APP_BASE_URL=''
|
|
@ -0,0 +1,3 @@
|
|||
NODE_ENV = 'production'
|
||||
# Base API
|
||||
VITE_APP_BASE_URL='https://suyuan.lihaink.cn'
|
|
@ -1,3 +0,0 @@
|
|||
NODE_ENV = 'production'
|
||||
# Base API
|
||||
VITE_APP_BASE_URL=''
|
|
@ -3,9 +3,12 @@
|
|||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"serve": "vite",
|
||||
"dev": "vite --mode dev --port 8080",
|
||||
"pro": "vite --mode pro --port 8080",
|
||||
"preview": "vite preview --port 4173",
|
||||
"build": "vite build && node scripts/release.mjs",
|
||||
"build1": "vite build && node scripts/release.mjs && --mode build",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||
},
|
||||
|
|
|
@ -5,9 +5,7 @@ const config = {
|
|||
baseUrl: `${
|
||||
import.meta.env.VITE_APP_BASE_URL
|
||||
}/`, //请求接口域名
|
||||
// baseUrl: 'http://127.0.0.1:30005/',
|
||||
urlPrefix: 'adminapi', //请求默认前缀
|
||||
timeout: 10 * 1000 //请求超时时长
|
||||
}
|
||||
|
||||
export default config
|
||||
|
|
|
@ -10,3 +10,6 @@ const app = createApp(App)
|
|||
app.use(install)
|
||||
app.provide('base_url', configs.baseUrl+configs.urlPrefix);
|
||||
app.mount('#app')
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,40 +1,18 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="650px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item label="土地ID" prop="id">
|
||||
<el-input v-model="formData.id" disabled clearable placeholder="请输入土地ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="土地名称" prop="title">
|
||||
<el-input
|
||||
v-model="formData.title"
|
||||
disabled
|
||||
clearable
|
||||
placeholder="请输入土地名称"
|
||||
/>
|
||||
<el-input v-model="formData.title" disabled clearable placeholder="请输入土地名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定产品" prop="product_id">
|
||||
<el-select
|
||||
v-model="formData.product_id"
|
||||
remote
|
||||
filterable
|
||||
placeholder="请输入产品信息"
|
||||
:remote-method="queryProduct"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.product"
|
||||
:key="index"
|
||||
:label="item.productinfo"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="formData.product_id" remote filterable placeholder="请输入产品信息"
|
||||
:remote-method="queryProduct" :loading="loading">
|
||||
<el-option v-for="(item, index) in optionsData.product" :key="index" :label="item.productinfo"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
@ -1,29 +1,11 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="650px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item v-if="formData.root == 1" label="所属用户" prop="user_id">
|
||||
<el-select
|
||||
v-model="formData.user_id"
|
||||
remote
|
||||
filterable
|
||||
placeholder="请输入用户信息"
|
||||
:remote-method="queryUser"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.user"
|
||||
:key="index"
|
||||
:label="item.userinfo"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="formData.user_id" remote filterable placeholder="请输入用户信息" :remote-method="queryUser"
|
||||
:loading="loading">
|
||||
<el-option v-for="(item, index) in optionsData.user" :key="index" :label="item.userinfo" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="土地名称" prop="title">
|
||||
|
@ -39,123 +21,45 @@
|
|||
<el-input v-model="formData.residual_area" clearable disabled placeholder="请输入剩余面积" />
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item
|
||||
label="省"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="province_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.province_code"
|
||||
placeholder="请选择省"
|
||||
clearable
|
||||
@change="province_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.provinceOptions"
|
||||
:key="index"
|
||||
:label="item.province_name"
|
||||
:value="item.province_code"
|
||||
></el-option>
|
||||
<el-form-item label="省" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="province_code">
|
||||
<el-select v-model="formData.province_code" placeholder="请选择省" clearable @change="province_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.provinceOptions" :key="index" :label="item.province_name"
|
||||
:value="item.province_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="市"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="city_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.city_code"
|
||||
placeholder="请选择市"
|
||||
clearable
|
||||
@change="city_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.cityOptions"
|
||||
:key="index"
|
||||
:label="item.city_name"
|
||||
:value="item.city_code"
|
||||
></el-option>
|
||||
<el-form-item label="市" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="city_code">
|
||||
<el-select v-model="formData.city_code" placeholder="请选择市" clearable @change="city_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.cityOptions" :key="index" :label="item.city_name"
|
||||
:value="item.city_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="区"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="county_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.county_code"
|
||||
placeholder="请选择区"
|
||||
clearable
|
||||
@change="area_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.areaOptions"
|
||||
:key="index"
|
||||
:label="item.county_name"
|
||||
:value="item.county_code"
|
||||
></el-option>
|
||||
<el-form-item label="区" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="county_code">
|
||||
<el-select v-model="formData.county_code" placeholder="请选择区" clearable @change="area_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.areaOptions" :key="index" :label="item.county_name"
|
||||
:value="item.county_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="镇"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="town_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.town_code"
|
||||
placeholder="请选择镇"
|
||||
clearable
|
||||
@change="street_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.streetOptions"
|
||||
:key="index"
|
||||
:label="item.town_name"
|
||||
:value="item.town_code"
|
||||
></el-option>
|
||||
<el-form-item label="镇" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="town_code">
|
||||
<el-select v-model="formData.town_code" placeholder="请选择镇" clearable @change="street_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.streetOptions" :key="index" :label="item.town_name"
|
||||
:value="item.town_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="村"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="village_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.village_code"
|
||||
placeholder="请选择村"
|
||||
clearable
|
||||
@change="village_change"
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.villageOptions"
|
||||
:key="index"
|
||||
:label="item.village_name"
|
||||
:value="item.village_code"
|
||||
></el-option>
|
||||
<el-form-item label="村" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="village_code">
|
||||
<el-select v-model="formData.village_code" placeholder="请选择村" clearable @change="village_change"
|
||||
:style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.villageOptions" :key="index" :label="item.village_name"
|
||||
:value="item.village_code"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="队"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"
|
||||
prop="group_code"
|
||||
>
|
||||
<el-select
|
||||
v-model="formData.group_code"
|
||||
placeholder="请选择队"
|
||||
clearable
|
||||
:style="{ width: '100%' }"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in datas.brigadeOptions"
|
||||
:key="index"
|
||||
:label="item.group_name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-form-item label="队" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" prop="group_code">
|
||||
<el-select v-model="formData.group_code" placeholder="请选择队" clearable :style="{ width: '100%' }">
|
||||
<el-option v-for="(item, index) in datas.brigadeOptions" :key="index" :label="item.group_name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="土地负责人" prop="master_name">
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="用户ID" prop="user_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.user_id" clearable placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
|
@ -32,11 +28,7 @@
|
|||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.land/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
<el-button v-perms="['land.land/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
|
@ -56,64 +48,36 @@
|
|||
<el-table-column label="负责人电话" prop="master_phone" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="400" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['land.land/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
<el-button v-perms="['land.land/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.land/bind']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleBind(row)"
|
||||
>
|
||||
<el-button v-perms="['land.land/bind']" type="primary" link @click="handleBind(row)">
|
||||
绑定产品
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.product/lists']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
<el-button v-perms="['land.product/lists']" type="primary" link>
|
||||
<router-link :to="{
|
||||
path: getRoutePath('land.product/lists'),
|
||||
query: {
|
||||
land_id: row.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
}">
|
||||
产品管理
|
||||
</router-link>
|
||||
</el-button>
|
||||
<el-button type="primary" link @click="handleDetail(row)"
|
||||
>
|
||||
<el-button type="primary" link @click="handleDetail(row)">
|
||||
土地图片
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.land_plant/lists']"
|
||||
type="primary"
|
||||
link
|
||||
>
|
||||
<router-link
|
||||
:to="{
|
||||
<el-button v-perms="['land.land_plant/lists']" type="primary" link>
|
||||
<router-link :to="{
|
||||
path: getRoutePath('land.land_plant/lists'),
|
||||
query: {
|
||||
land_id: row.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
}">
|
||||
种植信息
|
||||
</router-link>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.land/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button v-perms="['land.land/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -130,17 +94,8 @@
|
|||
|
||||
<el-dialog v-model="dialogPicVisible" title="土地图片" center>
|
||||
<div style="display: inline-block; margin: 12px" v-for="img in detailData.picData" :key="img">
|
||||
<el-image
|
||||
style="width: 200px; height: 200px"
|
||||
:src="img"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="5"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="detailData.picData"
|
||||
:initial-index="4"
|
||||
fit="cover"
|
||||
center
|
||||
/>
|
||||
<el-image style="width: 200px; height: 200px" :src="img" :zoom-rate="1.2" :max-scale="5" :min-scale="0.2"
|
||||
:preview-src-list="detailData.picData" :initial-index="4" fit="cover" center />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -155,6 +110,7 @@ import feedback from '@/utils/feedback'
|
|||
import EditPopup from './edit.vue'
|
||||
import BindPopup from './bind.vue'
|
||||
|
||||
|
||||
const { query } = useRoute()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const bindRef = shallowRef<InstanceType<typeof BindPopup>>()
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="650px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="170px" :rules="formRules">
|
||||
<el-form-item label="土壤最高温度" prop="soil_temp_max">
|
||||
<el-input v-model="formData.soil_temp_max" clearable placeholder="请输入土壤最高温度" />
|
||||
|
|
|
@ -81,6 +81,7 @@ const handleAdd = async () => {
|
|||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
showEdit.value = true
|
||||
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
|
|
|
@ -1,42 +1,18 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="650px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item label="产品ID" prop="id">
|
||||
<el-input v-model="formData.id" disabled clearable placeholder="请输入产品ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
disabled
|
||||
clearable
|
||||
placeholder="请输入产品名称"
|
||||
/>
|
||||
<el-input v-model="formData.name" disabled clearable placeholder="请输入产品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定设备" prop="device_id">
|
||||
<el-select
|
||||
v-model="formData.device_id"
|
||||
filterable
|
||||
multiple
|
||||
remote
|
||||
reserve-keyword
|
||||
placeholder="请输入设备信息"
|
||||
:remote-method="queryDevice"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.device"
|
||||
:key="index"
|
||||
:label="item.deviceinfo"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="formData.device_id" filterable multiple remote reserve-keyword placeholder="请输入设备信息"
|
||||
:remote-method="queryDevice" :loading="loading">
|
||||
<el-option v-for="(item, index) in optionsData.device" :key="index" :label="item.deviceinfo"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
:title="popupTitle"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="产品名称" prop="name">
|
||||
<el-input v-model="formData.name" clearable placeholder="请输入产品名称" />
|
||||
|
@ -19,21 +12,10 @@
|
|||
<el-input v-model="formData.desc" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品图" prop="image">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:accept="acceptFileTypes"
|
||||
v-model="formData.image"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="action"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar"
|
||||
>
|
||||
<img
|
||||
v-if="formData.image"
|
||||
:src="formData.image"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-upload class="avatar-uploader" :accept="acceptFileTypes" v-model="formData.image" :data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }" :action="action" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccessAvatar">
|
||||
<img v-if="formData.image" :src="formData.image" class="avatar" />
|
||||
<div v-else class="avatar-uploader-icon">
|
||||
<el-icon>
|
||||
<Plus />
|
||||
|
@ -44,39 +26,18 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="formData.root == 1" label="所属用户" prop="user_id">
|
||||
<el-select
|
||||
v-model="formData.user_id"
|
||||
remote
|
||||
filterable
|
||||
placeholder="请输入用户信息"
|
||||
:remote-method="queryUser"
|
||||
@change="selectedUser"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.user"
|
||||
:key="index"
|
||||
:label="item.userinfo"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="formData.user_id" remote filterable placeholder="请输入用户信息" :remote-method="queryUser"
|
||||
@change="selectedUser" :loading="loading">
|
||||
<el-option v-for="(item, index) in optionsData.user" :key="index" :label="item.userinfo"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="所属土地" prop="land_id">
|
||||
<el-select
|
||||
v-model="formData.land_id"
|
||||
remote
|
||||
filterable
|
||||
placeholder="请输入土地信息"
|
||||
:remote-method="queryLand"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in optionsData.land"
|
||||
:key="index"
|
||||
:label="item.landinfo"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-select v-model="formData.land_id" remote filterable placeholder="请输入土地信息" :remote-method="queryLand"
|
||||
:loading="loading">
|
||||
<el-option v-for="(item, index) in optionsData.land" :key="index" :label="item.landinfo"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -86,7 +47,8 @@
|
|||
|
||||
<script lang="ts" setup name="productEdit">
|
||||
import { useDictOptions } from '@/hooks/useDictOptions'
|
||||
import { type FormInstance,
|
||||
import {
|
||||
type FormInstance,
|
||||
type UploadProps,
|
||||
ElMessage,
|
||||
} from 'element-plus'
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
class="mb-[-16px]"
|
||||
:model="queryParams"
|
||||
inline
|
||||
>
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="用户ID" prop="user_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.user_id" clearable placeholder="请输入用户ID" />
|
||||
</el-form-item>
|
||||
|
@ -21,19 +17,12 @@
|
|||
<el-form-item label="产品状态" prop="status">
|
||||
<el-select class="w-[280px]" v-model="queryParams.status" clearable placeholder="请选择产品状态">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option
|
||||
v-for="(item, index) in dictData.product_status"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="(item, index) in dictData.product_status" :key="index" :label="item.name"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="create_time">
|
||||
<daterange-picker
|
||||
v-model:startTime="queryParams.start_time"
|
||||
v-model:endTime="queryParams.end_time"
|
||||
/>
|
||||
<daterange-picker v-model:startTime="queryParams.start_time" v-model:endTime="queryParams.end_time" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
|
@ -49,11 +38,7 @@
|
|||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.product/delete']"
|
||||
:disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)"
|
||||
>
|
||||
<el-button v-perms="['land.product/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="mt-4">
|
||||
|
@ -86,40 +71,23 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['land.product/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
<el-button v-perms="['land.product/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.product/bind']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleBind(row)"
|
||||
>
|
||||
<el-button v-perms="['land.product/bind']" type="primary" link @click="handleBind(row)">
|
||||
绑定设备
|
||||
</el-button>
|
||||
<el-button v-perms="['device.device/lists']" type="primary" link>
|
||||
<router-link
|
||||
:to="{
|
||||
<router-link :to="{
|
||||
path: getRoutePath('device.device/lists'),
|
||||
query: {
|
||||
product_id: row.id
|
||||
}
|
||||
}"
|
||||
>
|
||||
}">
|
||||
设备管理
|
||||
</router-link>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['land.product/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button v-perms="['land.product/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue