班组修改
parent
80e68aeae4
commit
abb4acb456
|
@ -102,7 +102,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-if="scope.row.craftType!=3"
|
||||
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</el-button>
|
||||
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
|
||||
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">离场</el-button>
|
||||
|
@ -416,7 +416,7 @@ function handleExport() {
|
|||
/** 初始化 */
|
||||
function initSubDeptOptions(value) {
|
||||
findAllProjectInfoSubdepts({ 'projectId': value }).then(res => {
|
||||
subDeptOptions.value = res.data;
|
||||
subDeptOptions.value = (res.data||[]).filter(d=>["4","5"].includes( d.subDeptType));
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位11" prop="subDeptId">
|
||||
<el-form-item label="所属单位" prop="subDeptId">
|
||||
<el-select v-model="form.subDeptId" placeholder="请选择所属单位" @change="doSubDeptChange()">
|
||||
<el-option v-for="(it) in data.subdepts" :key="it.id" :label="it.subDeptName" :value="it.id" />
|
||||
</el-select>
|
||||
|
@ -184,7 +184,7 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="工种" v-if="data.isManager" prop="craftPost">
|
||||
<el-select v-model="form.craftPost">
|
||||
<el-option v-for="dict in pro_craft_post.filter(d => d.remark == '3')" :key="dict.value"
|
||||
<el-option v-for="dict in data.craftPostList" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -341,6 +341,7 @@ const data = reactive({
|
|||
userInfo: null,
|
||||
mode: '',
|
||||
editData: null,
|
||||
craftPostList:[],
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
@ -512,6 +513,7 @@ function doSubDeptChange(type) {
|
|||
}
|
||||
|
||||
function doDeptGroupChange() {
|
||||
debugger
|
||||
data.isManager = false
|
||||
if (!form.value.subDeptGroup) {
|
||||
form.value.groupName = "";
|
||||
|
@ -528,6 +530,12 @@ function doDeptGroupChange() {
|
|||
form.value.groupName = dg.groupName;
|
||||
form.value.craftTypeName = getCraftType(dg.craftType);
|
||||
form.value.craftPostName = getCraftPost(dg.craftPost);
|
||||
if(dg.craftType==3){
|
||||
let subDepts=data.subdepts.filter(d=>d.id==dg.subDeptId)
|
||||
let subDeptType=subDepts.length>0?subDepts[0].subDeptType||'':'';
|
||||
subDeptType=`,${subDeptType},`
|
||||
data.craftPostList=pro_craft_post.value.filter(d=>d.remark.indexOf(subDeptType)>=0 && d.elTagClass==3)
|
||||
}
|
||||
if(data.mode != 'edit'){
|
||||
form.value.craftPost = dg.craftPost
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue