Commit 8348c333 by xue_wengang

合并线索组

parent ec6a7bb6
......@@ -19,7 +19,7 @@ export const updateCbxsz = params => post('/api/cbxsz/updateCbxsz', params)
export const toHbxsz = params => post('/api/cbxsz/toHbxsz', params)
//合并线索
export const insertHbXszxx = params => post('/api/xlaj/insertHbXszxx', params)
export const insertHbXszxx = params => post('/api/cbxsz/insertHbXszxx', params)
//合并线索
export const tjajHttp = params => post('/api/dwcx/EsAsjQuery', params)
......
......@@ -639,11 +639,12 @@ export default {
});
}else if(type == "xsz"){
debugger
this.$router.pushToTab({
path: 'hbxsz',
query: {
xszajbh: scope.xszajbh,
hbxszType: scope.hbxszType
hbxszType: this.formData.typeFlag
}
})
}
......
......@@ -17,7 +17,7 @@
size="small"
style="width: 100px"
@click="yhbxsz(true)"
>合并
>保存
</el-button>
<el-button size="small" @click="clear" style="width: 100px"
>还原
......@@ -33,13 +33,7 @@
style="width: 99%; margin: 0 auto"
width="100%"
size="small"
@selection-change="
(row) => {
handleSelectionChange(row, index);
}
"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
align="center"
v-for="columnTitle in propdefaultFormThead"
......@@ -115,7 +109,7 @@
<div class="xian"></div>
<div class="hb_title">本人线索组</div>
</div>
<div class="qt" v-for="(item, index) in tableData" :key="index">
<div class="qt" v-for="(item, index) in tableDataSelf" :key="index">
<div class="cbyp">
<div class="title">
<span class="subtitle">{{ item.cbyp.cbajAjmc }}</span>
......@@ -127,31 +121,32 @@
type="primary"
size="mini"
style="width: 100px"
@click="hbaj()"
@click="hbSelf(index)"
>合并
</el-button>
<span
@click="
seleteTable[`show${index}`] = !seleteTable[`show${index}`]
seleteTableSelf[`show${index}`] =
!seleteTableSelf[`show${index}`]
"
style="margin-left: 20px"
>
<i
:class="
seleteTable[`show${index}`]
seleteTableSelf[`show${index}`]
? 'el-icon-arrow-down'
: 'el-icon-arrow-up'
"
></i>
<el-button type="text" style="color: #333333">{{
seleteTable[`show${index}`] == false ? "收起" : "展开"
seleteTableSelf[`show${index}`] == false ? "收起" : "展开"
}}</el-button>
</span>
</div>
</div>
<el-table
v-show="seleteTable[`show${index}`]"
v-show="seleteTableSelf[`show${index}`]"
id="ajzbQuery"
element-loading-text="拼命加载中"
ref="itsmDataTable"
......@@ -163,7 +158,7 @@
size="small"
@selection-change="
(row) => {
handleSelectionChange(row, index);
handleSelectionChangeSelf(row, index);
}
"
>
......@@ -245,7 +240,7 @@
<div class="xian"></div>
<div class="hb_title">其它线索组</div>
</div>
<div class="qt" v-for="(item, index) in tableData" :key="index">
<div class="qt" v-for="(item, index) in tableDataOther" :key="index">
<div class="cbyp">
<div class="title">
<span class="subtitle">{{ item.cbyp.cbajAjmc }}</span>
......@@ -257,25 +252,26 @@
type="primary"
size="mini"
style="width: 100px"
@click="hbaj(index)"
@click="hbOther(index)"
>合并
</el-button>
<span
@click="
seleteTable[`show${index}`] = !seleteTable[`show${index}`]
seleteTableOther[`show${index}`] =
!seleteTableOther[`show${index}`]
"
style="margin-left: 20px"
>
<i
:class="
seleteTable[`show${index}`]
seleteTableOther[`show${index}`]
? 'el-icon-arrow-down'
: 'el-icon-arrow-up'
"
></i>
<el-button type="text" style="color: #333333">{{
seleteTable[`show${index}`] == false ? "收起" : "展开"
seleteTableOther[`show${index}`] == false ? "收起" : "展开"
}}</el-button>
</span>
</div>
......@@ -292,10 +288,10 @@
size="small"
@selection-change="
(row) => {
handleSelectionChange(row, index);
handleSelectionChangeOther(row, index);
}
"
v-show="seleteTable[`show${index}`]"
v-show="seleteTableOther[`show${index}`]"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
......@@ -409,33 +405,78 @@ export default {
prop: "jyaq",
},
],
tableData: [],
seleteTable: {},
tableDataSelf: [],
tableDataOther: [],
seleteTableSelf: {},
seleteTableOther: {},
hbTable: [],
yhbTable: [],
};
},
created() {
this.xszajbh = this.$route.query.xszajbh;
this.cbxgfwbzh = this.$route.query.cbxgfwbzh;
this.cbxgfwbzh = this.$route.query.cbxgfwbzh == "bshcb" ? 0 : 1;
this.getShuju();
},
methods: {
yhbxsz() {
// this.yhbTable =
// insertHbXszxx({
// })
var self = this;
let arr = [];
this.hbTable.forEach((item) => {
arr.push(item.asjbh);
});
debugger;
this.$confirm("请选择数据", "提示", {
confirmButtonText: "确定",
type: "warning",
}).then(() => {
insertHbXszxx({
asjbhs: arr.toString(),
xszajbhs: "",
xszajbhStrs: "",
}).then((res) => {
if (res.code == 200 && res.code.result == 1) {
self.$message({
type: "success",
message: "保存成功",
});
} else {
self.$message({
type: "error",
message: "保存失败",
});
}
});
});
},
clear() {
this.hbTable = [];
},
hbaj(index) {
if (this.seleteTable[`select${index}`].length > 0) {
if (item.indexOf("select") != -1) {
this.hbTable = [];
var arr = [];
for (var item in this.seleteTable) {
arr = [...this.seleteTable[item]];
hbOther(index) {
if (this.seleteTableOther[`select${index}`].length > 0) {
var arr = [];
for (var item in this.seleteTableOther) {
if (item.indexOf("select") != -1) {
arr = [...this.seleteTableOther[item]];
arr.forEach((item) => {
this.hbTable.push(item);
});
}
}
} else {
this.$confirm("请选择数据", "提示", {
confirmButtonText: "确定",
type: "warning",
});
}
},
hbSelf(index) {
if (this.seleteTableSelf[`select${index}`].length > 0) {
var arr = [];
for (var item in this.seleteTableSelf) {
if (item.indexOf("select") != -1) {
arr = [...this.seleteTableSelf[item]];
arr.forEach((item) => {
this.hbTable.push(item);
});
......@@ -448,8 +489,11 @@ export default {
});
}
},
handleSelectionChange(val, index) {
this.$set(this.seleteTable, `select${index}`, val);
handleSelectionChangeSelf(val, index) {
this.$set(this.seleteTableSelf, `select${index}`, val);
},
handleSelectionChangeOther(val, index) {
this.$set(this.seleteTableOther, `select${index}`, val);
},
getShuju() {
var self = this;
......@@ -458,11 +502,20 @@ export default {
cbxgfwbzh: this.cbxgfwbzh,
};
toHbxsz(params).then((res) => {
self.tableData = res.data.result;
debugger
for (let index = 0; index < self.tableData.length; index++) {
self.$set(this.seleteTable, `select${index}`, []);
self.$set(this.seleteTable, `show${index}`, true);
self.tableDataSelf = res.data.result.filter((item) => {
return item.cbyp.sfbrdjFlag == 1;
});
self.tableDataOther = res.data.result.filter((item) => {
return item.cbyp.sfbrdjFlag != 1;
});
debugger;
for (let index = 0; index < self.tableDataSelf.length; index++) {
self.$set(this.seleteTableSelf, `select${index}`, []);
self.$set(this.seleteTableSelf, `show${index}`, true);
}
for (let index = 0; index < self.tableDataOther.length; index++) {
self.$set(this.seleteTableOther, `select${index}`, []);
self.$set(this.seleteTableOther, `show${index}`, true);
}
});
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment