Ver código fonte

获取

master
yangzhou-cyber 3 anos atrás
pai
commit
3e02753c56
8 arquivos alterados com 119 adições e 53 exclusões
  1. +1
    -1
      src/api/second/segmentation/basicTable.js
  2. +1
    -1
      src/api/second/segmentation/constraint.js
  3. +1
    -1
      src/api/second/segmentation/reward.js
  4. +1
    -1
      src/router/index.js
  5. +1
    -1
      src/views/second/segmentation/basicTable.vue
  6. +1
    -1
      src/views/second/segmentation/constraint.vue
  7. +108
    -45
      src/views/second/segmentation/contentDetail.vue
  8. +5
    -2
      src/views/second/segmentation/reward.vue

+ 1
- 1
src/api/second/segmentation/basicTable.js Ver arquivo

@@ -14,6 +14,6 @@ export default {
return axios.get('/basictaskitem/getInfo/'+id)
},
deleteItem(id){
return axios.delete("/basictaskitem/getInfo/"+id)
return axios.delete("/basictaskitem/deleteItem/"+id)
}
}

+ 1
- 1
src/api/second/segmentation/constraint.js Ver arquivo

@@ -14,6 +14,6 @@ export default {
return axios.get('/rigidityconstraintitem/getInfo/'+id)
},
deleteItem(id){
return axios.delete("/rigidityconstraintitem/getInfo/"+id)
return axios.delete("/rigidityconstraintitem/deleteItem/"+id)
}
}

+ 1
- 1
src/api/second/segmentation/reward.js Ver arquivo

@@ -14,6 +14,6 @@ export default {
return axios.get('/specialpoweritem/getInfo/'+id)
},
deleteItem(id){
return axios.delete("/specialpoweritem/getInfo/"+id)
return axios.delete("/specialpoweritem/deleteItem/"+id)
}
}

+ 1
- 1
src/router/index.js Ver arquivo

