-
+
+
+
-
+
+
+
+
{{ node.label }}
+
+
+
+
+
+
+
微信名称
+
+
+
+
+

+
正在完善
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
{{item.name}}
- 展开
- 收起
@@ -96,8 +138,8 @@
-
-
+
+
@@ -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;
diff --git a/supervise-crm-ui/src/views/projectStaff/index.vue b/supervise-crm-ui/src/views/projectStaff/index.vue
index e5078c21..2b49e0c2 100644
--- a/supervise-crm-ui/src/views/projectStaff/index.vue
+++ b/supervise-crm-ui/src/views/projectStaff/index.vue
@@ -1,67 +1,75 @@
-
-
-
-
-
-
-
-
-
- {{''}}
-
-
-
+
+
-
+
+
-
-
- 项目关联人员
-
-
-
+
+
+ 关联人员
+
+
+
+
+
+
-
+
- 待选人员
-
-
-
-
+ 未关联人员
+
+
+
-
-
- 保存
- 取消
-
-
-
+
+
+
@@ -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
{
+ 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 {
+ 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{
+ // 点击取消关联
+ 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 {
+ 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)
}
}
}
\ No newline at end of file
+ }
+