|
@@ -1,18 +1,18 @@
|
|
|
<!-- 模板区域 -->
|
|
<!-- 模板区域 -->
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <PageMain class="vh100">
|
|
|
|
|
- <el-row :gutter="20" class="vh100">
|
|
|
|
|
- <el-col :span="5" class="vh100">
|
|
|
|
|
|
|
+ <PageMain class="vh190">
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
|
+ <el-col :span="5">
|
|
|
<el-input v-model="filterText" prefix-icon="search"></el-input>
|
|
<el-input v-model="filterText" prefix-icon="search"></el-input>
|
|
|
<div class="company">
|
|
<div class="company">
|
|
|
<div class="companyItem" :class="{'active': filterIndex === index}" v-for="(item, index) in filterChange" @click="handleClick(item, index)">
|
|
<div class="companyItem" :class="{'active': filterIndex === index}" v-for="(item, index) in filterChange" @click="handleClick(item, index)">
|
|
|
- {{ item?.nameSimple }}
|
|
|
|
|
|
|
+ {{ item?.sysName }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-divider direction="vertical" class="vh100"></el-divider>
|
|
<el-divider direction="vertical" class="vh100"></el-divider>
|
|
|
- <el-col :span="18" class="vh100">
|
|
|
|
|
|
|
+ <el-col :span="18">
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="20">
|
|
<el-col :span="20">
|
|
|
<h4>租户功能配置</h4>
|
|
<h4>租户功能配置</h4>
|
|
@@ -38,8 +38,9 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
- <div v-if="functionForm.quoteCompany == 2" style="display: flex; justify-content: flex-start;">
|
|
|
|
|
- <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px;" v-for="(item, index) in companySelected">{{ item.nameSimple }}
|
|
|
|
|
|
|
+ <div v-if="functionForm.quoteCompany == 2" style="display: flex; justify-content: flex-start; flex-wrap: wrap">
|
|
|
|
|
+ <div style="display: flex; align-items: center; padding: 3px 16px; margin-right: 10px; color: #0083ff; background: #e9f4ff; border-radius: 3px; width: 240px" v-for="(item, index) in companySelected">
|
|
|
|
|
+ <span>{{ item.nameSimple }}</span>
|
|
|
<el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)"><Close /></el-icon></div>
|
|
<el-icon style=" margin-left: 20px;cursor: pointer;" @click="handleDelete(item, index)"><Close /></el-icon></div>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -152,7 +153,7 @@ import api from '@/api'
|
|
|
import companys from './modules/companySelect.vue'
|
|
import companys from './modules/companySelect.vue'
|
|
|
|
|
|
|
|
const functionRef = ref<FormInstance>()
|
|
const functionRef = ref<FormInstance>()
|
|
|
-const companyRef = ref(null)
|
|
|
|
|
|
|
+const companyRef = ref()
|
|
|
|
|
|
|
|
// 保司相关数据
|
|
// 保司相关数据
|
|
|
// 保司查询条件
|
|
// 保司查询条件
|
|
@@ -160,20 +161,26 @@ let filterText = ref('')
|
|
|
let company = ref([])
|
|
let company = ref([])
|
|
|
let filterIndex = ref(0)
|
|
let filterIndex = ref(0)
|
|
|
let companyId = ref('')
|
|
let companyId = ref('')
|
|
|
|
|
+let sysCode = ref('')
|
|
|
const filterChange = computed(() => {
|
|
const filterChange = computed(() => {
|
|
|
- return company.value.filter((a:any) => a.nameSimple.includes(filterText.value))
|
|
|
|
|
|
|
+ return company.value.filter((a:any) => a.sysCode.includes(filterText.value))
|
|
|
})
|
|
})
|
|
|
const handleClick = (item:any, index:any) => {
|
|
const handleClick = (item:any, index:any) => {
|
|
|
filterIndex.value = index
|
|
filterIndex.value = index
|
|
|
companyId.value = item.id
|
|
companyId.value = item.id
|
|
|
- console.log(11111, index)
|
|
|
|
|
|
|
+ sysCode.value = item.sysCode
|
|
|
handleCancel()
|
|
handleCancel()
|
|
|
|
|
+ initInstitution(sysCode.value)
|
|
|
}
|
|
}
|
|
|
// 保司
|
|
// 保司
|
|
|
const initCompany = () => {
|
|
const initCompany = () => {
|
|
|
- api.configurate.liveCompanyList().then((res:any) => {
|
|
|
|
|
|
|
+ api.configurate.sysList({
|
|
|
|
|
+ size: 200
|
|
|
|
|
+ }).then((res:any) => {
|
|
|
if(res.code == 200) {
|
|
if(res.code == 200) {
|
|
|
- company.value = res.data
|
|
|
|
|
|
|
+ company.value = res.data.records
|
|
|
|
|
+ sysCode.value = res.data.records[0].sysCode
|
|
|
|
|
+ initInstitution(sysCode.value)
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error(res.msg)
|
|
ElMessage.error(res.msg)
|
|
|
}
|
|
}
|
|
@@ -182,9 +189,8 @@ const initCompany = () => {
|
|
|
|
|
|
|
|
// 机构
|
|
// 机构
|
|
|
let institutionList = ref([])
|
|
let institutionList = ref([])
|
|
|
-const initInstitution = () => {
|
|
|
|
|
- let code = localStorage.getItem('login_system')
|
|
|
|
|
- api.configurate.getDeptListBySystemCode(code).then(res => {
|
|
|
|
|
|
|
+const initInstitution = (val) => {
|
|
|
|
|
+ api.configurate.getDeptListBySystemCode(val).then(res => {
|
|
|
if(res.code == 200) {
|
|
if(res.code == 200) {
|
|
|
institutionList.value = res.data
|
|
institutionList.value = res.data
|
|
|
} else {
|
|
} else {
|
|
@@ -194,10 +200,13 @@ const initInstitution = () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handleEdit = () => {
|
|
const handleEdit = () => {
|
|
|
- return api.configurate.getBusPerms({
|
|
|
|
|
- systemCode: localStorage.getItem('login_system'),
|
|
|
|
|
- companyId: companyId.value?companyId.value:filterChange.value[0].id
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ return api.configurate.getBusPerms11(
|
|
|
|
|
+ sysCode.value
|
|
|
|
|
+ // {
|
|
|
|
|
+ // // systemCode: localStorage.getItem('login_system'),
|
|
|
|
|
+ // // companyId: companyId.value?companyId.value:filterChange.value[0].id
|
|
|
|
|
+ // }
|
|
|
|
|
+ ).then(res => {
|
|
|
if(res.code == 200) {
|
|
if(res.code == 200) {
|
|
|
functionForm.value = res.data
|
|
functionForm.value = res.data
|
|
|
functionForm.value.orderAuditDeptList = functionForm.value.orderAuditDeptList[0]
|
|
functionForm.value.orderAuditDeptList = functionForm.value.orderAuditDeptList[0]
|
|
@@ -285,7 +294,7 @@ const handleCancel = () => {
|
|
|
const handleComfirm = () => {
|
|
const handleComfirm = () => {
|
|
|
let formData = {...functionForm.value}
|
|
let formData = {...functionForm.value}
|
|
|
formData.companyId = companyId.value?companyId.value:filterChange.value[0].id
|
|
formData.companyId = companyId.value?companyId.value:filterChange.value[0].id
|
|
|
- formData.systemCode = localStorage.getItem('login_system')
|
|
|
|
|
|
|
+ formData.systemCode = sysCode.value
|
|
|
if(companySelected.value.length > 0) {
|
|
if(companySelected.value.length > 0) {
|
|
|
formData.quoteCompanyList = companySelected.value.map(a => {
|
|
formData.quoteCompanyList = companySelected.value.map(a => {
|
|
|
return a.id
|
|
return a.id
|
|
@@ -308,7 +317,6 @@ const handleComfirm = () => {
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
initCompany()
|
|
initCompany()
|
|
|
- initInstitution()
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|