diff --git a/src/api/eam/eam.js b/src/api/eam/eam.js
index 37b880a..784ffd9 100644
--- a/src/api/eam/eam.js
+++ b/src/api/eam/eam.js
@@ -12,3 +12,12 @@ export const eamAdminDelete = data => createAPI(`api/pms/eam/eamAdminDelete`,'po
export const initAdminLevel = data => createAPI(`api/pms/eam/initAdminLevel`,'post',data)
//获取所有部门
export const getEmpyDeptList = data => createAPI(`api/pms/eam/getEmpyDeptList`,'post',data)
+
+//---------------设备分类-------------------
+export const eamFamilySearch = data => createAPI(`api/pms/eam/eamFamilySearch`,'post',data)
+
+export const eamFamilySave = data => createAPI(`api/pms/eam/eamFamilySave`,'post',data)
+
+export const eamFamilyEdit = data => createAPI(`api/pms/eam/eamFamilyEdit`,'post',data)
+
+export const eamFamilyDelete = data => createAPI(`api/pms/eam/eamFamilyDelete`,'post',data)
diff --git a/src/views/modules/eam/eamAdmin.vue b/src/views/modules/eam/eamAdmin.vue
index c279b93..6597f37 100644
--- a/src/views/modules/eam/eamAdmin.vue
+++ b/src/views/modules/eam/eamAdmin.vue
@@ -1,13 +1,13 @@
-
+
-
+
@@ -17,7 +17,7 @@
-
+
查询
新增
@@ -58,8 +58,8 @@
width="100"
label="操作">
- 修改
- 删除
+ 修改
+ 删除
@@ -72,7 +72,7 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
-
+
@@ -81,7 +81,7 @@
-
+
@@ -91,7 +91,7 @@
-
@@ -109,11 +109,10 @@
-
-
+
@@ -122,6 +121,10 @@
+
+ 保存
+ 关闭
+
@@ -157,6 +160,7 @@
modalFlag:false,
modalDisableFlag:false,
modalData:{
+ flag:'',
site: this.$store.state.user.site,
adminID:'',
adminName:'',
@@ -393,6 +397,7 @@
},
addModal(){
this.modalData={
+ flag:'1',
site: this.$store.state.user.site,
adminID:'',
adminName:'',
@@ -411,14 +416,133 @@
this.levelList=data.rows
})
getEmpyDeptList(inData).then(({data}) => {
- this.levelList=data.rows
+ this.departmentList=data.rows
})
+ this.modalDisableFlag=false;
+ this.modalFlag=true;
+ },
+ updateModal(row){
+ this.modalData={
+ flag:'2',
+ site: row.site,
+ adminID:row.adminID,
+ adminName:row.adminName,
+ active:row.active,
+ department:row.department,
+ phone:row.phone,
+ tel:row.tel,
+ email:row.email,
+ levelID:row.levelID,
+ mesUser:row.mesUser,
+ };
+ let inData={
+ site:this.$store.state.user.site,
+ }
+ initAdminLevel(inData).then(({data}) => {
+ this.levelList=data.rows
+ })
+ getEmpyDeptList(inData).then(({data}) => {
+ this.departmentList=data.rows
+ })
+ this.modalDisableFlag=true;
this.modalFlag=true;
},
// 删除
- deleteAdmin (id) {
+ deleteAdmin (row) {
+ this.$confirm(`是否删除这个机修人员?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
- }
+ }).then(() => {
+ eamAdminDelete(row).then(({data}) => {
+ if (data && data.code === '0') {
+ this.getDataList()
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }).catch(() => {
+ })
+ },
+ saveData(){
+ if (this.modalData.adminID == '' || this.modalData.adminID == null) {
+ this.$alert('请输入机修人员编码!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.modalData.adminName == '' || this.modalData.adminName == null) {
+ this.$alert('请输入机修人员姓名!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.modalData.active == '' || this.modalData.active == null) {
+ this.$alert('选择是否在用!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.modalData.department == '' || this.modalData.department == null) {
+ this.$alert('请选择部门!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.modalData.levelID == '' || this.modalData.levelID == null) {
+ this.$alert('请选择人员等级!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if(this.modalData.flag=='1'){
+ eamAdminSave(this.modalData).then(({data}) => {
+ if (data && data.code === '0') {
+ this.getDataList()
+ this.modalFlag=false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }else {
+ eamAdminEdit(this.modalData).then(({data}) => {
+ if (data && data.code === '0') {
+ this.getDataList()
+ this.modalFlag=false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
+ },
}
}
diff --git a/src/views/modules/eam/eamFamily.vue b/src/views/modules/eam/eamFamily.vue
new file mode 100644
index 0000000..7b79b30
--- /dev/null
+++ b/src/views/modules/eam/eamFamily.vue
@@ -0,0 +1,355 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
diff --git a/src/views/modules/eam/eamadmin-add-or-update.vue b/src/views/modules/eam/eamadmin-add-or-update.vue
deleted file mode 100644
index 86bb798..0000000
--- a/src/views/modules/eam/eamadmin-add-or-update.vue
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-