|
|
@ -3,18 +3,18 @@ |
|
|
|
|
|
|
|
<button-bar ref="btnbar" view-title="推送详情" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|
|
|
<div class="main-content"> |
|
|
|
<div class="mid"> |
|
|
|
<div class="item"> |
|
|
|
<div class="listtop" style="width: 400px"> |
|
|
|
<el-row class="mid"> |
|
|
|
<el-col :span="8" class="item"> |
|
|
|
<div class="listtop" style="width: 450px"> |
|
|
|
<div class="tit">项目列表</div> |
|
|
|
</div> |
|
|
|
<el-table :data="formobj" border ref="multipleTab" max-height="500px" style="width: 400px" |
|
|
|
<el-table :data="formobj" border ref="multipleTab" max-height="500px" style="width: 450px;font-size: 16px" |
|
|
|
highlight-current-row @row-click="singleElection" :show-header="false" :row-style="{height:'50px'}"> |
|
|
|
<el-table-column prop="entryName" label="项目名称" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="item" style="margin-left: 50px;"> |
|
|
|
<div class="listtop" style="width: 400px"> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8" class="item" style="margin-left: 50px;"> |
|
|
|
<div class="listtop" style="width: 100%"> |
|
|
|
<div class="tit">关联人员</div> |
|
|
|
<div |
|
|
|
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> |
|
|
@ -23,7 +23,47 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<el-table ref="multipleTable" :data="dataListOne" highlight-current-row border max-height="500px" |
|
|
|
|
|
|
|
<div class="org-tree"> |
|
|
|
<el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly |
|
|
|
:default-checked-keys="uploadData.users" |
|
|
|
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" |
|
|
|
@node-click="handleNodeClick"> |
|
|
|
|
|
|
|
<div class="custom-tree-node" slot-scope="{ node, data }" |
|
|
|
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"> |
|
|
|
<div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div> |
|
|
|
|
|
|
|
<div style="flex: 1;"></div> |
|
|
|
<div style="margin-right: 35px;display: flex;flex-direction: row; align-items: center;"> |
|
|
|
|
|
|
|
<!-- <span v-if="node.childNodes.length!=0" :class="{ 'title': data.psid==='0' }">[ {{ node.childNodes.length}} ]</span> --> |
|
|
|
|
|
|
|
<span v-if="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 20px;">微信名称 |
|
|
|
</span> |
|
|
|
|
|
|
|
<div v-if="node.childNodes.length==0" |
|
|
|
style="width: 100%;display: flex;flex-direction: row;align-items: center;"> |
|
|
|
<div></div> |
|
|
|
<img v-if="data.isOpenId=='2'" src="../../../public/image/association.png" style="width: 35px;height: 25px;" /> |
|
|
|
<span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center; |
|
|
|
white-space: nowrap; |
|
|
|
text-overflow: ellipsis;">正在完善 </span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- <span |
|
|
|
v-if="node.childNodes.length===0" |
|
|
|
class="history" |
|
|
|
@click="jumpHistory(node.data)" |
|
|
|
>查看历史录像 |
|
|
|
</span> --> |
|
|
|
</div> |
|
|
|
|
|
|
|
</el-tree> |
|
|
|
</div> |
|
|
|
<!-- <el-table ref="multipleTable" :data="dataListOne" highlight-current-row border max-height="500px" |
|
|
|
style="width: 400px;height: 500px;" @row-click="singleElection2" tooltip-effect="dark" |
|
|
|
:row-style="{height:'50px'}"> |
|
|
|
|
|
|
@ -40,34 +80,36 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="orgName" label="单位" align="center" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</el-table> --> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<div class="item" style="margin-left: 50px;width:700px;"> |
|
|
|
<el-col :span="8" class="item" style="margin-left: 50px;width:700px;"> |
|
|
|
<div class="listtop"> |
|
|
|
|
|
|
|
<div class="tit">微信推送</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
<span |
|
|
|
style="color: #fff;background: #018AD2; font-size: 18px; margin-right: 20px; border-radius: 5px;padding: 4px 12px;" |
|
|
|
style="color: #fff;background: #018AD2; font-size: 16px; margin-right: 20px; border-radius: 5px;padding: 4px 12px;" |
|
|
|
@click="saveData()">保存</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-for="(item, index) in sysorganList"> |
|
|
|
<div v-for="(item, index) in sysorganList2"> |
|
|
|
|
|
|
|
<div class="itemlay"> |
|
|
|
<div style="display: flex;flex-direction: row;align-items: center; background:#EDF1F7 ; height: 50px; |
|
|
|
padding: 10px;"> |
|
|
|
<div |
|
|
|
style="display: flex;flex-direction: row;align-items: center; background:#EDF1F7 ; height: 50px;padding: 10px;"> |
|
|
|
<el-checkbox style="zoom: 150%;" :value="item.state === '2'" |
|
|
|
@change="titlecheckbox(item.id,$event)"></el-checkbox> |
|
|
|
<span style="margin-left: 10px;flex: 1; font-size: 18px;"> {{item.name}}</span> |
|
|
|
|
|
|
|
<span style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px;" |
|
|
|
<span |
|
|
|
style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px; font-size: 16px; " |
|
|
|
@click="showList(item.id)" v-show="!item.Show">展开</span> |
|
|
|
<span style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px;" |
|
|
|
<span |
|
|
|
style="color: #fff; margin-right: 20px;background: #018AD2; border-radius: 5px;padding: 4px 12px; font-size: 16px; " |
|
|
|
@click="showList2(item.id)" v-show="item.Show">收起</span> |
|
|
|
</div> |
|
|
|
|
|
|
@ -96,8 +138,8 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -152,11 +194,12 @@ |
|
|
|
// 当前选择的行的数据 |
|
|
|
checkList: [], |
|
|
|
uploadData: { |
|
|
|
userProjectSid: '', |
|
|
|
templateSid:[] |
|
|
|
userProjectSid: '', |
|
|
|
templateSid: [] |
|
|
|
}, |
|
|
|
ValSids: [], |
|
|
|
sysorganList: [], |
|
|
|
sysorganList2: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -165,11 +208,6 @@ |
|
|
|
this.$refs['multipleTab'].setCurrentRow(this.formobj[0]) |
|
|
|
}) |
|
|
|
}, |
|
|
|
dataListOne: function() { |
|
|
|
this.$nextTick(function() { |
|
|
|
this.$refs['multipleTable'].setCurrentRow(this.dataListOne[0]) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
@ -203,45 +241,34 @@ |
|
|
|
if (res.success) { |
|
|
|
this.formobj = res.data |
|
|
|
|
|
|
|
req.getUserProjectBySid(res.data[0].sid).then(res => { |
|
|
|
this.dataListOne = res.data |
|
|
|
this.forList() |
|
|
|
this.uploadData.userProjectSid = res.data[0].sid |
|
|
|
// this.estimate() |
|
|
|
req.associationUserList(res.data[0].sid).then(res => { |
|
|
|
this.sysorganList = res.data |
|
|
|
// this.uploadData.userProjectSid = res.data[0].sid |
|
|
|
|
|
|
|
req.templateMessage(this.dataListOne[0].sid).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.sysorganList = res.data |
|
|
|
//this.Array为数组名 |
|
|
|
this.sysorganList.forEach(item => { |
|
|
|
// req.templateMessage(this.dataListOne[0].sid).then(res => { |
|
|
|
// if (res.success) { |
|
|
|
// this.sysorganList2 = res.data |
|
|
|
// //this.Array为数组名 |
|
|
|
// this.sysorganList2.forEach(item => { |
|
|
|
|
|
|
|
this.$set(item, 'Show', true) |
|
|
|
// this.$set(item, 'Show', true) |
|
|
|
|
|
|
|
}) |
|
|
|
console.log("aaaaaaaaaa", this.sysorganList) |
|
|
|
} |
|
|
|
}) |
|
|
|
// }) |
|
|
|
// console.log("aaaaaaaaaa", this.sysorganList2) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
clearList() { |
|
|
|
this.ValSid = [] |
|
|
|
this.ValSids = [] |
|
|
|
this.dataListOne = [] |
|
|
|
this.uploadData = { |
|
|
|
userProjectSid: '', |
|
|
|
templateSid:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
singleElection(row) { |
|
|
|
this.clearList() |
|
|
|
console.log("aaaaaaaaaa", row) |
|
|
|
this.uploadData.userProjectSid = row.sid |
|
|
|
req.getUserProjectBySid(row.sid).then(res => { |
|
|
|
this.dataListOne = res.data |
|
|
|
req.associationUserList(row.sid).then(res => { |
|
|
|
this.sysorganList = res.data |
|
|
|
|
|
|
|
this.uploadData.userProjectSid = res.data[0].sid |
|
|
|
req.templateMessage(this.dataListOne[0].sid).then(res => { |
|
|
@ -258,8 +285,6 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
this.forList() |
|
|
|
// this.estimate() |
|
|
|
}) |
|
|
|
}, |
|
|
|
singleElection2(row) { |
|
|
@ -267,9 +292,9 @@ |
|
|
|
this.uploadData.userProjectSid = row.sid |
|
|
|
req.templateMessage(row.sid).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.sysorganList = res.data |
|
|
|
this.sysorganList2 = res.data |
|
|
|
//this.Array为数组名 |
|
|
|
this.sysorganList.forEach(item => { |
|
|
|
this.sysorganList2.forEach(item => { |
|
|
|
|
|
|
|
this.$set(item, 'Show', true) |
|
|
|
|
|
|
@ -280,7 +305,7 @@ |
|
|
|
}, |
|
|
|
showList(id) { |
|
|
|
console.log("aaaaaaaaaa", id) |
|
|
|
const item = this.sysorganList.find((item => item.id == id)) |
|
|
|
const item = this.sysorganList2.find((item => item.id == id)) |
|
|
|
|
|
|
|
item.Show = !item.Show |
|
|
|
|
|
|
@ -288,7 +313,7 @@ |
|
|
|
}, |
|
|
|
showList2(id) { |
|
|
|
console.log("aaaaaaaaaa", id) |
|
|
|
const item = this.sysorganList.find((item => item.id == id)) |
|
|
|
const item = this.sysorganList2.find((item => item.id == id)) |
|
|
|
item.Show = !item.Show |
|
|
|
console.log("aaaaaaaaaa", item) |
|
|
|
}, |
|
|
@ -299,7 +324,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const item = this.sysorganList.find((item => item.id == id)) |
|
|
|
const item = this.sysorganList2.find((item => item.id == id)) |
|
|
|
|
|
|
|
item.state = info ? "2" : '1' |
|
|
|
|
|
|
@ -320,9 +345,9 @@ |
|
|
|
console.log("aaaaaaaaaa", info) |
|
|
|
child.state = info ? "2" : "1" |
|
|
|
|
|
|
|
console.log("aaaaaaaaaa", this.sysorganList[index].list) |
|
|
|
console.log("aaaaaaaaaa", this.sysorganList2[index].list) |
|
|
|
|
|
|
|
var newList = this.sysorganList[index].list |
|
|
|
var newList = this.sysorganList2[index].list |
|
|
|
|
|
|
|
var count = 0 |
|
|
|
for (var i = 0; i < newList.length; i++) { |
|
|
@ -335,16 +360,16 @@ |
|
|
|
} |
|
|
|
console.log("aaaaaaaaaa", count) |
|
|
|
console.log("aaaaaaaaaa", newList.length) |
|
|
|
this.sysorganList[index].state = count == newList.length ? "2" : "1" |
|
|
|
this.sysorganList2[index].state = count == newList.length ? "2" : "1" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
saveData() { |
|
|
|
var newList = [] |
|
|
|
|
|
|
|
for (var i = 0; i < this.sysorganList.length; i++) { |
|
|
|
for (var i = 0; i < this.sysorganList2.length; i++) { |
|
|
|
|
|
|
|
var list = this.sysorganList[i].list |
|
|
|
var list = this.sysorganList2[i].list |
|
|
|
|
|
|
|
for (var j = 0; j < list.length; j++) { |
|
|
|
|
|
|
@ -363,133 +388,37 @@ |
|
|
|
console.log("uploadData", this.uploadData) |
|
|
|
req.saveProjectTemplate(this.uploadData).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
message: '保存成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
dosearch() { |
|
|
|
this.queryParams.current = 1 |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
resetQuery() { |
|
|
|
this.queryParams = { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
typeName: '', |
|
|
|
} |
|
|
|
} |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
// 点击待选 |
|
|
|
getWaiting() { |
|
|
|
if (this.ValSid[0]) { |
|
|
|
for (var i = 0; i < this.dataListOne.length; i++) { |
|
|
|
for (var j = 0; j < this.ValSid.length; j++) { |
|
|
|
if (this.ValSid[j].userSid == this.dataListOne[i].userSid) { |
|
|
|
this.dataListOne.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// this.forList() |
|
|
|
// this.estimate() |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: '请选择待选的数据', |
|
|
|
type: 'warning' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 点击关联 |
|
|
|
getRelevance() { |
|
|
|
if (this.ValSids[0]) { |
|
|
|
let arrLists = this.ValSids |
|
|
|
let arr = [] |
|
|
|
for (var i = 0; i < arrLists.length; i++) { |
|
|
|
let orgnames = this.$refs.tree.getNode(arrLists[i]).parent.data.name |
|
|
|
let bb = { |
|
|
|
name: arrLists[i].name, |
|
|
|
orgName: orgnames, |
|
|
|
userSid: arrLists[i].sid |
|
|
|
} |
|
|
|
arr.push(bb) |
|
|
|
} |
|
|
|
this.dataListOne = arr |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: '请选择要改变的关联在点击', |
|
|
|
type: 'warning' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
forList() { |
|
|
|
// let vals = this.dataListOne |
|
|
|
// let arrSids = [] |
|
|
|
// for (let i = 0; i < vals.length; i++) { |
|
|
|
// arrSids.push(vals[i].userSid) |
|
|
|
// } |
|
|
|
// this.uploadData.users = arrSids |
|
|
|
}, |
|
|
|
getPurchaseList() { |
|
|
|
this.forList() |
|
|
|
req.userprojectSave(this.uploadData).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
type: 'success', |
|
|
|
message: res.msg |
|
|
|
}) |
|
|
|
this.clearList() |
|
|
|
this.loadList() |
|
|
|
message: '保存成功', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getCancel() { |
|
|
|
this.clearList() |
|
|
|
this.loadList() |
|
|
|
// this.$nextTick(()=>{ |
|
|
|
// this.$refs.multipleTab.setCurrentRow(this.baseDataList[0]) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleNodeClick(val, num) { |
|
|
|
let checkdata = this.$refs.tree.getCheckedNodes() |
|
|
|
let arr = [] |
|
|
|
for (let i = 0; i < checkdata.length; i++) { |
|
|
|
arr.push(checkdata[i]) |
|
|
|
} |
|
|
|
this.removeByvalue(arr, undefined) |
|
|
|
this.ValSids = arr |
|
|
|
}, |
|
|
|
// 过滤多于数据 |
|
|
|
removeByvalue(arr, val) { |
|
|
|
for (var i = 0; i < arr.length; i++) { |
|
|
|
if (arr[i] == val) { |
|
|
|
arr.splice(i, 1) |
|
|
|
break |
|
|
|
} |
|
|
|
|
|
|
|
console.log("aaaaaaaaaa", val) |
|
|
|
|
|
|
|
|
|
|
|
console.log("aaaaaaaaaa", num) |
|
|
|
|
|
|
|
var userProjectSid = val.userProjectSid |
|
|
|
|
|
|
|
if (userProjectSid) { |
|
|
|
this.uploadData.userProjectSid = userProjectSid |
|
|
|
req.templateMessage(userProjectSid).then(res => { |
|
|
|
if (res.success) { |
|
|
|
this.sysorganList2 = res.data |
|
|
|
//this.Array为数组名 |
|
|
|
this.sysorganList2.forEach(item => { |
|
|
|
|
|
|
|
this.$set(item, 'Show', true) |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
estimate() { |
|
|
|
let allParentId = [] |
|
|
|
this.sysorganList.forEach(ele => allParentId.push(ele.sid)) |
|
|
|
//要勾选的节点id列表,数据应该来自后台 |
|
|
|
let checkedKeyArray = this.uploadData.users |
|
|
|
//只需要叶子节点的id |
|
|
|
let children = checkedKeyArray.filter(menuId => !allParentId.includes(menuId)); |
|
|
|
this.$refs.tree.setCheckedKeys(children) |
|
|
|
|
|
|
|
}, |
|
|
|
doClose() { |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
@ -507,6 +436,18 @@ |
|
|
|
display: none; |
|
|
|
} |
|
|
|
|
|
|
|
// 设置节点高度 |
|
|
|
::v-deep .el-tree-node__content { |
|
|
|
height: 35px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .title { |
|
|
|
font-size: 18px; |
|
|
|
color: #000; |
|
|
|
font-weight: 600; |
|
|
|
font-family: sans-serif; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-checkbox__label { |
|
|
|
width: 100%; |
|
|
|
overflow: hidden; |
|
|
@ -515,13 +456,18 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.main-content { |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
|
|
|
|
.mid { |
|
|
|
width: 100%; |
|
|
|
height: 540px; |
|
|
|
margin-top: 30px; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
|
|
|
|
.item { |
|
|
|
float: left; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
.listtop { |
|
|
|
display: flex; |
|
|
@ -532,6 +478,16 @@ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.org-tree { |
|
|
|
width: 100%; |
|
|
|
height: 450px; |
|
|
|
box-sizing: border-box; |
|
|
|
/*padding-right: 10px;*/ |
|
|
|
border: 1px solid #edf1f7; |
|
|
|
overflow: scroll; |
|
|
|
overflow-x: hidden; |
|
|
|
} |
|
|
|
|
|
|
|
.itemlay { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|