库管员,维修员配置
This commit is contained in:
parent
acc96ac903
commit
dcbad6826e
|
|
@ -0,0 +1,28 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//组织人员树类型管理
|
||||||
|
export function getMatConfigList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/deptUserTree',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//组织人员树类型管理列表
|
||||||
|
export function getListByMatConfig(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type_keeper/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 物资类型管理--新增
|
||||||
|
export function bindRepair(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/ma_type_config/updateMaTypeBindInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
|
|
||||||
<!-- 图片查看弹窗 -->
|
<!-- 图片查看弹窗 -->
|
||||||
<el-dialog :visible.sync="dialogVisible" width="600px" height="600px" >
|
<el-dialog :visible.sync="dialogVisible" width="600px" height="600px" >
|
||||||
<img width="100%" height="100%" :src="dialogImageUrl" />
|
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,6 @@
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:tree-props="{ children: 'children' }"
|
:tree-props="{ children: 'children' }"
|
||||||
border
|
border
|
||||||
@select="selectTr"
|
|
||||||
@select-all="handleSelectAll"
|
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -179,7 +177,7 @@
|
||||||
<!-- <div v-else style="color: red;"></div> -->
|
<!-- <div v-else style="color: red;"></div> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -187,12 +185,20 @@
|
||||||
icon="el-icon-user-solid"
|
icon="el-icon-user-solid"
|
||||||
@click="handleUpdateKeep(scope.row)"
|
@click="handleUpdateKeep(scope.row)"
|
||||||
v-hasPermi="['machinery:type:config']"
|
v-hasPermi="['machinery:type:config']"
|
||||||
|
v-if="scope.row.keeperUserName != null"
|
||||||
>
|
>
|
||||||
库管解绑
|
库管解绑
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -220,7 +226,7 @@ import {
|
||||||
getMatConfigList,
|
getMatConfigList,
|
||||||
getListByMatConfig,
|
getListByMatConfig,
|
||||||
bindRepair,
|
bindRepair,
|
||||||
} from "@/api/ma/typeConfig";
|
} from "@/api/ma/typeConfigKeeper";
|
||||||
import { getUserList } from "@/api/basic/basic";
|
import { getUserList } from "@/api/basic/basic";
|
||||||
import { getInfo } from "@/api/login";
|
import { getInfo } from "@/api/login";
|
||||||
import { downloadFile } from "@/utils/download";
|
import { downloadFile } from "@/utils/download";
|
||||||
|
|
@ -343,65 +349,6 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
keeperDataChange(e) {
|
|
||||||
this.keeperDataRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataPro = null;
|
|
||||||
this.form.keeperDataMat = null;
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperProApi({
|
|
||||||
houseId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperProRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
keeperDataProChange(e) {
|
|
||||||
this.keeperProRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataMat = null;
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperMatApi({
|
|
||||||
typeId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperMatRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
keeperDataMatChange(e) {
|
|
||||||
this.keeperMatRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperNameApi({
|
|
||||||
typeId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperNameRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 查询物资类型 */
|
/** 查询物资类型 */
|
||||||
async getKeeperDataList(data) {
|
async getKeeperDataList(data) {
|
||||||
|
|
@ -453,13 +400,8 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getListByMatConfig(this.queryParams).then((response) => {
|
getListByMatConfig(this.queryParams).then((response) => {
|
||||||
this.typeList = response.data;
|
this.total = response.total;
|
||||||
// response.data.forEach(item=>{
|
this.typeList = response.rows;
|
||||||
// if(item.children.length!=0){
|
|
||||||
// this.totalTemp=this.totalTemp+item.children.length
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// this.totalTemp = this.totalTemp + response.data.length
|
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|
@ -513,65 +455,65 @@ export default {
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.selectionRows = selection,
|
// this.selectionRows = selection,
|
||||||
this.ids = selection.map((item) =>item.typeId);
|
this.ids = selection.map((item) =>item.typeId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
console.log('ids---------',this.ids)
|
console.log('ids---------',this.ids)
|
||||||
},
|
},
|
||||||
handleSelect(selection, row) {
|
// handleSelect(selection, row) {
|
||||||
this.toggleSelection(selection, row);
|
// this.toggleSelection(selection, row);
|
||||||
},
|
// },
|
||||||
handleSelectAll(selection) {
|
// handleSelectAll(selection) {
|
||||||
this.isAllSelect = !this.isAllSelect;
|
// this.isAllSelect = !this.isAllSelect;
|
||||||
let data = this.typeList;
|
// let data = this.typeList;
|
||||||
this.toggleSelect(data,this.isAllSelect,'all');
|
// this.toggleSelect(data,this.isAllSelect,'all');
|
||||||
|
|
||||||
},
|
// },
|
||||||
|
|
||||||
//选择某行
|
// //选择某行
|
||||||
selectTr(selection,row){
|
// selectTr(selection,row){
|
||||||
this.$set(row,'isChecked',!row.isChecked);
|
// this.$set(row,'isChecked',!row.isChecked);
|
||||||
this.$nextTick(()=>{
|
// this.$nextTick(()=>{
|
||||||
this.isAllSelect = row.isChecked;
|
// this.isAllSelect = row.isChecked;
|
||||||
this.toggleSelect(row,row.isChecked,'tr');
|
// this.toggleSelect(row,row.isChecked,'tr');
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
|
||||||
//递归子级
|
// //递归子级
|
||||||
toggleSelect(data,flag,type){
|
// toggleSelect(data,flag,type){
|
||||||
if(type === 'all'){
|
// if(type === 'all'){
|
||||||
if(data.length > 0){
|
// if(data.length > 0){
|
||||||
data.forEach(item=>{
|
// data.forEach(item=>{
|
||||||
this.toggleSelection(item, flag);
|
// this.toggleSelection(item, flag);
|
||||||
if(item.children && item.children.length > 0){
|
// if(item.children && item.children.length > 0){
|
||||||
this.toggleSelect(item.children,flag,type)
|
// this.toggleSelect(item.children,flag,type)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}else {
|
// }else {
|
||||||
if(data.children && data.children.length > 0){
|
// if(data.children && data.children.length > 0){
|
||||||
data.children.forEach(item =>{
|
// data.children.forEach(item =>{
|
||||||
item.isChecked = !item.isChecked;
|
// item.isChecked = !item.isChecked;
|
||||||
this.$refs.multipleTable.toggleRowSelection(item, flag);
|
// this.$refs.multipleTable.toggleRowSelection(item, flag);
|
||||||
this.toggleSelect(item,flag,type);
|
// this.toggleSelect(item,flag,type);
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
|
|
||||||
//改变选中
|
// //改变选中
|
||||||
toggleSelection(row, flag) {
|
// toggleSelection(row, flag) {
|
||||||
this.$set(row,'isChecked',flag);
|
// this.$set(row,'isChecked',flag);
|
||||||
this.$nextTick(()=>{
|
// this.$nextTick(()=>{
|
||||||
if (flag) {
|
// if (flag) {
|
||||||
this.$refs.multipleTable.toggleRowSelection(row, flag);
|
// this.$refs.multipleTable.toggleRowSelection(row, flag);
|
||||||
} else {
|
// } else {
|
||||||
this.$refs.multipleTable.clearSelection();
|
// this.$refs.multipleTable.clearSelection();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
|
|
||||||
|
|
||||||
/** 绑定按钮操作 */
|
/** 绑定按钮操作 */
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@
|
||||||
<!-- <div v-else style="color: red;"></div> -->
|
<!-- <div v-else style="color: red;"></div> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="130">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -187,6 +187,7 @@
|
||||||
icon="el-icon-user-solid"
|
icon="el-icon-user-solid"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['machinery:type:edit']"
|
v-hasPermi="['machinery:type:edit']"
|
||||||
|
v-if="scope.row.repairUserName != null"
|
||||||
>
|
>
|
||||||
维修解绑
|
维修解绑
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -219,7 +220,7 @@ import {
|
||||||
getMatConfigList,
|
getMatConfigList,
|
||||||
getListByMatConfig,
|
getListByMatConfig,
|
||||||
bindRepair,
|
bindRepair,
|
||||||
} from "@/api/ma/typeConfig";
|
} from "@/api/ma/typeConfigRepair";
|
||||||
import { getUserList } from "@/api/basic/basic";
|
import { getUserList } from "@/api/basic/basic";
|
||||||
export default {
|
export default {
|
||||||
name: "typeConfig",
|
name: "typeConfig",
|
||||||
|
|
@ -339,66 +340,6 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
keeperDataChange(e) {
|
|
||||||
this.keeperDataRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataPro = null;
|
|
||||||
this.form.keeperDataMat = null;
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperProApi({
|
|
||||||
houseId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperProRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
keeperDataProChange(e) {
|
|
||||||
this.keeperProRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataMat = null;
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperMatApi({
|
|
||||||
typeId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperMatRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
keeperDataMatChange(e) {
|
|
||||||
this.keeperMatRange.forEach((item) => {
|
|
||||||
if (e === item.value) {
|
|
||||||
this.form.keeperDataName = null;
|
|
||||||
// 获取工程下拉选
|
|
||||||
let keeper = queryKeeperNameApi({
|
|
||||||
typeId: e,
|
|
||||||
}).then((projRes) => {
|
|
||||||
this.keeperNameRange = projRes.data.map((item) => {
|
|
||||||
return {
|
|
||||||
label: item.typeName,
|
|
||||||
value: item.typeId,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 查询物资类型 */
|
/** 查询物资类型 */
|
||||||
async getKeeperDataList(data) {
|
async getKeeperDataList(data) {
|
||||||
let keepdataRes = await queryKeeperDataApi({
|
let keepdataRes = await queryKeeperDataApi({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue