YF-yuan 3 years ago
parent
commit
7f76190974
1 changed files with 25 additions and 17 deletions
  1. +25
    -17
      src/views/second/segmentation/contentDetail.vue

+ 25
- 17
src/views/second/segmentation/contentDetail.vue View File

<el-row type="flex"> <el-row type="flex">
<el-col :span="5" class="grey"><span>区牵头单位</span></el-col> <el-col :span="5" class="grey"><span>区牵头单位</span></el-col>
<el-col :span="7" <el-col :span="7"
><span><pre>{{ data.leaderUnit }}</pre></span></el-col
><span>
<pre>{{ data.leaderUnit }}</pre>
</span></el-col
> >
<el-col :span="5" class="grey"><span>封顶分值</span></el-col> <el-col :span="5" class="grey"><span>封顶分值</span></el-col>
<el-col :span="7" <el-col :span="7"
>添加</el-button >添加</el-button
> >
</div> </div>
<div style="overflow-x:scroll">
<div style="overflow-x: scroll">
<el-table <el-table
:data="detailList" :data="detailList"
border border
highlight-current-row highlight-current-row
v-loading="tableLoading" v-loading="tableLoading"
style="min-height:500px;min-width:1500px"
style="min-height: 500px; min-width: 1500px"
> >
<el-table-column <el-table-column
type="index" type="index"
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" >
<el-table-column label="操作" align="center">
<template slot-scope="{ row, $index }"> <template slot-scope="{ row, $index }">
<template v-if="row.add || row.edit"> <template v-if="row.add || row.edit">
<el-link <el-link
return; return;
} }
}); });
this.$set(this.form, "leaderPrincipal", parseInt(nameId));
this.$set(this.form, "leaderPrincipal", parseInt(nameId)||null);
} }
}, },
getApi() { getApi() {
} }
} }
for (let item of form[param]) { for (let item of form[param]) {
if(item==0){
if (item == 0) {
continue; continue;
} }
if (!item ) {
debugger
if (!item) {
debugger;
this.$message({ this.$message({
type: "warning", type: "warning",
message: "请完善信息", message: "请完善信息",
} }
} else { } else {
if (!form[param]) { if (!form[param]) {
debugger
debugger;
this.$message({ this.$message({
type: "warning", type: "warning",
message: "请完善信息", message: "请完善信息",
typeof form[param] == "string" && typeof form[param] == "string" &&
form[param].trim() == "" form[param].trim() == ""
) { ) {
debugger
debugger;
this.$message({ this.$message({
type: "warning", type: "warning",
message: "请完善信息", message: "请完善信息",
form.otherDept = form.otherDept && form.otherDept.join(","); form.otherDept = form.otherDept && form.otherDept.join(",");
form.otherPrincipal = form.otherPrincipal =
form.otherPrincipal && form.otherPrincipal.join(","); form.otherPrincipal && form.otherPrincipal.join(",");
console.log(form);
if (data.edit) { if (data.edit) {
this.getApi() this.getApi()
.editItem(form) .editItem(form)
.then((res) => { .then((res) => {
this.$message({
type: "success",
message: "修改小项内容成功",
});
this.getData();
if (res.data.code == 0) {
this.$message({
type: "success",
message: "修改小项内容成功",
});
this.getData();
} else {
this.$message.error(res.data.msg);
}
}) })
.catch((e) => { .catch((e) => {
console.log(e)
this.$message.error("修改小项内容失败"); this.$message.error("修改小项内容失败");
}) })
.finally(() => { .finally(() => {
/deep/ .el-table__body-wrapper { /deep/ .el-table__body-wrapper {
overflow: visible; overflow: visible;
} }
.table{
.table {
box-sizing: border-box; box-sizing: border-box;
} }
/deep/ .el-table--border th.gutter:last-of-type { /deep/ .el-table--border th.gutter:last-of-type {
width:0!important;
width: 0 !important;
} }
</style> </style>

Loading…
Cancel
Save