Commit 8348c333 by xue_wengang

合并线索组

parent ec6a7bb6
...@@ -19,7 +19,7 @@ export const updateCbxsz = params => post('/api/cbxsz/updateCbxsz', params) ...@@ -19,7 +19,7 @@ export const updateCbxsz = params => post('/api/cbxsz/updateCbxsz', params)
export const toHbxsz = params => post('/api/cbxsz/toHbxsz', 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) export const tjajHttp = params => post('/api/dwcx/EsAsjQuery', params)
......
...@@ -639,11 +639,12 @@ export default { ...@@ -639,11 +639,12 @@ export default {
}); });
}else if(type == "xsz"){ }else if(type == "xsz"){
debugger
this.$router.pushToTab({ this.$router.pushToTab({
path: 'hbxsz', path: 'hbxsz',
query: { query: {
xszajbh: scope.xszajbh, xszajbh: scope.xszajbh,
hbxszType: scope.hbxszType hbxszType: this.formData.typeFlag
} }
}) })
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
size="small" size="small"
style="width: 100px" style="width: 100px"
@click="yhbxsz(true)" @click="yhbxsz(true)"
>合并 >保存
</el-button> </el-button>
<el-button size="small" @click="clear" style="width: 100px" <el-button size="small" @click="clear" style="width: 100px"
>还原 >还原
...@@ -33,13 +33,7 @@ ...@@ -33,13 +33,7 @@
style="width: 99%; margin: 0 auto" style="width: 99%; margin: 0 auto"
width="100%" width="100%"
size="small" size="small"
@selection-change="
(row) => {
handleSelectionChange(row, index);
}
"
> >
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
v-for="columnTitle in propdefaultFormThead" v-for="columnTitle in propdefaultFormThead"
...@@ -115,7 +109,7 @@ ...@@ -115,7 +109,7 @@
<div class="xian"></div> <div class="xian"></div>
<div class="hb_title">本人线索组</div> <div class="hb_title">本人线索组</div>
</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="cbyp">
<div class="title"> <div class="title">
<span class="subtitle">{{ item.cbyp.cbajAjmc }}</span> <span class="subtitle">{{ item.cbyp.cbajAjmc }}</span>
...@@ -127,31 +121,32 @@ ...@@ -127,31 +121,32 @@
type="primary" type="primary"
size="mini" size="mini"
style="width: 100px" style="width: 100px"
@click="hbaj()" @click="hbSelf(index)"
>合并 >合并
</el-button> </el-button>
<span <span
@click=" @click="
seleteTable[`show${index}`] = !seleteTable[`show${index}`] seleteTableSelf[`show${index}`] =
!seleteTableSelf[`show${index}`]
" "
style="margin-left: 20px" style="margin-left: 20px"
> >
<i <i
:class=" :class="
seleteTable[`show${index}`] seleteTableSelf[`show${index}`]
? 'el-icon-arrow-down' ? 'el-icon-arrow-down'
: 'el-icon-arrow-up' : 'el-icon-arrow-up'
" "
></i> ></i>
<el-button type="text" style="color: #333333">{{ <el-button type="text" style="color: #333333">{{
seleteTable[`show${index}`] == false ? "收起" : "展开" seleteTableSelf[`show${index}`] == false ? "收起" : "展开"
}}</el-button> }}</el-button>
</span> </span>
</div> </div>
</div> </div>
<el-table <el-table
v-show="seleteTable[`show${index}`]" v-show="seleteTableSelf[`show${index}`]"
id="ajzbQuery" id="ajzbQuery"
element-loading-text="拼命加载中" element-loading-text="拼命加载中"
ref="itsmDataTable" ref="itsmDataTable"
...@@ -163,7 +158,7 @@ ...@@ -163,7 +158,7 @@
size="small" size="small"
@selection-change=" @selection-change="
(row) => { (row) => {
handleSelectionChange(row, index); handleSelectionChangeSelf(row, index);
} }
" "
> >
...@@ -245,7 +240,7 @@ ...@@ -245,7 +240,7 @@
<div class="xian"></div> <div class="xian"></div>
<div class="hb_title">其它线索组</div> <div class="hb_title">其它线索组</div>
</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="cbyp">
<div class="title"> <div class="title">
<span class="subtitle">{{ item.cbyp.cbajAjmc }}</span> <span class="subtitle">{{ item.cbyp.cbajAjmc }}</span>
...@@ -257,25 +252,26 @@ ...@@ -257,25 +252,26 @@
type="primary" type="primary"
size="mini" size="mini"
style="width: 100px" style="width: 100px"
@click="hbaj(index)" @click="hbOther(index)"
>合并 >合并
</el-button> </el-button>
<span <span
@click=" @click="
seleteTable[`show${index}`] = !seleteTable[`show${index}`] seleteTableOther[`show${index}`] =
!seleteTableOther[`show${index}`]
" "
style="margin-left: 20px" style="margin-left: 20px"
> >
<i <i
:class=" :class="
seleteTable[`show${index}`] seleteTableOther[`show${index}`]
? 'el-icon-arrow-down' ? 'el-icon-arrow-down'
: 'el-icon-arrow-up' : 'el-icon-arrow-up'
" "
></i> ></i>
<el-button type="text" style="color: #333333">{{ <el-button type="text" style="color: #333333">{{
seleteTable[`show${index}`] == false ? "收起" : "展开" seleteTableOther[`show${index}`] == false ? "收起" : "展开"
}}</el-button> }}</el-button>
</span> </span>
</div> </div>
...@@ -292,10 +288,10 @@ ...@@ -292,10 +288,10 @@
size="small" size="small"
@selection-change=" @selection-change="
(row) => { (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 type="selection" width="55"> </el-table-column>
<el-table-column <el-table-column
...@@ -409,33 +405,78 @@ export default { ...@@ -409,33 +405,78 @@ export default {
prop: "jyaq", prop: "jyaq",
}, },
], ],
tableData: [], tableDataSelf: [],
seleteTable: {}, tableDataOther: [],
seleteTableSelf: {},
seleteTableOther: {},
hbTable: [], hbTable: [],
yhbTable: [], yhbTable: [],
}; };
}, },
created() { created() {
this.xszajbh = this.$route.query.xszajbh; this.xszajbh = this.$route.query.xszajbh;
this.cbxgfwbzh = this.$route.query.cbxgfwbzh; this.cbxgfwbzh = this.$route.query.cbxgfwbzh == "bshcb" ? 0 : 1;
this.getShuju(); this.getShuju();
}, },
methods: { methods: {
yhbxsz() { yhbxsz() {
// this.yhbTable = // 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() { clear() {
this.hbTable = []; this.hbTable = [];
}, },
hbaj(index) { hbOther(index) {
if (this.seleteTable[`select${index}`].length > 0) { if (this.seleteTableOther[`select${index}`].length > 0) {
if (item.indexOf("select") != -1) { var arr = [];
this.hbTable = []; for (var item in this.seleteTableOther) {
var arr = []; if (item.indexOf("select") != -1) {
for (var item in this.seleteTable) { arr = [...this.seleteTableOther[item]];
arr = [...this.seleteTable[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) => { arr.forEach((item) => {
this.hbTable.push(item); this.hbTable.push(item);
}); });
...@@ -448,8 +489,11 @@ export default { ...@@ -448,8 +489,11 @@ export default {
}); });
} }
}, },
handleSelectionChange(val, index) { handleSelectionChangeSelf(val, index) {
this.$set(this.seleteTable, `select${index}`, val); this.$set(this.seleteTableSelf, `select${index}`, val);
},
handleSelectionChangeOther(val, index) {
this.$set(this.seleteTableOther, `select${index}`, val);
}, },
getShuju() { getShuju() {
var self = this; var self = this;
...@@ -458,11 +502,20 @@ export default { ...@@ -458,11 +502,20 @@ export default {
cbxgfwbzh: this.cbxgfwbzh, cbxgfwbzh: this.cbxgfwbzh,
}; };
toHbxsz(params).then((res) => { toHbxsz(params).then((res) => {
self.tableData = res.data.result; self.tableDataSelf = res.data.result.filter((item) => {
debugger return item.cbyp.sfbrdjFlag == 1;
for (let index = 0; index < self.tableData.length; index++) { });
self.$set(this.seleteTable, `select${index}`, []); self.tableDataOther = res.data.result.filter((item) => {
self.$set(this.seleteTable, `show${index}`, true); 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