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. 178
      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. 112
      supervise-crm-ui/src/views/projectStaff/index.vue
  9. 25
      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_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"

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
let token = null
// let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTkzNDQ4OTZ9.R2iCiCKfnz2b66b7uv_5CQg5URPe5AvQLlE59mITUu0'
token = GetQueryString('token')
// let token = null
let token ='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTm8iOiI4NWUwYWY0Yi1lMGJhLTQyM2UtOTIxMS1kYjI2MDg2NTgwM2YiLCJpc3MiOiJXQksiLCJleHAiOjE2OTk0MDQxNTl9.9Qd_4J137TADwjJragatzBVBXl79HgjmGP_GZeXCLQQ'
// token = GetQueryString('token')
if (token) {
console.log('token》》》》》',token)
setStorage(token)

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

@ -16,83 +16,67 @@
<el-col :span="8" class="item" style="margin-left: 50px;">
<div class="listtop" style="width: 100%">
<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;">
<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>
</div>
</div> -->
</div>
<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">
:default-checked-keys="uploadData.users" :default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys" @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;">
<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="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>
<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;
<img v-if="data.isOpenId=='2'" src="../../../public/image/link.png"
style="width: 35px;height: 25px;margin-right: 30px;" />
<img v-if="data.isOpenId=='1'" src="../../../public/image/unlink.png"
style="width: 35px;height: 25px;margin-right: 30px;" />
<!-- <span style="margin-left: 30px;width:100px; overflow: hidden;text-align: center;
white-space: nowrap;
text-overflow: ellipsis;">正在完善 </span>
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'}">
<el-table-column label="ID" align="center">
<template slot-scope="scope">
<div
style="display: flex;flex-direction: row; align-items: center; justify-content: space-between;padding-left: 20px;padding-right: 20px;">
<span>{{scope.row.name}}</span>
<img src="../../../public/image/association.png" style="width: 45px;height: 35px;"
v-show="scope.row.isOpenId=='2'" />
</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
style="display: flex;flex-direction: row;align-items: center; height: 50px;padding: 10px;margin-left: -10px;">
<el-checkbox style="zoom: 150%;" :value="Wxstate" v-model="Wxstate" @change="Wxtitlecheckbox($event)"></el-checkbox>
<div class="tit" style="margin-left: 10px;">微信推送设置</div>
<span style="margin-left: 5px;">{{Wxtitle}}</span>
</div>
<div>
<span
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>
@ -201,6 +185,9 @@
ValSids: [],
sysorganList: [],
sysorganList2: [],
defaultExpandedKeys: [], //
Wxtitle: '',
Wxstate: false
}
},
watch: {
@ -238,12 +225,24 @@
}
},
loadList() {
req.projectinformation().then(res => {
if (res.success) {
this.formobj = res.data
req.projectinformation().then(resp => {
if (resp.success) {
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.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
// req.templateMessage(this.dataListOne[0].sid).then(res => {
@ -266,26 +265,41 @@
},
singleElection(row) {
console.log("aaaaaaaaaa", row)
this.uploadData.userProjectSid = row.sid
console.log("aaaaaaaaaa", row)
this.Wxtitle =''
this.Wxstate=false
this.sysorganList2=[]
req.associationUserList(row.sid).then(res => {
console.log("associationUserList", row.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
// req.templateMessage(this.dataListOne[0].sid).then(res => {
// req.templateMessage(res.data[0].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)
// })
// })
// }
// })
})
},
singleElection2(row) {
@ -299,7 +313,13 @@
this.$set(item, 'Show', true)
if (item.state == '2') {
count++
}
})
this.Wxstate = count == this.sysorganList2.length
}
})
@ -318,12 +338,24 @@
item.Show = !item.Show
console.log("aaaaaaaaaa", item)
},
titlecheckbox(id, info) {
console.log("aaaaaaaaaa", id)
console.log("aaaaaaaaaa", info)
Wxtitlecheckbox(checked) {
console.log("Wxtitlecheckbox", checked)
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))
@ -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)
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() {
@ -400,6 +455,8 @@
console.log("aaaaaaaaaa", val)
this.Wxtitle = " - " + val.name+" - " + val.orgAllName
console.log("aaaaaaaaaa", num)
@ -410,12 +467,23 @@
req.templateMessage(userProjectSid).then(res => {
if (res.success) {
this.sysorganList2 = res.data
var count = 0
//this.Array
this.sysorganList2.forEach(item => {
this.$set(item, 'Show', true)
if (item.state == '2') {
count++
}
})
console.log("count", count)
this.Wxstate = count == this.sysorganList2.length
}
})
}
@ -511,4 +579,4 @@
::v-deep .el-collapse-item__content {
padding-bottom: 0;
}
</style>
</style>

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

@ -18,7 +18,8 @@
<div class="tit">关联人员</div>
<div
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>
</div>
@ -26,9 +27,8 @@
<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">
:default-checked-keys="uploadData.users" :default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys" @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;">
@ -39,13 +39,14 @@
<!-- <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>
<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;" />
<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>
@ -200,6 +201,7 @@
ValSids: [],
sysorganList: [],
sysorganList2: [],
defaultExpandedKeys: [] //
}
},
watch: {
@ -243,6 +245,16 @@
req.associationUserList(res.data[0].sid).then(res => {
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
// req.templateMessage(this.dataListOne[0].sid).then(res => {
@ -266,25 +278,35 @@
},
singleElection(row) {
console.log("aaaaaaaaaa", row)
this.uploadData.userProjectSid = row.sid
req.associationUserList(row.sid).then(res => {
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
req.templateMessage(this.dataListOne[0].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)
})
})
}
})
})
},
singleElection2(row) {

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

@ -30,7 +30,8 @@
<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']"
:default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys1"
@check="handleNodeClick1">
<div class="custom-tree-node" slot-scope="{ node, data }"
@ -51,7 +52,7 @@
<div class="org-tree">
<eltree :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']"
:default-expanded-keys="defaultExpandedKeys2"
@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;"
@ -131,6 +132,8 @@
ValSids: [],
sysorganList: [],
sysorganList2: [],
defaultExpandedKeys1:[],
defaultExpandedKeys2:[]
}
},
watch: {
@ -174,11 +177,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
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 => {
if (res.success) {
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
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.$refs.tree.setCheckedKeys([]);
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 => {
if (res.success) {
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) {
@ -221,11 +266,29 @@
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
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 => {
if (res.success) {
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 => {
if (res.success) {
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 => {
@ -271,6 +342,14 @@
this.sysorganList2 = []
this.sysorganList2 = res.data
this.defaultExpandedKeys2 = []
this.sysorganList2.forEach(item => {
this.defaultExpandedKeys2.push(item.sid)
item.children.forEach(channel => {
this.defaultExpandedKeys2.push(channel.sid)
})
})
}
})
}

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

@ -29,8 +29,9 @@
<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-strictly :default-checked-keys="uploadData.users"
:default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys1"
@check="handleNodeClick1">
<div class="custom-tree-node" slot-scope="{ node, data }"
@ -50,8 +51,9 @@
</div>
<div class="org-tree">
<eltree :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-strictly :default-checked-keys="uploadData.users"
:default-expand-all="true"
:default-expanded-keys="defaultExpandedKeys2"
@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;"
@ -76,7 +78,7 @@
</template>
<script>
import eltree from '../../utils/tree/src/tree.vue'
import eltree from '@/utils/tree/src/tree.vue'
import req from '@/api/projectStaff/index'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
@ -130,7 +132,9 @@
ValSid: [],
ValSids: [],
sysorganList: [],
sysorganList2: [],
sysorganList2: [],
defaultExpandedKeys1:[],
defaultExpandedKeys2:[]
}
},
watch: {
@ -173,12 +177,30 @@
console.log("aaaaaaaaaa", this.uploadData.projectSid)
req.associationUserList(this.uploadData.projectSid).then(res => {
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 => {
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)
})
})
}
})
}
@ -189,15 +211,39 @@
// this.clearList()
this.uploadData.projectSid = row.sid
req.associationUserList(this.uploadData.projectSid).then(res => {
if (res.success) {
this.sysorganList = res.data
if (res.success) {
this.$refs.tree.setCheckedKeys([]);
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 => {
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) {
@ -220,12 +266,30 @@
req.associationUserList(this.uploadData.projectSid).then(res => {
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 => {
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)
})
})
}
})
@ -262,14 +326,30 @@
req.associationUserList(this.uploadData.projectSid).then(res => {
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 => {
if (res.success) {
console.log("aaaaaaaaaa", res.data)
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)
})
})
}
})

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