@@ -60,7 +60,7 @@ const routes = [
meta: {hide: true, title: '分项信息'},
children: [
{
path: '/:id/:type',
path: ':id/:type',
component: () => import('@/views/second/segmentation/contentDetail'),
meta: {title: '分项'},
name:"segmentation",

+ 1
- 1
src/views/second/segmentation/basicTable.vue Ver arquivo

@@ -93,7 +93,7 @@
<el-table-column label="操作" width="80" align="center">
<template slot-scope="{ row }">
<router-link
:to="{ name: 'segmentation', params: { id:row.id, type: 1 } }"
:to="{ name: 'segmentation', params: { id:row.basicTaskId, type: 1 } }"
>分项</router-link
>
</template>

+ 1
- 1
src/views/second/segmentation/constraint.vue Ver arquivo

@@ -86,7 +86,7 @@
<el-table-column label="操作" width="60" align="center">
<template slot-scope="{ row }">
<router-link
:to="{ name: 'segmentation', params: { id: row.id, type: 3 } }"
:to="{ name: 'segmentation', params: { id: row.rigidityConstraintId, type: 3 } }"
>分项</router-link
>
</template>

+ 108
- 45
src/views/second/segmentation/contentDetail.vue Ver arquivo

@@ -67,13 +67,13 @@
<div class="segmentation" style="margin-top: 30px">
<div class="title">
<span>分项信息</span>
<el-button type="primary" size="small" style="margin-right: 50px"
<el-button type="primary" size="small" style="margin-right: 50px" @click="showAdd"
>添加</el-button
>
</div>
<div>
<el-table
:data="dataDetail"
:data="detailList"
border
highlight-current-row
v-loading="tableLoading"
@@ -89,41 +89,61 @@
align="center"
min-width="150"
max-width="200"
></el-table-column>
<el-table-column
label="分值"
align="center"
width="80"
></el-table-column>
>
<template slot-scope="{ row }">
<el-input
type="textarea"
placeholder="请输入小项内容"
v-model="dataDetail.itemContent"
v-if="row.edit"
></el-input>
<span v-else>{{ row.itemContent }}</span>
</template>
</el-table-column>
<el-table-column label="分值" align="center" width="80">
<template slot-scope="{ row }">
<el-input
type="number"
placeholder="请输入分值"
v-if="row.edit"
></el-input>
<span>{{ row.points }}</span>
</template>
</el-table-column>
<el-table-column label="牵头部门" align="center" width="180">
<treeselect
:multiple="true"
v-model="dataDetail.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
<template slot-scope="{ row }">
<treeselect
v-if="row.edit"
:multiple="true"
v-model="dataDetail.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
<span v-else>{{ row.leaderDeptList | formatList }}</span>
</template>
</el-table-column>
<el-table-column label="责任领导" align="center" width="100">
<template slot-scope="{ row }">
<span>{{ row.leaderPrincipalList | formatList }}</span>
</template>
</el-table-column>
<el-table-column
label="责任领导"
align="center"
width="100"
></el-table-column>
<el-table-column label="配合部门" align="center" width="180">
<template>
<template slot-scope="{ row }">
<treeselect
v-if="row.edit"
:multiple="true"
v-model="dataDetail.cooperateDept"
:options="formatDep"
@@ -142,23 +162,41 @@
}
"
/>
<span v-else>{{ row.cooperateDeptList | formatList }}</span>
</template>
</el-table-column>
<el-table-column label="责任领导" align="center" width="100">
<template slot-scope="{ row }">
<span>{{ row.cooperatePrincipalList | formatList }}</span>
</template>
</el-table-column>
<el-table-column
label="责任领导"
align="center"
width="100"
></el-table-column>
<el-table-column label="操作" align="center" width="150">
<template>
<el-button type="primary" size="small">编辑</el-button>
<el-button type="danger" size="small">删除</el-button>
<template slot-scope="{ row }">
<el-link
@click="edit(row)"
icon="el-icon-edit"
type="primary"
:underline="false"
>修改</el-link
>
<el-popconfirm
title="确定要删除此表格?"
@confirm="remove(row.id)"
class="ele-action"
>
<el-link
slot="reference"
icon="el-icon-delete"
type="danger"
:underline="false"
>删除</el-link
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer" class="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="close">取消</el-button>&nbsp;
</div>
</div>
@@ -173,6 +211,11 @@ import basicTableApi from "@/api/second/segmentation/basicTable";
import rewardApi from "@/api/second/segmentation/reward";
import constraintApi from "@/api/second/segmentation/constraint";
import { mapGetters } from "vuex";
let map={
1:"specialPowerId",
2:"specialPowerItemList",
3:"rigidityConstraintItemList"
}
export default {
props: {
id: {
@@ -188,13 +231,17 @@ export default {
data() {
return {
data: {},
dataDetail: [],
dataDetail: {},
allLoading: false,
tableLoading: false,
};
},
computed: {
...mapGetters(["formatDep"]),
detailList() {
let that = this;
return map[this.type]
},
},
created() {
this.getData();
@@ -243,12 +290,28 @@ export default {
this.tableLoading = false;
});
},
save() {
this.$router.back(-1);
showAdd(){
let data=this.data;
data.
},
close() {
this.$router.back(-1);
},
remove(id) {
this.allLoading = true;
this.getApi()
.deleteItem(id)
.then((res) => {
this.$message({ type: "success", message: "删除小项成功" });
this.getData();
})
.catch((e) => {
console.log(e)
this.$message.error("删除小项失败");
}).finally(()=>{
this.allLoading=false;
});
},
},
};
</script>

+ 5
- 2
src/views/second/segmentation/reward.vue Ver arquivo

@@ -17,7 +17,7 @@
:span-method="arraySpanMethod"
ref="table"
>
<el-table-column
<el-table-column
type="index"
width="50"
align="center"
@@ -93,7 +93,10 @@
<el-table-column label="操作" width="125" align="center">
<template slot-scope="{ row }">
<router-link
:to="{ name: 'segmentation', params: { id: row.id, type: 2 } }"
:to="{
name: 'segmentation',
params: { id: row.specialPowerId, type: 2 },
}"
>分项</router-link
>
</template>

Carregando…
Cancelar
Salvar