diff --git a/src/api/unit/unit.js b/src/api/unit/unit.js new file mode 100644 index 00000000..b8274485 --- /dev/null +++ b/src/api/unit/unit.js @@ -0,0 +1,46 @@ +import request from '@/utils/request'; + +// 查询单位列表 +export function queryUnitList(query) { + return request({ + url: '/smart-site/unit/queryUnitList', + method: 'get', + params: query + }) +} + +// 单位-新增 +export function addUnit(data) { + return request({ + url: '/smart-site/unit/addUnit', + method: 'post', + data + }) +} + +// 单位-修改 +export function editUnit(data) { + return request({ + url: '/smart-site/unit/editUnit', + method: 'post', + data + }) +} + +// 单位-删除 +export function delUnit(data) { + return request({ + url: '/smart-site/unit/delUnit', + method: 'post', + data + }) +} + +// 单位详情 +export function detailUnit(query) { + return request({ + url: '/smart-site/unit/detailUnit', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/device/videoDevice/index.vue b/src/views/device/videoDevice/index.vue index 3566e4c6..919647ca 100644 --- a/src/views/device/videoDevice/index.vue +++ b/src/views/device/videoDevice/index.vue @@ -111,29 +111,12 @@ export default { this.loading = false; }); }, - // 取消按钮 - cancel() { - this.open = false; - this.reset(); - }, closeDialog() { this.isflag = false; }, showColose() { this.isflag = false; }, - // 表单重置 - reset() { - this.form = { - postId: undefined, - postCode: undefined, - postName: undefined, - postSort: 0, - status: "0", - remark: undefined - }; - this.resetForm("form"); - }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -146,7 +129,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.postId) + this.ids = selection.map(item => item.id) this.single = selection.length != 1 this.multiple = !selection.length }, @@ -163,26 +146,6 @@ export default { this.row = row; this.isflag = true; }, - /** 提交按钮 */ - /* submitForm: function () { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.postId != undefined) { - updatePost(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); - } else { - addPost(this.form).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); - } - } - }); - }, */ /** 删除按钮操作 */ handleDelete(row) { const id = row.id || this.ids; diff --git a/src/views/unit/unitMge/index.vue b/src/views/unit/unitMge/index.vue new file mode 100644 index 00000000..3a09bcd7 --- /dev/null +++ b/src/views/unit/unitMge/index.vue @@ -0,0 +1,171 @@ + + + \ No newline at end of file diff --git a/src/views/unit/unitMge/prop/unitpop.vue b/src/views/unit/unitMge/prop/unitpop.vue new file mode 100644 index 00000000..c0d8e360 --- /dev/null +++ b/src/views/unit/unitMge/prop/unitpop.vue @@ -0,0 +1,234 @@ + + +