@ -16,7 +16,11 @@ import eimage from '@/components/E-image/index.vue'
import moment from 'moment'
import Print from '@/utils/print' // 引入附件的js文件
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'
Vue.use(ElementUI)
@ -36,7 +40,9 @@ Vue.use(Print) // 注册
Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
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',
uiVersion: '1.0'
})
@ -49,8 +55,8 @@ token = GetQueryString('token')
if (token) {
setStorage(token)
const href = window.location.href
// href = href.split(`token=${token}`)[0]
// window.location.href = href.slice(0, href.length - 1)
// href = href.split(`token=${token}`)[0]
// window.location.href = href.slice(0, href.length - 1)
}
var one = window.location.href.indexOf('&organizationData') + 18
@ -66,7 +72,7 @@ if (parseInt(one) > 18) {
// 获取登录用户信息
function getUserInfo() {
console.log('2222')
console.log('2222')
return request({
url: '/v1/sysuser/loginDetails',
method: 'post',
@ -75,7 +81,7 @@ console.log('2222')
}
}).then(rep => {
const data = rep.data
console.log('xxxxx')
console.log('xxxxx')
const user = {
roleSid: data.roleSid,
name: data.name,
@ -113,9 +119,12 @@ console.log('xxxxx')
}
getUserInfo()
function GetQueryString(name) {
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 data = window.location.href.substr(one)
if (two > one) {
@ -129,4 +138,4 @@ function GetQueryString(name) {
// var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
// var r = window.location.search.substr(1).match(reg)
// if (r != null) return unescape(r[2]); return null
}
}
Loading…
Cancel
Save