Browse Source

Merge remote-tracking branch 'origin/master'

master
wangpengfei 2 years ago
parent
commit
a7de8831c4
  1. 29
      supervise-crm-ui/src/api/projectStaff/index.js
  2. 332
      supervise-crm-ui/src/views/WechatPush/index.vue
  3. 607
      supervise-crm-ui/src/views/projectStaff/index.vue

29
supervise-crm-ui/src/api/projectStaff/index.js

@ -10,12 +10,21 @@ export default {
});
},
// 组织结构
sysorganization: function() {
sysorganization: function(sid) {
return request({
url: '/portal/v1/sysorganization/userList',
url: '/portal/v1/sysorganization/userList/'+sid,
method: 'get',
});
},
},
// 组织结构
associationUserList: function(sid) {
return request({
url: '/portal/v1/sysorganization/associationUserList/'+sid,
method: 'get',
});
},
getUserByType: function(id) {
return request({
url: '/crm/userproject/getUserByType/'+ id,
@ -27,7 +36,8 @@ export default {
url: '/crm/userproject/getUserProjectBySid/'+ sid,
method: 'get'
})
},
},
// 人员关联项目
userprojectSave: function(data) {
return request({
url: '/crm/userproject/save',
@ -35,6 +45,15 @@ export default {
data: data
});
},
// 人员取消关联项目
usercancellation: function(data) {
return request({
url: '/crm/userproject/cancellation',
method: 'post',
data: data
});
},
// 消息模版
templateMessage: function(sid) {
@ -53,5 +72,5 @@ export default {
data: data
});
},
}

332
supervise-crm-ui/src/views/WechatPush/index.vue

@ -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;

607
supervise-crm-ui/src/views/projectStaff/index.vue

