Browse Source

2023-11-7

master
guoxing 2 years ago
parent
commit
87b6892d39
  1. 2
      supervise-crm-ui/.env.development
  2. BIN
      supervise-crm-ui/public/image/link.png
  3. BIN
      supervise-crm-ui/public/image/unlink.png
  4. 6
      supervise-crm-ui/src/main.js
  5. 172
      supervise-crm-ui/src/views/WechatPush/index.vue
  6. 42
      supervise-crm-ui/src/views/projectSet/WechatPush/index.vue
  7. 83
      supervise-crm-ui/src/views/projectSet/projectStaff/index.vue
  8. 86
      supervise-crm-ui/src/views/projectStaff/index.vue
  9. 23
      supervise-report-ui/src/main.js

2
supervise-crm-ui/.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api' VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址 ## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://192.168.1.103:7004" VUE_APP_URL = "http://192.168.1.104:7004"
##VUE_APP_URL = "http://8.130.39.13:8112" ##VUE_APP_URL = "http://8.130.39.13:8112"

BIN
supervise-crm-ui/public/image/link.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
supervise-crm-ui/public/image/unlink.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

6
supervise-crm-ui/src/main.js

@ -50,9 +50,9 @@ VueAMap.initAMapApiLoader({
Vue.config.productionTip = false Vue.config.productionTip = false
let token = null // let token = null
// let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTkzNDQ4OTZ9.R2iCiCKfnz2b66b7uv_5CQg5URPe5AvQLlE59mITUu0' let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTk0MDQxNTl9.9Qd_4J137TADwjJragatzBVBXl79HgjmGP_GZeXCLQQ'
token = GetQueryString('token') // token = GetQueryString('token')
if (token) { if (token) {
console.log('token》》》》》',token) console.log('token》》》》》',token)
setStorage(token) setStorage(token)

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

@ -16,83 +16,67 @@
<el-col :span="8" class="item" style="margin-left: 50px;"> <el-col :span="8" class="item" style="margin-left: 50px;">
<div class="listtop" style="width: 100%"> <div class="listtop" style="width: 100%">
<div class="tit">关联人员</div> <div class="tit">关联人员</div>
<div <!-- <div
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;">
<img src="../../../public/image/association.png" style="width: 35px;height: 25px; margin-right: 10px;" /> <img src="../../../public/image/association.png"
style="width: 35px;height: 25px; margin-right: 10px;" />
<span> 为已绑定微信公众号人员</span> <span> 为已绑定微信公众号人员</span>
</div> </div> -->
</div> </div>
<div class="org-tree"> <div class="org-tree">
<el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly <el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly
:default-checked-keys="uploadData.users" :default-checked-keys="uploadData.users" :default-expand-all="true"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expanded-keys="defaultExpandedKeys" @node-click="handleNodeClick">
@node-click="handleNodeClick">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"> style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;">
<div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div> <div :class="{ 'title': data.psid==='0' }">{{ node.label }}</div>
<div style="flex: 1;"></div> <div style="flex: 1;"></div>
<div style="margin-right: 35px;display: flex;flex-direction: row; align-items: center;"> <div style="margin-right: 15px;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="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 v-if="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 10px;">关联微信
</span> </span>
<div v-if="node.childNodes.length==0" <div v-if="node.childNodes.length==0"
style="width: 100%;display: flex;flex-direction: row;align-items: center;"> style="width: 100%;display: flex;flex-direction: row;align-items: center;">
<div></div> <img v-if="data.isOpenId=='2'" src="../../../public/image/link.png"
<img v-if="data.isOpenId=='2'" src="../../../public/image/association.png" style="width: 35px;height: 25px;margin-right: 30px;" />
style="width: 35px;height: 25px;" /> <img v-if="data.isOpenId=='1'" src="../../../public/image/unlink.png"
<span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center; style="width: 35px;height: 25px;margin-right: 30px;" />
<!-- <span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis;">正在完善 </span> text-overflow: ellipsis;">正在完善 </span> -->
</div> </div>
</div> </div>
<!-- <span
v-if="node.childNodes.length===0"
class="history"
@click="jumpHistory(node.data)"
>查看历史录像
</span> -->
</div> </div>
</el-tree> </el-tree>
</div> </div>
<!-- <el-table ref="multipleTable" :data="dataListOne" highlight-current-row border max-height="500px" </el-col>
style="width: 400px;height: 500px;" @row-click="singleElection2" tooltip-effect="dark"
:row-style="{height:'50px'}">
<el-col :span="8" class="item" style="margin-left: 50px;width:700px;">
<div class="listtop">
<el-table-column label="ID" align="center">
<template slot-scope="scope">
<div <div
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> style="display: flex;flex-direction: row;align-items: center; height: 50px;padding: 10px;margin-left: -10px;">
<span>{{scope.row.name}}</span> <el-checkbox style="zoom: 150%;" :value="Wxstate" v-model="Wxstate" @change="Wxtitlecheckbox($event)"></el-checkbox>
<img src="../../../public/image/association.png" style="width: 45px;height: 35px;" <div class="tit" style="margin-left: 10px;">微信推送设置</div>
v-show="scope.row.isOpenId=='2'" /> <span style="margin-left: 5px;">{{Wxtitle}}</span>
</div> </div>
</template>
</el-table-column>
<el-table-column prop="orgName" label="单位" align="center" />
</el-table> -->
</el-col>
<el-col :span="8" class="item" style="margin-left: 50px;width:700px;">
<div class="listtop">
<div class="tit">微信推送</div>
<div> <div>
<span <span
style="color: #fff;background: #018AD2; font-size: 16px; 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> @click="saveData()" v-show="sysorganList2.length>0">保存</span>
</div> </div>
</div> </div>
@ -201,6 +185,9 @@
ValSids: [], ValSids: [],
sysorganList: [], sysorganList: [],
sysorganList2: [], sysorganList2: [],
defaultExpandedKeys: [], //
Wxtitle: '',
Wxstate: false
} }
}, },
watch: { watch: {
@ -238,12 +225,24 @@
} }
}, },
loadList() { loadList() {
req.projectinformation().then(res => { req.projectinformation().then(resp => {
if (res.success) { if (resp.success) {
this.formobj = res.data this.formobj = resp.data
console.log("projectinformation", resp.data)
req.associationUserList(res.data[0].sid).then(res => { req.associationUserList(resp.data[0].sid).then(res => {
console.log("associationUserList", res.data)
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys.push(channel.sid)
})
})
console.log("sysorganList", this.sysorganList)
// this.uploadData.userProjectSid = res.data[0].sid // this.uploadData.userProjectSid = res.data[0].sid
// req.templateMessage(this.dataListOne[0].sid).then(res => { // req.templateMessage(this.dataListOne[0].sid).then(res => {
@ -267,25 +266,40 @@
}, },
singleElection(row) { singleElection(row) {
console.log("aaaaaaaaaa", row) console.log("aaaaaaaaaa", row)
this.uploadData.userProjectSid = row.sid this.Wxtitle =''
this.Wxstate=false
this.sysorganList2=[]
req.associationUserList(row.sid).then(res => { req.associationUserList(row.sid).then(res => {
console.log("associationUserList", row.data)
this.sysorganList = res.data this.sysorganList = res.data
this.sysorganList2 = []
this.defaultExpandedKeys = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys.push(channel.sid)
})
})
console.log("sysorganList", this.sysorganList)
// this.uploadData.userProjectSid = res.data[0].sid // this.uploadData.userProjectSid = res.data[0].sid
// req.templateMessage(this.dataListOne[0].sid).then(res => { // req.templateMessage(res.data[0].sid).then(res => {
// if (res.success) { // if (res.success) {
// this.sysorganList = res.data // this.sysorganList2 = res.data
// //this.Array // //this.Array
// this.sysorganList.forEach(item => { // this.sysorganList2.forEach(item => {
// this.$set(item, 'Show', true) // this.$set(item, 'Show', true)
// })
// })
// } // }
// }) // })
}) })
}, },
singleElection2(row) { singleElection2(row) {
@ -299,7 +313,13 @@
this.$set(item, 'Show', true) this.$set(item, 'Show', true)
if (item.state == '2') {
count++
}
}) })
this.Wxstate = count == this.sysorganList2.length
} }
}) })
@ -318,12 +338,24 @@
item.Show = !item.Show item.Show = !item.Show
console.log("aaaaaaaaaa", item) console.log("aaaaaaaaaa", item)
}, },
titlecheckbox(id, info) { Wxtitlecheckbox(checked) {
console.log("aaaaaaaaaa", id) console.log("Wxtitlecheckbox", checked)
console.log("aaaaaaaaaa", info)
this.sysorganList2.forEach(item => {
this.$set(item, 'state', checked ? "2" : '1')
item.list.forEach(item => {
this.$set(item, 'state', checked ? "2" : '1')
})
})
},
titlecheckbox(id, info) {
console.log("aaaaaaaaaa", id)
console.log("aaaaaaaaaa", info)
const item = this.sysorganList2.find((item => item.id == id)) const item = this.sysorganList2.find((item => item.id == id))
@ -335,8 +367,17 @@
}) })
var count = 0
this.sysorganList2.forEach(item => {
console.log("aaaaaaaaaa", item) if (item.state == '2') {
count++
}
})
console.log("count", count)
this.Wxstate = count == this.sysorganList2.length
}, },
@ -363,6 +404,20 @@
console.log("aaaaaaaaaa", newList.length) console.log("aaaaaaaaaa", newList.length)
this.sysorganList2[index].state = count == newList.length ? "2" : "1" this.sysorganList2[index].state = count == newList.length ? "2" : "1"
var count2 = 0
this.sysorganList2.forEach(item => {
if (item.state == '2') {
count2++
}
})
console.log("count", count)
this.Wxstate = count2 == this.sysorganList2.length
}, },
saveData() { saveData() {
@ -400,6 +455,8 @@
console.log("aaaaaaaaaa", val) console.log("aaaaaaaaaa", val)
this.Wxtitle = " - " + val.name+" - " + val.orgAllName
console.log("aaaaaaaaaa", num) console.log("aaaaaaaaaa", num)
@ -410,12 +467,23 @@
req.templateMessage(userProjectSid).then(res => { req.templateMessage(userProjectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
var count = 0
//this.Array //this.Array
this.sysorganList2.forEach(item => { this.sysorganList2.forEach(item => {
this.$set(item, 'Show', true) this.$set(item, 'Show', true)
if (item.state == '2') {
count++
}
}) })
console.log("count", count)
this.Wxstate = count == this.sysorganList2.length
} }
}) })
} }

42
supervise-crm-ui/src/views/projectSet/WechatPush/index.vue

@ -18,7 +18,8 @@
<div class="tit">关联人员</div> <div class="tit">关联人员</div>
<div <div
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;"> style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;">
<img src="../../../../public/image/association.png" style="width: 35px;height: 25px; margin-right: 10px;" /> <img src="../../../../public/image/association.png"
style="width: 35px;height: 25px; margin-right: 10px;" />
<span> 为已绑定微信公众号人员</span> <span> 为已绑定微信公众号人员</span>
</div> </div>
@ -26,9 +27,8 @@
<div class="org-tree"> <div class="org-tree">
<el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly <el-tree :data="sysorganList" node-key="sid" :props="props" ref="tree" highlight-current check-strictly
:default-checked-keys="uploadData.users" :default-checked-keys="uploadData.users" :default-expand-all="true"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expanded-keys="defaultExpandedKeys" @node-click="handleNodeClick">
@node-click="handleNodeClick">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"> style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;">
@ -39,13 +39,14 @@
<!-- <span v-if="node.childNodes.length!=0" :class="{ 'title': data.psid==='0' }">[ {{ node.childNodes.length}} ]</span> --> <!-- <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 v-if="data.psid==='0'" :class="{ 'title': data.psid==='0' }" style="margin-right: 20px;">关联微信
</span> </span>
<div v-if="node.childNodes.length==0" <div v-if="node.childNodes.length==0"
style="width: 100%;display: flex;flex-direction: row;align-items: center;"> style="width: 100%;display: flex;flex-direction: row;align-items: center;">
<div></div> <div></div>
<img v-if="data.isOpenId=='2'" src="../../../../public/image/association.png" style="width: 35px;height: 25px;" /> <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; <span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis;">正在完善 </span> text-overflow: ellipsis;">正在完善 </span>
@ -200,6 +201,7 @@
ValSids: [], ValSids: [],
sysorganList: [], sysorganList: [],
sysorganList2: [], sysorganList2: [],
defaultExpandedKeys: [] //
} }
}, },
watch: { watch: {
@ -243,6 +245,16 @@
req.associationUserList(res.data[0].sid).then(res => { req.associationUserList(res.data[0].sid).then(res => {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys.push(channel.sid)
})
})
console.log("sysorganList", this.sysorganList)
// this.uploadData.userProjectSid = res.data[0].sid // this.uploadData.userProjectSid = res.data[0].sid
// req.templateMessage(this.dataListOne[0].sid).then(res => { // req.templateMessage(this.dataListOne[0].sid).then(res => {
@ -266,25 +278,35 @@
}, },
singleElection(row) { singleElection(row) {
console.log("aaaaaaaaaa", row) console.log("aaaaaaaaaa", row)
this.uploadData.userProjectSid = row.sid
req.associationUserList(row.sid).then(res => { req.associationUserList(row.sid).then(res => {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys.push(channel.sid)
})
})
console.log("sysorganList", this.sysorganList)
this.uploadData.userProjectSid = res.data[0].sid this.uploadData.userProjectSid = res.data[0].sid
req.templateMessage(this.dataListOne[0].sid).then(res => { req.templateMessage(this.dataListOne[0].sid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList2 = res.data
//this.Array //this.Array
this.sysorganList.forEach(item => { this.sysorganList2.forEach(item => {
this.$set(item, 'Show', true) this.$set(item, 'Show', true)
})
})
} }
}) })
}) })
}, },
singleElection2(row) { singleElection2(row) {

83
supervise-crm-ui/src/views/projectSet/projectStaff/index.vue

@ -30,7 +30,8 @@
<div class="org-tree"> <div class="org-tree">
<el-tree :data="sysorganList" show-checkbox node-key="sid" :props="props" ref="tree" highlight-current <el-tree :data="sysorganList" show-checkbox node-key="sid" :props="props" ref="tree" highlight-current
check-strictly :default-checked-keys="uploadData.users" check-strictly :default-checked-keys="uploadData.users"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys1"
@check="handleNodeClick1"> @check="handleNodeClick1">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
@ -51,7 +52,7 @@
<div class="org-tree"> <div class="org-tree">
<eltree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current <eltree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current
check-strictly :default-checked-keys="uploadData.users" check-strictly :default-checked-keys="uploadData.users"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expanded-keys="defaultExpandedKeys2"
@check="handleNodeClick2"> @check="handleNodeClick2">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;" style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"
@ -131,6 +132,8 @@
ValSids: [], ValSids: [],
sysorganList: [], sysorganList: [],
sysorganList2: [], sysorganList2: [],
defaultExpandedKeys1:[],
defaultExpandedKeys2:[]
} }
}, },
watch: { watch: {
@ -174,11 +177,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
} }
@ -190,14 +211,38 @@
this.uploadData.projectSid = row.sid this.uploadData.projectSid = row.sid
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.$refs.tree.setCheckedKeys([]);
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
this.$nextTick(() => {
this.$refs['tree'].setCheckedKeys([])
this.$refs['tree2'].setCheckedKeys([])
});
}, },
handleNodeClick1(val, num) { handleNodeClick1(val, num) {
@ -221,11 +266,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
@ -263,6 +326,14 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
@ -271,6 +342,14 @@
this.sysorganList2 = [] this.sysorganList2 = []
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
} }

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

@ -30,7 +30,8 @@
<div class="org-tree"> <div class="org-tree">
<el-tree :data="sysorganList" show-checkbox node-key="sid" :props="props" ref="tree" highlight-current <el-tree :data="sysorganList" show-checkbox node-key="sid" :props="props" ref="tree" highlight-current
check-strictly :default-checked-keys="uploadData.users" check-strictly :default-checked-keys="uploadData.users"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys1"
@check="handleNodeClick1"> @check="handleNodeClick1">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
@ -51,7 +52,8 @@
<div class="org-tree"> <div class="org-tree">
<eltree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current <eltree :data="sysorganList2" show-checkbox node-key="sid" :props="props" ref="tree2" highlight-current
check-strictly :default-checked-keys="uploadData.users" check-strictly :default-checked-keys="uploadData.users"
:default-expanded-keys="['2','fd6435f2-0005-11ec-a033-48452053aa33','3042d730-64e8-4e34-b08a-44adca4da3a5']" :default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys2"
@check="handleNodeClick2"> @check="handleNodeClick2">
<div class="custom-tree-node" slot-scope="{ node, data }" <div class="custom-tree-node" slot-scope="{ node, data }"
style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;" style=" width: 100%;display: flex;flex-direction: row; align-items: center;flex-shrink: 1;"
@ -76,7 +78,7 @@
</template> </template>
<script> <script>
import eltree from '../../utils/tree/src/tree.vue' import eltree from '@/utils/tree/src/tree.vue'
import req from '@/api/projectStaff/index' import req from '@/api/projectStaff/index'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
@ -131,6 +133,8 @@
ValSids: [], ValSids: [],
sysorganList: [], sysorganList: [],
sysorganList2: [], sysorganList2: [],
defaultExpandedKeys1:[],
defaultExpandedKeys2:[]
} }
}, },
watch: { watch: {
@ -174,11 +178,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
} }
@ -190,14 +212,38 @@
this.uploadData.projectSid = row.sid this.uploadData.projectSid = row.sid
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.$refs.tree.setCheckedKeys([]);
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
this.$nextTick(() => {
this.$refs['tree'].setCheckedKeys([])
this.$refs['tree2'].setCheckedKeys([])
});
}, },
handleNodeClick1(val, num) { handleNodeClick1(val, num) {
@ -221,11 +267,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
@ -263,6 +327,14 @@
req.associationUserList(this.uploadData.projectSid).then(res => { req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) { if (res.success) {
this.sysorganList = res.data this.sysorganList = res.data
this.defaultExpandedKeys1 = []
this.sysorganList.forEach(item => {
this.defaultExpandedKeys1.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys1.push(channel.sid)
})
})
} }
}) })
req.sysorganization(this.uploadData.projectSid).then(res => { req.sysorganization(this.uploadData.projectSid).then(res => {
@ -271,6 +343,14 @@
this.sysorganList2 = [] this.sysorganList2 = []
this.sysorganList2 = res.data this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
} }
}) })
} }

23
supervise-report-ui/src/main.js

@ -16,7 +16,11 @@ import eimage from '@/components/E-image/index.vue'
import moment from 'moment' import moment from 'moment'
import Print from '@/utils/print' // 引入附件的js文件 import Print from '@/utils/print' // 引入附件的js文件
import request from '@/utils/request' import request from '@/utils/request'
import { setDefaultOrgPath, setDefaultOrgPathName, setStorage } from './utils/auth.js' import {
setDefaultOrgPath,
setDefaultOrgPathName,
setStorage
} from './utils/auth.js'
import VueAMap from 'vue-amap' import VueAMap from 'vue-amap'
Vue.use(ElementUI) Vue.use(ElementUI)
@ -36,7 +40,9 @@ Vue.use(Print) // 注册
Vue.use(VueAMap) Vue.use(VueAMap)
VueAMap.initAMapApiLoader({ VueAMap.initAMapApiLoader({
key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请 key: 'ccda12d8bffc72e9f1a32c599323a876', // 此处的key,在高德开放平台申请
plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'], // 此处的插件按需添加 plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation',
'AMap.Geocoder'
], // 此处的插件按需添加
v: '1.4.4', v: '1.4.4',
uiVersion: '1.0' uiVersion: '1.0'
}) })
@ -49,8 +55,8 @@ token = GetQueryString('token')
if (token) { if (token) {
setStorage(token) setStorage(token)
const href = window.location.href const href = window.location.href
// href = href.split(`token=${token}`)[0] // href = href.split(`token=${token}`)[0]
// window.location.href = href.slice(0, href.length - 1) // window.location.href = href.slice(0, href.length - 1)
} }
var one = window.location.href.indexOf('&organizationData') + 18 var one = window.location.href.indexOf('&organizationData') + 18
@ -66,7 +72,7 @@ if (parseInt(one) > 18) {
// 获取登录用户信息 // 获取登录用户信息
function getUserInfo() { function getUserInfo() {
console.log('2222') console.log('2222')
return request({ return request({
url: '/v1/sysuser/loginDetails', url: '/v1/sysuser/loginDetails',
method: 'post', method: 'post',
@ -75,7 +81,7 @@ console.log('2222')
} }
}).then(rep => { }).then(rep => {
const data = rep.data const data = rep.data
console.log('xxxxx') console.log('xxxxx')
const user = { const user = {
roleSid: data.roleSid, roleSid: data.roleSid,
name: data.name, name: data.name,
@ -113,9 +119,12 @@ console.log('xxxxx')
} }
getUserInfo() getUserInfo()
function GetQueryString(name) { function GetQueryString(name) {
var one = window.location.href.indexOf('?token=') + 7 var one = window.location.href.indexOf('?token=') + 7
if (one < 7) { return null } if (one < 7) {
return null
}
var two = window.location.href.lastIndexOf('&') // + 1 var two = window.location.href.lastIndexOf('&') // + 1
var data = window.location.href.substr(one) var data = window.location.href.substr(one)
if (two > one) { if (two > one) {

Loading…
Cancel
Save