diff --git a/src/api/perception-devices/equipment-manage.js b/src/api/perception-devices/equipment-manage.js
new file mode 100644
index 00000000..1f857740
--- /dev/null
+++ b/src/api/perception-devices/equipment-manage.js
@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+/* 感知设备 ---- 设备管理接口 */
+
+// 列表接口
+export const getEquipmentManageListAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 新增接口
+export const addEquipmentManageDataAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 修改接口
+export const editEquipmentManageDataAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 详情接口
+export const getEquipmentManageDetailsAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 删除接口
+export const deleteEquipmentManageDataAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 详情内列表接口
+export const getEquipmentManageListInDetailsAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 详情内新增接口
+export const addEquipmentManageDataInDetailsAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 详情内修改接口
+export const editEquipmentManageDataInDetailsAPI = (data) => {
+ return request.post('/xxx', data)
+}
+// 详情内删除接口
+export const deleteEquipmentManageDataInDetailsAPI = (data) => {
+ return request.post('/xxx', data)
+}
diff --git a/src/views/perception-devices/equipment-manage/components/add-edit-form.vue b/src/views/perception-devices/equipment-manage/components/add-edit-form.vue
index 0528b887..310ab9c3 100644
--- a/src/views/perception-devices/equipment-manage/components/add-edit-form.vue
+++ b/src/views/perception-devices/equipment-manage/components/add-edit-form.vue
@@ -2,70 +2,50 @@
-
-
+
+
+
-
-
-
-
+
+
-
-
-
-
+
+
-
-
+
+
-
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
-
+
- 取消
+ 取消
保存
@@ -99,59 +79,80 @@ export default {
return {
// 新增或修改接口
addOrEditForm: {
- projectName: '', // 项目名称
- ownerUnit: '', // 业主单位
- planStartTime: '', //计划开工日期
- planEndTime: '', // 计划竣工日期
- address: '', // 项目地址
- projectAmount: '', // 项目金额
- projectManager: '', // 项目负责任人
- projectScale: '', // 工程规格
+ projectName: '', // 所属工程
+ deviceType: '', // 设备类型
+ deviceName: '', //设备名称
+ deviceCode: '', // 设备编码
+ casDeviceCode: '', // 级联编码
+ status: '', // 设备状态
+ wifi: '', // 设备信号
+ area: '', // 监测区域
+ bd: '', // 所属边
},
addOrEditFormRef: {
projectName: [
{
required: true,
- message: '项目名称',
- trigger: 'blur',
- },
- {
- min: 1,
- max: 30,
- message: '长度在 1 到 30 个字符',
- trigger: 'blur',
- },
- ],
- ownerUnit: [
- {
- required: true,
- message: '请输入业主单位',
- trigger: 'blur',
- },
- {
- min: 1,
- max: 20,
- message: '长度在 1 到 20 个字符',
- trigger: 'blur',
- },
- ],
- planStartTime: [
- {
- required: true,
- message: '请选择计划开工日期',
+ message: '请选择所属工程',
trigger: 'change',
},
- { validator: validatePlanStartTime, trigger: 'change' },
],
- planEndTime: [
+ deviceType: [
{
required: true,
- message: '请选择计划竣工日期',
+ message: '请选择设备类型',
+ trigger: 'change',
+ },
+ ],
+ deviceName: [
+ {
+ required: true,
+ message: '请输入设备名称',
+ trigger: 'blur',
+ },
+ ],
+
+ deviceCode: [
+ {
+ required: true,
+ message: '请输入设备编码',
+ trigger: 'blur',
+ },
+ ],
+ status: [
+ {
+ required: true,
+ message: '请选择设备状态',
+ trigger: 'change',
+ },
+ ],
+ area: [
+ {
+ required: true,
+ message: '请选择监测区域',
trigger: 'change',
},
- { validator: validatePlanEndTime, trigger: 'change' },
],
},
+
+ // 所属工程数据源
+ projectList: [
+ { id: 1, label: '工程1' },
+ { id: 2, label: '工程2' },
+ { id: 3, label: '工程3' },
+ ],
+ // 设备类型数据源
+ typeList: [
+ { id: 1, label: '测试1' },
+ { id: 2, label: '测试2' },
+ { id: 3, label: '测试3' },
+ ],
+ // 设备类型数据源
+ areaList: [
+ { id: 1, label: '区域1' },
+ { id: 2, label: '区域2' },
+ { id: 3, label: '区域3' },
+ ],
}
},
@@ -173,6 +174,11 @@ export default {
}
})
},
+
+ // 取消按钮
+ onCancel() {
+ this.$emit('onCloseDialog', false)
+ },
},
async mounted() {},
watch: {},
diff --git a/src/views/perception-devices/equipment-manage/components/config.js b/src/views/perception-devices/equipment-manage/components/config.js
new file mode 100644
index 00000000..0c665469
--- /dev/null
+++ b/src/views/perception-devices/equipment-manage/components/config.js
@@ -0,0 +1,19 @@
+export const formLabel = [{ f_label: '搜索关键词', f_model: 'proName', f_type: 'ipt', isShow: false }]
+export const columnsList = [
+ { t_props: 'projectName', t_label: '监测名称' },
+ { t_props: 'address', t_label: '监测值' },
+ { t_props: 'planStartTime', t_label: '单位' },
+ { t_props: 'planEndTime', t_label: '监测时间' },
+ { t_props: 'ownerUnit', t_label: '变化值' },
+ { t_props: 'projectStatus', t_label: '最大阈值' },
+ { t_props: 'auditStatus', t_label: '最小阈值' },
+ { t_props: 'auditStatus', t_label: '采集值类型' },
+ { t_props: 'auditStatus', t_label: '设备级联编码' },
+ { t_props: 'auditStatus', t_label: '操作' },
+]
+
+export const dialogConfig = {
+ outerWidth: '50%',
+ outerTitle: '设备新增',
+ outerVisible: false,
+}
diff --git a/src/views/perception-devices/equipment-manage/components/project-details.vue b/src/views/perception-devices/equipment-manage/components/project-details.vue
index 3f0c08cf..39c48429 100644
--- a/src/views/perception-devices/equipment-manage/components/project-details.vue
+++ b/src/views/perception-devices/equipment-manage/components/project-details.vue
@@ -1,31 +1,162 @@
-
-
-
-
- 苏州市
-
-
- 江苏省苏州市吴中区吴中大道 1188 号
- 苏州市
- 项目负责人
- 项目规模
-
+
+
+
+
+
+ 新增
+
+
+
+
+ 修改
+
+
+ 删除
+
+
+
+
+ 状态
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
diff --git a/src/views/perception-devices/equipment-manage/index.vue b/src/views/perception-devices/equipment-manage/index.vue
index 195df3cd..bbf9b1ed 100644
--- a/src/views/perception-devices/equipment-manage/index.vue
+++ b/src/views/perception-devices/equipment-manage/index.vue
@@ -1,24 +1,21 @@
-
+
导出
- 新增
+
+ 新增
+
-
+
修改
-
+
详情
-
+
删除
@@ -28,9 +25,12 @@
+
+
+
@@ -64,19 +64,31 @@ export default {
handleExport() {
console.log('导出')
},
- handleAddData() {
- console.log('新增')
- this.dialogType = 1
- this.dialogConfig.outerTitle = '设备新增'
+
+ handleAddOrOther(data, type) {
+ const titleType = {
+ 1: '设备新增',
+ 2: '设备修改',
+ 3: '设备详情列表',
+ }
+ this.dialogType = type
+ this.dialogConfig.outerTitle = titleType[type]
this.dialogConfig.outerVisible = true
+
+ if (type === 3) {
+ this.dialogConfig.outerWidth = '90%'
+ } else {
+ this.dialogConfig.outerWidth = '50%'
+ }
},
- handleDetails() {},
- handleEditData() {
- this.dialogType = 2
- this.dialogConfig.outerTitle = '设备修改'
- this.dialogConfig.outerVisible = true
+ handleDeleteData(data) {
+ this.$modal
+ .confirm(`是否确认删除该条数据`)
+ .then(async () => {
+ this.$refs.tableRef.getTableList()
+ })
+ .catch(() => {})
},
- handleDeleteData() {},
/** 关闭外侧弹框 */
closeDialogOuter() {
this.dialogConfig.outerVisible = false