Browse Source

修改

master
yangzhou-cyber 3 years ago
parent
commit
2dcbd8d28d
3 changed files with 216 additions and 219 deletions
  1. +3
    -1
      src/views/second/taskSummary/basicTable.vue
  2. +209
    -213
      src/views/second/taskSummary/constraint.vue
  3. +4
    -5
      src/views/second/taskSummary/reward.vue

+ 3
- 1
src/views/second/taskSummary/basicTable.vue View File

@@ -2,7 +2,6 @@
<div class="assessing-content ele-body">
<el-card
shadow="never"
v-loading="loading"
element-loading-background="rgba(255, 255, 255, 1)"
>
<search :type="1" @search:task="updateParams($event)" />
@@ -15,6 +14,8 @@
:height="tableHeight"
border
:span-method="arraySpanMethod"
v-loading="loading"

>
<el-table-column
type="index"
@@ -464,6 +465,7 @@ export default {
this.form = form;
},
save() {
this.loading=true;
let form = JSON.parse(JSON.stringify(this.form));
form.cooperateDept = form.cooperateDept && form.cooperateDept.join(",");
// form.leaderDept = form.leaderDept && form.leaderDept.join(",");

+ 209
- 213
src/views/second/taskSummary/constraint.vue View File

@@ -1,10 +1,6 @@
<template>
<div class="assessing-content ele-body">
<el-card
shadow="never"
v-loading="loading"
element-loading-background="rgba(255, 255, 255, 1)"
>
<el-card shadow="never" element-loading-background="rgba(255, 255, 255, 1)">
<search :type="3" @search:task="updateParams($event)" />
<div class="operating">
<el-button size="small" type="primary">导出</el-button>
@@ -14,6 +10,7 @@
:data="dataList"
:height="tableHeight"
border
v-loading="loading"
:span-method="arraySpanMethod"
>
<el-table-column
@@ -118,205 +115,205 @@
/>
</el-card>
<el-dialog
title="编辑考核内容"
:visible.sync="showEdit"
width="675px"
custom-class="ele-dialog-form"
:lock-scroll="false"
:destroy-on-close="true"
@closed="form = {}"
>
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
title="编辑考核内容"
:visible.sync="showEdit"
width="675px"
custom-class="ele-dialog-form"
:lock-scroll="false"
:destroy-on-close="true"
@closed="form = {}"
>
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
@select="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<span
class="el-icon-circle-plus-outline add"
@click="addDept('other')"
></span>
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-circle-plus-outline add"
@click="addDept('other')"
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
@select="changePrincipal($event, 'other',index)"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
@select="changePrincipal($event, 'other', index)"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div class="cooperate">
</div>
<div class="cooperate">
<span
class="el-icon-circle-plus-outline add"
@click="addDept('cooperate')"
></span>
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-circle-plus-outline add"
@click="addDept('cooperate')"
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
@select="changePrincipal($event, 'cooperate',index)"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
@select="changePrincipal($event, 'cooperate', index)"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</div>
</el-dialog>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</div>
</el-dialog>
</div>
</template>

@@ -371,22 +368,22 @@ export default {
},
},
methods: {
changePrincipal(e, type,index) {
let nameId;
this.department.forEach(item=>{
if(item.id==e.id){
nameId=item.principal;
changePrincipal(e, type, index) {
let nameId;
this.department.forEach((item) => {
if (item.id == e.id) {
nameId = item.principal;
return;
}
})
if(type=="other"){
this.$set(this.form.otherPrincipal,index,parseInt(nameId))
});
if (type == "other") {
this.$set(this.form.otherPrincipal, index, parseInt(nameId));
}
if(type=="cooperate"){
this.$set(this.form.cooperatePrincipal,index,parseInt(nameId))
if (type == "cooperate") {
this.$set(this.form.cooperatePrincipal, index, parseInt(nameId));
}
if(type=='leader'){
this.$set(this.form,'leaderPrincipal',parseInt(nameId))
if (type == "leader") {
this.$set(this.form, "leaderPrincipal", parseInt(nameId));
}
},
addDept(type) {
@@ -421,6 +418,7 @@ export default {
this.page = page;
},
getDataList() {
this.loading=true
api
.getContraintList(Object.assign({}, this.page, this.searchParams))
.then((res) => {
@@ -458,12 +456,10 @@ export default {
this.form = form;
},
save() {
this.loading=true;
let form = JSON.parse(JSON.stringify(this.form));
console.log(form)
console.log(form);
form.cooperateDept = form.cooperateDept && form.cooperateDept.join(",");
// form.leaderDept = form.leaderDept && form.leaderDept.join(",");
// form.leaderPrincipal =
// form.leaderPrincipal && form.leaderPrincipal.join(",");
form.cooperatePrincipal =
form.cooperatePrincipal && form.cooperatePrincipal.join(",");
form.otherDept = form.otherDept && form.otherDept.join(",");

+ 4
- 5
src/views/second/taskSummary/reward.vue View File

@@ -1,10 +1,6 @@
<template>
<div class="assessing-content ele-body">
<el-card
shadow="never"
v-loading="loading"
element-loading-background="rgba(255, 255, 255, 1)"
>
<el-card shadow="never" element-loading-background="rgba(255, 255, 255, 1)">
<search :type="2" @search:task="updateParams($event)" />
<div class="operating">
<el-button size="small" type="primary">导出</el-button>
@@ -15,6 +11,7 @@
:height="tableHeight"
border
:span-method="arraySpanMethod"
v-loading="loading"
>
<el-table-column
type="index"
@@ -451,6 +448,7 @@ export default {
this.page = page;
},
getDataList() {
this.loading=true;
api
.getRewardList(Object.assign({}, this.page, this.searchParams))
.then((res) => {
@@ -482,6 +480,7 @@ export default {
this.form = form;
},
save() {
this.loading=true;
let form = JSON.parse(JSON.stringify(this.form));
form.cooperateDept = form.cooperateDept && form.cooperateDept.join(",");
form.cooperatePrincipal =

Loading…
Cancel
Save