@ -1,67 +1,75 @@
<template>
<div class="app-container">
<button-bar ref="btnbar" view-title="设置关联人员" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="mid">
<div class="left">
<div class="listtop" style="width: 400px">
<div class="tit" >项目列表</div>
</div>
<el-table :data="formobj" border ref="multipleTab" max-height="540px" style="width: 400px" highlight-current-row
@row-click="singleElection">
<el-table-column align="center" width="55" label="选择">
<template slot-scope="scope">
<!-- 可以手动的修改label的值从而控制选择哪一项 -->
<el-radio class="radio" v-model="uploadData.projectSid" :label="scope.row.sid" style="margin-left:10px"
>{{''}}</el-radio
>
</template>
</el-table-column>
<el-table-column prop="entryName" label="项目名称" />
<button-bar ref="btnbar" view-title="设置关联人员" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<el-row class="mid">
<el-col :span="8" class="left">
<div class="listtop" style="width: 400px">
<div class="tit">项目列表</div>
</div>
<el-table :data="formobj" border ref="multipleTab" max-height="560px" style="width: 400px;font-size: 16px"
highlight-current-row @row-click="singleElection" :row-style="{height:'50px'}" :show-header="false">
<el-table-column prop="entryName" label="项目名称" />
</el-table>
</div>
<div class="rigth">
</el-col>
<el-col :span="16" class="rigth">
<div class="rihthGl">
<div class="rigthJg">
<div class="listtop" style="width: 100%">
<span>项目关联人员</span>
<button class="Waiting" @click="getWaiting">设为待选</button>
</div>
<el-table ref="multipleTable" :data="dataListOne" border max-height="340px" style="width: 350px"
@selection-change="handlChange" tooltip-effect="dark" >
<div class="rigthJg">
<div class="listtop" style="width: 100%">
<span>关联人员</span>
<button class="Waiting" @click="getWaiting">取消关联</button>
</div>
<!-- <el-table ref="multipleTable" :data="dataListOne" border max-height="440px" style="width: 450px"
@selection-change="handlChange" tooltip-effect="dark" :row-style="{height:'50px'}" >
<el-table-column type="selection" width="55" align="center"/>
<el-table-column prop="name" label="ID" align="center" />
<el-table-column prop="orgName" label="单位" align="center" />
</el-table>
</div>
</el-table> -->
<div class="org-tree">
<el-tree :data="sysorganList" show-checkbox 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']"
@check="handleNodeClick1">
<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>
</el-tree>
</div>
</div>
<div class="rigthYh">
<div class="rigthYh">
<div class="listtop" style="width: 100%">
<span>待选人员</span>
<button class="relevance" @click="getRelevance">设为关联</button>
</div>
<div class="org-tree">
<el-tree
:data="sysorganList"
show-checkbox
node-key="sid"
:props="props"
ref="tree"
highlight-current
check-strictly
:default-checked-keys="uploadData.users"
:default-expanded-keys="['fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" @check="handleNodeClick">
<span>未关联人员</span>
<button class="relevance" @click="getRelevance">关联</button>
</div>
<div class="org-tree">
<el-tree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current
check-strictly :default-checked-keys="uploadData.users"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']"
@check="handleNodeClick2">
<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>
</el-tree>
</div>
</div>
</div>
</div>
<div class="Btn">
<el-button type="primary" @click="getPurchaseList">保存</el-button>
<el-button type="primary" style="margin-left: 40px;" @click="getCancel">取消</el-button>
</div>
</div>
</div>
<!-- <div class="Btn">
<el-button type="primary" @click="getPurchaseList">保存</el-button>
<el-button type="primary" style="margin-left: 40px;" @click="getCancel">取消</el-button>
</div> -->
</el-col>
</el-row>
</div>
</div>
</template>
@ -85,21 +93,21 @@
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
formobj:[],
formobj: [],
dataListOne: [],
props: {
label: 'name',
children: 'children'
},
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
sid: 'sid',
psid: "psid",
label: 'name',
children: 'children'
},
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
queryParams: {
current: 1,
size: 10,
@ -112,18 +120,26 @@
templateSelection: "",
//
checkList: [],
uploadData:{
projectSid:'',
users:[],
uploadData: {
projectSid: '',
users: [],
},
ValSid:[],
ValSids:[],
sysorganList:[],
ValSid: [],
ValSids: [],
sysorganList: [],
sysorganList2: [],
}
},
watch: {
formobj: function() {
this.$nextTick(function() {
this.$refs['multipleTab'].setCurrentRow(this.formobj[0])
})
},
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
@ -147,247 +163,264 @@
}
},
loadList() {
req.projectinformation().then(res=>{
req.projectinformation().then(res => {
if (res.success) {
this.formobj = res.data
this.uploadData.projectSid = res.data[0].sid
req.getUserProjectBySid(res.data[0].sid).then(res=>{
this.dataListOne=res.data
this.forList()
this.estimate()
})
}
})
req.sysorganization().then(res=>{
if (res.success) {
this.sysorganList = res.data
console.log("aaaaaaaaaa", this.uploadData.projectSid)
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList = res.data
}
})
req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList2 = res.data
}
})
}
})
},
clearList(){
this.ValSid=[]
this.ValSids=[]
this.dataListOne=[]
this.uploadData={
projectSid:'',
users:[],
}
})
},
singleElection(row) {
this.clearList()
this.uploadData.projectSid = row.sid
req.getUserProjectBySid(row.sid).then(res=>{
this.dataListOne=res.data
this.forList()
this.estimate()
})
},
//
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.clearList()
this.uploadData.projectSid = row.sid
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList = res.data
}
}
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)
})
req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList2 = res.data
}
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
handleNodeClick1(val, num) {
console.log("aaaaaaaaaa", val)
console.log("aaaaaaaaaa", num)
this.uploadData.users = num.checkedKeys
},
getPurchaseList(){
this.forList()
req.userprojectSave(this.uploadData).then(res=>{
//
getWaiting() {
console.log("aaaaaaaaaa", this.uploadData)
req.usercancellation(this.uploadData).then(res => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: res.msg
})
this.clearList()
this.loadList()
message: '取消关联成功',
type: 'success'
});
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList = res.data
}
})
req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList2 = res.data
}
})
}
})
this.$nextTick(() => {
this.$refs['tree'].setCheckedKeys([])
this.$refs['tree2'].setCheckedKeys([])
});
},
getCancel(){
this.clearList()
this.loadList()
// this.$nextTick(()=>{
// this.$refs.multipleTab.setCurrentRow(this.baseDataList[0])
// })
},
handlChange(val){
this.ValSid=val
},
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
handleNodeClick2(val, num) {
console.log("aaaaaaaaaa", val)
console.log("aaaaaaaaaa", num)
console.log("aaaaaaaaaa", val)
console.log("aaaaaaaaaa", num)
this.uploadData.users = num.checkedKeys
},
//
removeByvalue(arr,val){
for(var i=0;i<arr.length;i++){
if(arr[i]==val){
arr.splice(i,1)
break
//
getRelevance() {
console.log("aaaaaaaaaa", this.uploadData)
req.userprojectSave(this.uploadData).then(res => {
if (res.success) {
this.$message({
message: '关联成功',
type: 'success'
});
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList = res.data
}
})
req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) {
console.log("aaaaaaaaaa", res.data)
this.sysorganList2 = []
this.sysorganList2 = res.data
}
})
}
}
},
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)
})
this.$nextTick(() => {
this.$refs['tree'].setCheckedKeys([])
this.$refs['tree2'].setCheckedKeys([])
});
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="scss">
::v-deep .el-tree .el-tree-node .is-leaf + .el-checkbox .el-checkbox__inner{display: inline-block;}
::v-deep .el-tree .el-tree-node .el-checkbox .el-checkbox__inner{display: none;}
.main-content{
.mid{
width: 100%;
height: 540px;
margin-top: 30px;
.left{
float: left;
::v-deep .el-tree .el-tree-node .is-leaf+.el-checkbox .el-checkbox__inner {
display: inline-block;
}
::v-deep .el-tree .el-tree-node .el-checkbox .el-checkbox__inner {
display: none;
}
//
::v-deep .el-tree-node__content {
height: 35px;
}
.rigth{
float: right;
width: 63%;
height: 540px;
border: 1px solid #dfe6ec;
position: relative;
.rihthGl{
::v-deep .title {
font-size: 18px;
color: #000;
font-weight: 600;
font-family: sans-serif;
}
//
// ::v-deep .el-tree-node__expand-icon {
// position: absolute;
// right: 2%;
// }
.main-content {
.mid {
width: 100%;
height: 100%;
display: flex;
justify-content: space-around;
.rigthJg{
margin-top: 50px;
width: 350px;
.listtop{
.Waiting{
width: 75px;
height: 32px;
border: 2px solid #018ad2;
color: #018ad2;
font-size: 14px;
border-radius: 5px;
margin-right: 10px;
}
.Waiting:hover{
background-color: #fff;
}
}
}
.rigthYh{
margin-top: 50px;
width: 350px;
.org-tree{
width:100%;
max-height: 340px;
box-sizing: border-box;
/*padding-right: 10px;*/
border: 1px solid #edf1f7;
overflow: scroll;
overflow-x:hidden;
height: 540px;
margin-top: 30px;
.left {
.listtop {
display: flex;
flex-direction: row;
align-items: center;
padding-top: 25px;
padding-bottom: 25px;
}
}
.listtop{
.relevance{
width: 75px;
height: 32px;
border: 2px solid #018ad2;
color: #018ad2;
font-size: 14px;
border-radius: 5px;
margin-right: 10px;
}
.relevance:hover{
background-color: #fff;
}
.rigth {
margin-left: -50px;
height: 600px;
border: 1px solid #dfe6ec;
position: relative;
.rihthGl {
width: 100%;
height: 100%;
display: flex;
justify-content: space-around;
.rigthJg {
margin-top: 30px;
width: 450px;
.org-tree {
width: 100%;
height: 450px;
box-sizing: border-box;
/*padding-right: 10px;*/
border: 1px solid #edf1f7;
overflow: scroll;
overflow-x: hidden;
}
.listtop {
display: flex;
flex-direction: row;
align-items: center;
padding-top: 25px;
padding-bottom: 25px;
.Waiting {
padding: 5px 10px;
border: 2px solid #018ad2;
color: #018ad2;
font-size: 14px;
border-radius: 5px;
margin-right: 20px;
}
.Waiting:hover {
background-color: #fff;
}
}
}
.rigthYh {
margin-top: 30px;
width: 450px;
.org-tree {
width: 100%;
height: 450px;
box-sizing: border-box;
/*padding-right: 10px;*/
border: 1px solid #edf1f7;
overflow: scroll;
overflow-x: hidden;
}
.listtop {
display: flex;
flex-direction: row;
align-items: center;
padding-top: 25px;
padding-bottom: 25px;
.relevance {
padding: 5px 10px;
border: 2px solid #018ad2;
color: #018ad2;
font-size: 14px;
border-radius: 5px;
margin-right: 20px;
}
.relevance:hover {
background-color: #fff;
}
}
}
}
.Btn {
position: absolute;
left: 45%;
top: 92%;
}
}
}
}
.Btn{
position: absolute;
left: 40%;
top: 85%;
}
}
}
}
</style>
}
</style>

Loading…
Cancel
Save