update
parent
9a040f9627
commit
fa7ed63104
|
|
@ -1320,6 +1320,37 @@ export async function fetchGetViewScope(params?: any){
|
||||||
return http.get(`/common/getViewScope`,{params})
|
return http.get(`/common/getViewScope`,{params})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DB添加上传/审核者 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
|
||||||
|
*/
|
||||||
|
export async function fetchdbAuthAdd(data?: any){
|
||||||
|
return http.post(`/dbAuth/add`,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DB获取上传/审核者信息 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
|
||||||
|
*/
|
||||||
|
export async function fetchdbAuthGetInfo(params?: any){
|
||||||
|
return http.get(`/dbAuth/getInfo`,{params})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* DB撤回 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
|
||||||
|
*/
|
||||||
|
export async function fetchdbWithdraw(params?: any){
|
||||||
|
return http.get(`/db/withdraw`,{params})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* DB文件审核 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
|
||||||
|
*/
|
||||||
|
export async function fetchdbReview(params?: any){
|
||||||
|
return http.get(`/db/review`,{params})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* DB审核列表分页 https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
|
||||||
|
*/
|
||||||
|
export async function fetchdbReviewFileList(params?: any){
|
||||||
|
return http.get(`/dbAuth/reviewFileList`,{params})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,9 @@ const goModeuls = (obj) => {
|
||||||
case 7:
|
case 7:
|
||||||
push({ name: "Diffspace" });
|
push({ name: "Diffspace" });
|
||||||
break;
|
break;
|
||||||
|
case 9:
|
||||||
|
push({ name: "DataBaseReview" });
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
push("/Home/intelligence");
|
push("/Home/intelligence");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -507,6 +507,11 @@ const router = createRouter({
|
||||||
name: 'DataBase',
|
name: 'DataBase',
|
||||||
component: () => import('@/views/home/database/guize/index.vue')
|
component: () => import('@/views/home/database/guize/index.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/DataBase/review',
|
||||||
|
name: 'DataBaseReview',
|
||||||
|
component: () => import('@/views/home/database/Process.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/DataBase/Modify',
|
path: '/DataBase/Modify',
|
||||||
name: 'DataBaseModify',
|
name: 'DataBaseModify',
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ const dszList = ref<any>([{}, {}, {}, {}]);
|
||||||
const dishList = ref<any>([{}, {}, {}, {}]);
|
const dishList = ref<any>([{}, {}, {}, {}]);
|
||||||
const month_1 = ref();
|
const month_1 = ref();
|
||||||
const month_2 = ref();
|
const month_2 = ref();
|
||||||
|
const month_3 = ref();
|
||||||
let now = (new Date()).getMonth() + 13;
|
let now = (new Date()).getMonth() + 13;
|
||||||
month_2.value = (now - 2) % 12;
|
month_2.value = (now - 2) % 12;
|
||||||
month_1.value = (now - 1) % 12;
|
month_1.value = (now - 1) % 12;
|
||||||
|
|
@ -48,6 +49,7 @@ const addDIS3 = ref()
|
||||||
const addDISH3 = ref()
|
const addDISH3 = ref()
|
||||||
const timeObj = ref<any>({})
|
const timeObj = ref<any>({})
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
try{
|
||||||
const { data: { ailist, culist, lastUTime },data } = await homePageMarket() //市况
|
const { data: { ailist, culist, lastUTime },data } = await homePageMarket() //市况
|
||||||
const { data: { itemList, lastUTime: _lastUTime } } = await homePageRate() //汇率
|
const { data: { itemList, lastUTime: _lastUTime } } = await homePageRate() //汇率
|
||||||
const { data: _disList } = await getHomeList({number: "DIS"}) //汇率
|
const { data: _disList } = await getHomeList({number: "DIS"}) //汇率
|
||||||
|
|
@ -72,10 +74,12 @@ onMounted(async () => {
|
||||||
itemLists.value = itemList
|
itemLists.value = itemList
|
||||||
timeA.value = lastUTime
|
timeA.value = lastUTime
|
||||||
timeB.value = _lastUTime
|
timeB.value = _lastUTime
|
||||||
|
|
||||||
disList.value = _disList
|
disList.value = _disList
|
||||||
dszList.value = _dszList
|
dszList.value = _dszList
|
||||||
dishList.value = _dishList
|
dishList.value = _dishList
|
||||||
|
month_1.value = _disList[0].monthDate?.split('-')[1]
|
||||||
|
month_2.value = _dszList[0].monthDate?.split('-')[1]
|
||||||
|
month_3.value = _dishList[0].monthDate?.split('-')[1]
|
||||||
|
|
||||||
addDIS1.value = _disList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
addDIS1.value = _disList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
||||||
const sum =parseFloat (currentValue.budget) +parseFloat(previousValue)
|
const sum =parseFloat (currentValue.budget) +parseFloat(previousValue)
|
||||||
|
|
@ -85,7 +89,6 @@ onMounted(async () => {
|
||||||
addDIS1.value -= _disList[0].budget
|
addDIS1.value -= _disList[0].budget
|
||||||
addDIS1.value >0? addDIS1.value = addDIS1.value.toFixed(2):0
|
addDIS1.value >0? addDIS1.value = addDIS1.value.toFixed(2):0
|
||||||
}
|
}
|
||||||
console.log("🚀 ~ file: Home.vue:86 ~ addDIS1:", addDIS1)
|
|
||||||
addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
||||||
const sum = parseFloat(currentValue.budget) +parseFloat(previousValue)
|
const sum = parseFloat(currentValue.budget) +parseFloat(previousValue)
|
||||||
return sum>0 ? sum.toFixed(2):0
|
return sum>0 ? sum.toFixed(2):0
|
||||||
|
|
@ -159,6 +162,9 @@ onMounted(async () => {
|
||||||
}).then(()=>{
|
}).then(()=>{
|
||||||
push({ name: 'modifys' })
|
push({ name: 'modifys' })
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
}catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
@ -363,7 +369,7 @@ function formatNumber(num = 0) {
|
||||||
<td>年初予算</td>
|
<td>年初予算</td>
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
<!-- <td>{{month_2}}月</td> -->
|
||||||
<td>改订</td>
|
<td>改订</td>
|
||||||
<td>{{month_1}}月</td>
|
<td>{{+month_1}}月</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">合计</th>
|
<th colspan="2">合计</th>
|
||||||
|
|
@ -418,7 +424,7 @@ function formatNumber(num = 0) {
|
||||||
<td>年初予算</td>
|
<td>年初予算</td>
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
<!-- <td>{{month_2}}月</td> -->
|
||||||
<td>改订</td>
|
<td>改订</td>
|
||||||
<td>{{month_1}}月</td>
|
<td>{{+month_2}}月</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">合计</th>
|
<th colspan="2">合计</th>
|
||||||
|
|
@ -473,7 +479,7 @@ function formatNumber(num = 0) {
|
||||||
<td>年初予算</td>
|
<td>年初予算</td>
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
<!-- <td>{{month_2}}月</td> -->
|
||||||
<td>改订</td>
|
<td>改订</td>
|
||||||
<td>{{month_1}}月</td>
|
<td>{{+month_3}}月</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">合计</th>
|
<th colspan="2">合计</th>
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,13 @@ import { useUserStore } from '@/stores/modules/user'
|
||||||
import { useMessage,NModal } from 'naive-ui'
|
import { useMessage,NModal } from 'naive-ui'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = ['admin','database_dandang','tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin','database_dandang','tech_service'].includes(store.user.roleCode) || !!store.user?.isDbUpload || !!store.user?.isDbReview
|
||||||
|
|
||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
const title = ref("大金集团经营理念")
|
const title = ref("大金集团经营理念")
|
||||||
|
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
cateId:String,
|
cateId: Number,
|
||||||
title:String
|
title:String
|
||||||
})
|
})
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
|
|
@ -56,16 +56,19 @@ async function getTree() {
|
||||||
// // message.error('下载文件出错:', error);
|
// // message.error('下载文件出错:', error);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
async function downloads(row) {
|
async function downloads(row:any) {
|
||||||
console.log(row)
|
console.log(row,'!!!!!!!!!!xiazai')
|
||||||
const {isSelect,filePath} = row
|
const {isSelect,filePath} = row
|
||||||
if(isSelect === 2) {
|
if(isSelect === 2) {
|
||||||
message.info("没有访问权限")
|
message.info("没有访问权限")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
try{
|
||||||
|
downloadFile(filePath)
|
||||||
|
}catch(error){
|
||||||
window.open(filePath)
|
window.open(filePath)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
const lazyState = computed(() => [pageInfo.currentPage])
|
const lazyState = computed(() => [pageInfo.currentPage])
|
||||||
watch(
|
watch(
|
||||||
() => unref(lazyState),
|
() => unref(lazyState),
|
||||||
|
|
@ -121,7 +124,22 @@ function getLastSubstring(str: string): string {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function downloadFile(url: any) {
|
||||||
|
fetch(url)
|
||||||
|
.then((response) => response.blob())
|
||||||
|
.then((blob) => {
|
||||||
|
const downloadUrl = URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = downloadUrl
|
||||||
|
link.download = getFileName(url)
|
||||||
|
link.click()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function getFileName(url: string) {
|
||||||
|
let lastSplashIndex = url.lastIndexOf('/')
|
||||||
|
let lastDotIndex = url.lastIndexOf('.')
|
||||||
|
return url.slice(lastSplashIndex + 1, lastDotIndex)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -1,106 +1,254 @@
|
||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<DataBaseHead />
|
<DataBaseHead />
|
||||||
<div class="w-full h-1px bg-#507FFD mt50px rd-b-20px"></div>
|
<div class="w-full h-1px bg-#507FFD mt50px rd-b-20px"></div>
|
||||||
<div class="bg-#fff rd-15px px30px pt30px w-full h920px">
|
<div class="bg-#fff rd-15px px30px pt30px w-full h920px">
|
||||||
|
|
||||||
<el-tabs v-model="activeName" class="demo-tabs">
|
<el-tabs v-model="activeName" class="demo-tabs">
|
||||||
<div class="float-right px20px py10px z-200 bg-#f5f5f5" @click="goBacks"> <el-icon class="text-red"><ArrowLeftBold size="18"/></el-icon> 返回</div>
|
<div class="absolute z-200 right-0 flex items-center">
|
||||||
|
<el-button
|
||||||
|
v-if="hasReview || hasUpload"
|
||||||
|
type="warning"
|
||||||
|
@click="handleClick"
|
||||||
|
>
|
||||||
|
审批流程
|
||||||
|
</el-button>
|
||||||
|
<div
|
||||||
|
class="rounded-md ml-50px px20px py10px z-200 bg-#f5f5f5 flex items-center justify-center w-100px"
|
||||||
|
@click="goBacks"
|
||||||
|
>
|
||||||
|
<el-icon class="text-red"><ArrowLeftBold size="18" /></el-icon> 返回
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-tab-pane label="分类管理" name="first">
|
<el-tab-pane label="分类管理" name="first">
|
||||||
<el-button type="primary" @click="editClickA('add')" class="mb-20px">
|
<el-button type="primary" @click="editClickA('add')" class="mb-20px">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="w100% h750px overflow-auto">
|
<div class="w100% h750px overflow-auto">
|
||||||
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border
|
<el-table
|
||||||
default-expand-all :header-cell-style="{textAlign: 'center',
|
:data="tableData"
|
||||||
background: '#2A7BF7', color: '#fff',
|
style="width: 100%; margin-bottom: 20px"
|
||||||
height: '60px', 'font-size': '24px'
|
row-key="id"
|
||||||
}" :cell-style="{ 'overflow-y': 'auto' }"
|
border
|
||||||
:tree-props="{ children: 'childList', hasChildren: 'hasChildren'}">
|
default-expand-all
|
||||||
|
:header-cell-style="{
|
||||||
|
textAlign: 'center',
|
||||||
|
background: '#2A7BF7',
|
||||||
|
color: '#fff',
|
||||||
|
height: '60px',
|
||||||
|
'font-size': '24px'
|
||||||
|
}"
|
||||||
|
:cell-style="{ 'overflow-y': 'auto' }"
|
||||||
|
:tree-props="{
|
||||||
|
children: 'childList',
|
||||||
|
hasChildren: 'hasChildren'
|
||||||
|
}"
|
||||||
|
>
|
||||||
<el-table-column prop="name" label="标题名称" align="left" />
|
<el-table-column prop="name" label="标题名称" align="left" />
|
||||||
<!-- <el-table-column prop="sort" label="排序" align="center"/> -->
|
<!-- <el-table-column prop="sort" label="排序" align="center"/> -->
|
||||||
<el-table-column prop="address" label="操作" align="center">
|
<el-table-column prop="address" label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" @click="editClickA('edit', scope.row)" class="mb-20px">
|
<el-button
|
||||||
编辑</el-button>
|
type="primary"
|
||||||
<el-button type="success" v-if="scope.row.level === 1||scope.row.level === 2||scope.row.level === 3" @click="editClickA('add', scope.row)"
|
@click="editClickA('edit', scope.row)"
|
||||||
class="mb-20px"> 新增{{scope.row.level===1?'二':scope.row.level===2?'三':'四'}}级</el-button>
|
class="mb-20px"
|
||||||
<el-button type="danger" @click="deleteClickA(scope.row)" class="mb-20px"> 删除</el-button>
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
v-if="
|
||||||
|
scope.row.level === 1 ||
|
||||||
|
scope.row.level === 2 ||
|
||||||
|
scope.row.level === 3
|
||||||
|
"
|
||||||
|
@click="editClickA('add', scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
|
新增{{
|
||||||
|
scope.row.level === 1
|
||||||
|
? '二'
|
||||||
|
: scope.row.level === 2
|
||||||
|
? '三'
|
||||||
|
: '四'
|
||||||
|
}}级</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickA(scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
|
删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="内容管理" name="second">
|
<el-tab-pane label="内容管理" name="second">
|
||||||
<el-button type="primary" @click="editClickB('add')" class="mb-20px"> 新增</el-button>
|
<el-button
|
||||||
<el-button type="primary" @click="getAll" class="mb-20px"> 查看所有</el-button>
|
v-if="hasUpload"
|
||||||
|
type="primary"
|
||||||
|
@click="editClickB('add')"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
|
新增</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="userCode"
|
||||||
|
type="primary"
|
||||||
|
@click="getAll"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
|
查看所有</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="userCode"
|
||||||
|
:type="setUpload ? 'success' : 'warning'"
|
||||||
|
:icon="setUpload ? 'Check' : ''"
|
||||||
|
@click="getUser({ type: 1 })"
|
||||||
|
class="mb-20px !ml-50px"
|
||||||
|
>
|
||||||
|
{{ setUpload ? '已设置上传人员' : '设置上传人员' }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="userCode"
|
||||||
|
:type="setReview ? 'success' : 'warning'"
|
||||||
|
:icon="setReview ? 'Check' : ''"
|
||||||
|
@click="getUser({ type: 2 })"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
|
{{ setReview ? '已设置审批人员' : '设置审批人员' }}</el-button
|
||||||
|
>
|
||||||
<div class="w100% h750px overflow-auto">
|
<div class="w100% h750px overflow-auto">
|
||||||
<el-table class="tableClass" :data="infoData" style="width: 100%; margin-bottom: 20px" row-key="id" border
|
<el-table
|
||||||
default-expand-all :header-cell-style="{
|
class="tableClass"
|
||||||
background: '#2A7BF7', color: '#fff',
|
:data="infoData"
|
||||||
height: '60px', textAlign: 'center', 'font-size': '24px'
|
style="width: 100%; margin-bottom: 20px"
|
||||||
}" :cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
row-key="id"
|
||||||
:tree-props="{ children: 'childList', hasChildren: 'hasChildren'}">
|
border
|
||||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
default-expand-all
|
||||||
|
:header-cell-style="{
|
||||||
|
background: '#2A7BF7',
|
||||||
|
color: '#fff',
|
||||||
|
height: '60px',
|
||||||
|
lineHeight: '60px',
|
||||||
|
textAlign: 'center',
|
||||||
|
'font-size': '24px'
|
||||||
|
}"
|
||||||
|
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
||||||
|
:tree-props="{
|
||||||
|
children: 'childList',
|
||||||
|
hasChildren: 'hasChildren'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="cateName"
|
||||||
|
label="所属分类"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<!-- <template #default="scope">
|
<!-- <template #default="scope">
|
||||||
<span v-if="scope.row.cateId==="></span>
|
<span v-if="scope.row.cateId==="></span>
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="title" label="标题名称" show-overflow-tooltip/>
|
<el-table-column
|
||||||
|
prop="title"
|
||||||
|
label="标题名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
<!-- <el-table-column prop="deptName" label="排序" /> -->
|
<!-- <el-table-column prop="deptName" label="排序" /> -->
|
||||||
<el-table-column label="文件列表" prop="filePath" show-overflow-tooltip/>
|
<el-table-column
|
||||||
|
label="文件列表"
|
||||||
|
prop="filePath"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
<!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> -->
|
<!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> -->
|
||||||
<el-table-column label="查看范围" prop="userIdList" :show-overflow-tooltip="true">
|
<el-table-column
|
||||||
|
label="查看范围"
|
||||||
|
prop="userIdList"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-button type="primary" class="button" @click="getUser(scope.row)">查看范围</el-button> -->
|
<!-- <el-button type="primary" class="button" @click="getUser(scope.row)">查看范围</el-button> -->
|
||||||
|
|
||||||
<!-- <span class="descStyle" v-if="scope.row.userList" v-for="it in scope.row.userList"> {{it.nickName}}</span> -->
|
<!-- <span class="descStyle" v-if="scope.row.userList" v-for="it in scope.row.userList"> {{it.nickName}}</span> -->
|
||||||
<!-- <span>{{ scope.row.userList }}</span> -->
|
<!-- <span>{{ scope.row.userList }}</span> -->
|
||||||
<span v-if="scope.row.userList" v-for="(it,e) in scope.row.userList">
|
<p v-if="scope.row.userList.length" >
|
||||||
<el-tooltip :content="it.nickName" placement="top">
|
<el-tooltip :content="handTooltip(scope.row.userList)" placement="top">
|
||||||
<p class="descStyle">{{ it.nickName }} <span v-if="e=== 1 && scope.row.userList.length > 2" >...共{{ scope.row.userList.length }}人</span> </p>
|
<div class="!h-50px descStyle">
|
||||||
|
<div class="descStyle max-w-60vw !h-46px ">
|
||||||
|
<p v-for="(it, e) in scope.row.userList" :class="scope.row.userList.length < 2 ? '!leading-46px' : ''">
|
||||||
|
{{ it.nickName }}
|
||||||
|
<span v-if="e == 1 && scope.row.userList.length > 2"
|
||||||
|
>...共{{ scope.row.userList.length }}人</span
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</p>
|
||||||
|
<span v-else>''</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="address" label="操作" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="操作"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="editClickB('edit', scope.row)" class="mb-20px w45px">
|
<el-button
|
||||||
编辑</el-button>
|
type="primary"
|
||||||
<el-button type="danger" @click="deleteClickB(scope.row)" class="mb-20px w45px"> 删除</el-button>
|
@click="editClickB('edit', scope.row)"
|
||||||
<div style="float: right;" v-if="scope.$index !== 0 && scope.$index !==infoData.length-1">
|
class="mb-20px w45px"
|
||||||
<el-button style="color: #000;width: 45px;height: 33px;" @click="onUpload(scope.row)">
|
>
|
||||||
|
编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickB(scope.row)"
|
||||||
|
class="mb-20px w45px"
|
||||||
|
>
|
||||||
|
删除</el-button
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style="float: right"
|
||||||
|
v-if="
|
||||||
|
scope.$index !== 0 &&
|
||||||
|
scope.$index !== infoData.length - 1
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
style="color: #000; width: 45px; height: 33px"
|
||||||
|
@click="onUpload(scope.row)"
|
||||||
|
>
|
||||||
<el-icon><Upload /></el-icon>
|
<el-icon><Upload /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button style="color: #000;width: 45px;height: 33px;" @click="ondownloads(scope.row)">
|
<el-button
|
||||||
|
style="color: #000; width: 45px; height: 33px"
|
||||||
|
@click="ondownloads(scope.row)"
|
||||||
|
>
|
||||||
<el-icon><Download /></el-icon>
|
<el-icon><Download /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="float-right absolute bottom-0px right-30px z-2000 bg-#fff">
|
<div
|
||||||
<el-pagination v-model:current-page="pageInfo.currentPage" v-model:page-size="pageInfo.pageSize"
|
class="float-right absolute bottom-0px right-30px z-2000 bg-#fff"
|
||||||
layout="prev, pager, next, jumper" :total="pageInfo.total"
|
>
|
||||||
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
<el-pagination
|
||||||
|
v-model:current-page="pageInfo.currentPage"
|
||||||
|
v-model:page-size="pageInfo.pageSize"
|
||||||
|
layout="prev, pager, next, jumper"
|
||||||
|
:total="pageInfo.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<NModal v-model:show="shomkA">
|
<NModal v-model:show="shomkA">
|
||||||
<div class="bg-#FFF p30px">
|
<div class="bg-#FFF p30px">
|
||||||
|
|
@ -114,9 +262,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<el-button type="primary" @click="addClickA(editA)" class="mb-20px"> 确认</el-button>
|
<el-button type="primary" @click="addClickA(editA)" class="mb-20px">
|
||||||
|
确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</NModal>
|
</NModal>
|
||||||
|
|
@ -132,53 +281,92 @@
|
||||||
<el-input v-model="editB.sort" type="number" />
|
<el-input v-model="editB.sort" type="number" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<el-form-item label="所属类别">
|
<!-- <el-form-item label="所属类别">
|
||||||
<el-cascader v-model="editB.cateId" :options="tableData" @change="handleChange"
|
<el-cascader
|
||||||
:props="{ children: 'childList', label: 'name', value: 'id' }" />
|
v-model="editB.cateId"
|
||||||
|
:options="tableData"
|
||||||
|
@change="handleChange"
|
||||||
|
:props="{ children: 'childList', label: 'name', value: 'id' }"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br /> -->
|
||||||
<el-form-item label="查看范围">
|
<el-form-item label="查看范围">
|
||||||
<el-button class="button" @click="getUser" :type="userData?'success':''" :icon="userData?'Check':''">{{userData?'已设置':'设置'}}</el-button>
|
<el-button
|
||||||
|
class="button"
|
||||||
|
@click="getUser"
|
||||||
|
:type="userData ? 'success' : ''"
|
||||||
|
:icon="userData ? 'Check' : ''"
|
||||||
|
>{{ userData ? '已设置' : '设置' }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload v-model:file-list="editB.fileList" class="upload-demo" :headers="header"
|
<el-upload
|
||||||
action="/test-api/common/upload" :on-exceed="handOnExceed" multiple="true">
|
v-model:file-list="editB.fileList"
|
||||||
|
class="upload-demo"
|
||||||
|
:headers="header"
|
||||||
|
action="/test-api/common/upload"
|
||||||
|
:on-exceed="handOnExceed"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<el-button type="primary" @click="addClickB(editB)" class="mb-20px"> 确认</el-button>
|
<el-button type="primary" @click="addClickB(editB)" class="mb-20px">
|
||||||
|
确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</NModal>
|
</NModal>
|
||||||
<n-modal v-model:show="showModal">
|
<n-modal v-model:show="showModal">
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss"/>
|
<UserList
|
||||||
|
:userDataList="setUserList"
|
||||||
|
@clickChild="handleChild"
|
||||||
|
@CloseThis="CloseThiss"
|
||||||
|
/>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import DataBaseHead from "@/views/home/components/DataBaseHead.vue";
|
import DataBaseHead from '@/views/home/components/DataBaseHead.vue'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { cateAdd, cateUpdate, treeDbList, cateInfo, cateDel, cateFileUpdate, cateFileDel, cateFileList, download, dragFile } from '@/api/daikin/base'
|
import {
|
||||||
import { NModal, useMessage, NSelect } from "naive-ui";
|
cateAdd,
|
||||||
|
cateUpdate,
|
||||||
|
treeDbList,
|
||||||
|
cateInfo,
|
||||||
|
cateDel,
|
||||||
|
cateFileUpdate,
|
||||||
|
cateFileDel,
|
||||||
|
cateFileList,
|
||||||
|
download,
|
||||||
|
dragFile,
|
||||||
|
fetchdbAuthAdd,
|
||||||
|
fetchdbAuthGetInfo
|
||||||
|
} from '@/api/daikin/base'
|
||||||
|
import { NModal, useMessage, NSelect } from 'naive-ui'
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
import {databaseld} from "@/stores/modules/database"
|
import { databaseld } from '@/stores/modules/database'
|
||||||
|
|
||||||
|
const { push } = useRouter();
|
||||||
const database = databaseld()
|
const database = databaseld()
|
||||||
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
const userCode = ['admin', 'database_dandang', 'tech_service'].includes(
|
||||||
|
store.user.roleCode
|
||||||
|
)
|
||||||
|
|
||||||
const tableData = ref()
|
const tableData = ref()
|
||||||
const infoData = ref()
|
const infoData = ref()
|
||||||
|
|
||||||
const shomkA = ref()
|
const shomkA = ref(false)
|
||||||
const editA = ref()
|
const editA = ref()
|
||||||
const shomkB = ref()
|
const shomkB = ref(false)
|
||||||
const editB = ref()
|
const editB = ref()
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
|
|
@ -196,20 +384,25 @@ watchEffect(()=>{
|
||||||
console.log(database.database.id)
|
console.log(database.database.id)
|
||||||
if (database.database.id) {
|
if (database.database.id) {
|
||||||
getInfo(database.database.id)
|
getInfo(database.database.id)
|
||||||
|
getAuth()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
async function getInfo(cateId: string | undefined) {
|
async function getInfo(cateId?: string | undefined) {
|
||||||
const { rows,total } = await cateFileList({ cateId:cateIds.value, pageNum: pageInfo.currentPage, pageSize: pageInfo.pageSize })
|
const { rows, total } = await cateFileList({
|
||||||
|
cateId: cateIds.value,
|
||||||
|
pageNum: pageInfo.currentPage,
|
||||||
|
pageSize: pageInfo.pageSize
|
||||||
|
})
|
||||||
infoData.value = rows
|
infoData.value = rows
|
||||||
pageInfo.total = total
|
pageInfo.total = total
|
||||||
if (rows && rows.length > 0) {
|
if (rows && rows.length > 0) {
|
||||||
rows.map((item: { filePath: any; })=>Object.assign(item,{
|
rows.map((item: { filePath: any }) =>
|
||||||
|
Object.assign(item, {
|
||||||
fileList: item.filePath
|
fileList: item.filePath
|
||||||
}))
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const store = useUserStore()
|
|
||||||
const deptId = ref()
|
const deptId = ref()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getTree()
|
// getTree()
|
||||||
|
|
@ -225,11 +418,9 @@ const editClickA = (edit: any, obj: any) => {
|
||||||
pid: obj.id,
|
pid: obj.id,
|
||||||
type: edit
|
type: edit
|
||||||
}
|
}
|
||||||
}
|
} else if (obj && obj.id) {
|
||||||
else if (obj && obj.id) {
|
|
||||||
editA.value = obj
|
editA.value = obj
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
editA.value = {
|
editA.value = {
|
||||||
name: '',
|
name: '',
|
||||||
sort: '',
|
sort: '',
|
||||||
|
|
@ -238,15 +429,15 @@ const editClickA = (edit: any, obj: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(editA.value)
|
console.log(editA.value)
|
||||||
shomkA.value = true
|
shomkA.value = true
|
||||||
}
|
}
|
||||||
const deleteClickA = async (row: any) => {
|
const deleteClickA = async (row: any) => {
|
||||||
if (row && row.id) {
|
if (row && row.id) {
|
||||||
const { code, msg } = await cateDel({ id: row.id })
|
const { code, msg } = await cateDel({ id: row.id })
|
||||||
if (code === 200) { message.success("删除成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('删除成功')
|
||||||
|
} else message.warning(msg)
|
||||||
}
|
}
|
||||||
getTree()
|
getTree()
|
||||||
}
|
}
|
||||||
|
|
@ -254,13 +445,14 @@ async function addClickA(row: any) {
|
||||||
if (!row) return
|
if (!row) return
|
||||||
if (row.type === 'add') {
|
if (row.type === 'add') {
|
||||||
const { code, msg } = await cateAdd(row)
|
const { code, msg } = await cateAdd(row)
|
||||||
if (code === 200) { message.success("新增成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('新增成功')
|
||||||
}
|
} else message.warning(msg)
|
||||||
else {
|
} else {
|
||||||
const { code, msg } = await cateUpdate(row)
|
const { code, msg } = await cateUpdate(row)
|
||||||
if (code === 200) { message.success("修改成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('修改成功')
|
||||||
|
} else message.warning(msg)
|
||||||
}
|
}
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
getTree()
|
getTree()
|
||||||
|
|
@ -279,28 +471,30 @@ const editClickB = (edit: any, obj: any) => {
|
||||||
sort: 0
|
sort: 0
|
||||||
}
|
}
|
||||||
if (obj.filePath) {
|
if (obj.filePath) {
|
||||||
editB.value.fileList = [{
|
editB.value.fileList = [
|
||||||
|
{
|
||||||
name: obj.title,
|
name: obj.title,
|
||||||
originalFilename: obj.title,
|
originalFilename: obj.title,
|
||||||
url: obj.filePath,
|
url: obj.filePath
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
setUserList.value = obj.userList
|
setUserList.value = obj.userList
|
||||||
}
|
} else if (obj && obj.id) {
|
||||||
else if (obj && obj.id) {
|
|
||||||
editB.value = obj
|
editB.value = obj
|
||||||
if (obj.filePath) {
|
if (obj.filePath) {
|
||||||
editB.value.fileList = [{
|
editB.value.fileList = [
|
||||||
|
{
|
||||||
name: obj.title,
|
name: obj.title,
|
||||||
originalFilename: obj.title,
|
originalFilename: obj.title,
|
||||||
url: obj.filePath,
|
url: obj.filePath
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
setUserList.value = obj.userList
|
setUserList.value = obj.userList
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
editB.value = {
|
editB.value = {
|
||||||
cateId: '',
|
cateId: '',
|
||||||
deptId: deptId.value,
|
deptId: deptId.value,
|
||||||
|
|
@ -312,8 +506,8 @@ const editClickB = (edit: any, obj: any) => {
|
||||||
sort: 0
|
sort: 0
|
||||||
}
|
}
|
||||||
setUserList.value = []
|
setUserList.value = []
|
||||||
|
|
||||||
}
|
}
|
||||||
|
editB.value.cateId = database.database.id
|
||||||
userData.value = false
|
userData.value = false
|
||||||
console.log(editB.value)
|
console.log(editB.value)
|
||||||
shomkB.value = true
|
shomkB.value = true
|
||||||
|
|
@ -321,8 +515,9 @@ const editClickB = (edit: any, obj: any) => {
|
||||||
const deleteClickB = async (row: any) => {
|
const deleteClickB = async (row: any) => {
|
||||||
if (row && row.id) {
|
if (row && row.id) {
|
||||||
const { code, msg } = await cateFileDel({ id: row.id })
|
const { code, msg } = await cateFileDel({ id: row.id })
|
||||||
if (code === 200) { message.success("删除成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('删除成功')
|
||||||
|
} else message.warning(msg)
|
||||||
}
|
}
|
||||||
getInfo('')
|
getInfo('')
|
||||||
}
|
}
|
||||||
|
|
@ -334,11 +529,9 @@ async function addClickB(row: any) {
|
||||||
row.fileList.forEach((index) => {
|
row.fileList.forEach((index) => {
|
||||||
if (index.response) {
|
if (index.response) {
|
||||||
url.push(index.response.url)
|
url.push(index.response.url)
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
url.push(index.url)
|
url.push(index.url)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
row.filePath = url
|
row.filePath = url
|
||||||
|
|
@ -353,19 +546,19 @@ async function addClickB(row: any) {
|
||||||
row.userIdList = list
|
row.userIdList = list
|
||||||
}
|
}
|
||||||
if (!row.cateId) {
|
if (!row.cateId) {
|
||||||
message.error("所属类别不能为空!")
|
message.error('所属类别不能为空!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (row.type === 'add') {
|
if (row.type === 'add') {
|
||||||
const { code, msg } = await cateFileUpdate(row)
|
const { code, msg } = await cateFileUpdate(row)
|
||||||
if (code === 200) { message.success("新增成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('新增成功')
|
||||||
}
|
} else message.warning(msg)
|
||||||
else {
|
} else {
|
||||||
|
|
||||||
const { code, msg } = await cateFileUpdate(row)
|
const { code, msg } = await cateFileUpdate(row)
|
||||||
if (code === 200) { message.success("修改成功") }
|
if (code === 200) {
|
||||||
else message.warning(msg)
|
message.success('修改成功')
|
||||||
|
} else message.warning(msg)
|
||||||
}
|
}
|
||||||
shomkB.value = false
|
shomkB.value = false
|
||||||
getInfo('')
|
getInfo('')
|
||||||
|
|
@ -375,26 +568,25 @@ const handleChange = (e: string | any[]) => {
|
||||||
if (e && e.length == 1) {
|
if (e && e.length == 1) {
|
||||||
// console.log(e, editB.value)
|
// console.log(e, editB.value)
|
||||||
editB.value.cateId = e[0]
|
editB.value.cateId = e[0]
|
||||||
}
|
} else if (e && e.length == 2) {
|
||||||
else if(e && e.length == 2){
|
|
||||||
editB.value.cateId = e[1]
|
editB.value.cateId = e[1]
|
||||||
}
|
} else if (e && e.length == 3) {
|
||||||
else if(e && e.length == 3){
|
|
||||||
editB.value.cateId = e[2]
|
editB.value.cateId = e[2]
|
||||||
}
|
} else if (e && e.length == 4) {
|
||||||
else if(e && e.length == 4){
|
|
||||||
editB.value.cateId = e[3]
|
editB.value.cateId = e[3]
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
editB.value.cateId = e[0]
|
editB.value.cateId = e[0]
|
||||||
}
|
}
|
||||||
// console.log(e,editB.value.cateId,99999)
|
// console.log(e,editB.value.cateId,99999)
|
||||||
}
|
}
|
||||||
const handOnExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
const handOnExceed: UploadProps['onExceed'] = (
|
||||||
message.warning("最多只能上传一个文件!")
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
|
message.warning('最多只能上传一个文件!')
|
||||||
}
|
}
|
||||||
|
|
||||||
const header = { 'token': store.user.token }
|
const header = { token: store.user.token }
|
||||||
const goBacks = (e) => {
|
const goBacks = (e) => {
|
||||||
// console.log(444)
|
// console.log(444)
|
||||||
history.back()
|
history.back()
|
||||||
|
|
@ -402,27 +594,47 @@ const goBacks=(e)=>{
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
const flg = ref()
|
const flg = ref()
|
||||||
const setUserList = ref()
|
const setUserList = ref()
|
||||||
async function getUser(row: { id: any; userList: any; }) {
|
const dbAuthType = ref()
|
||||||
console.log(row)
|
async function getUser(row: { id?: any; userList?: any; type?: number }) {
|
||||||
showModal.value = !showModal.value
|
showModal.value = !showModal.value
|
||||||
flg.value = row
|
flg.value = row
|
||||||
if (row.id && row.userList) {
|
if (row.id && row.userList) {
|
||||||
setUserList.value = row.userList
|
setUserList.value = row.userList
|
||||||
}
|
}
|
||||||
// const {data: userArr} = await getBPCUser({moduleId})
|
if (typeof row.type === 'number') {
|
||||||
// setUserList.value = userArr
|
dbAuthType.value = row.type
|
||||||
|
const { data: userArr } = await fetchdbAuthGetInfo({
|
||||||
|
cateId: cateIds.value,
|
||||||
|
type: row.type
|
||||||
|
})
|
||||||
|
setUserList.value = userArr
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const userData = ref(false)
|
const userData = ref(false)
|
||||||
const handleChild = (data: any) => {
|
const handleChild = async (data: any) => {
|
||||||
console.log(data, 444);
|
console.log(data, 444)
|
||||||
const { showModal: show, multipleSelection } = data
|
const { showModal: show, multipleSelection } = data
|
||||||
showModal.value = unref(show)
|
showModal.value = unref(show) || false
|
||||||
let userIdList: any[] = []
|
let userIdList: any[] = []
|
||||||
multipleSelection.value.forEach((i: { userId: any }) => {
|
multipleSelection.value.forEach((i: { userId: any }) => {
|
||||||
userIdList.push(i.userId)
|
userIdList.push(i.userId)
|
||||||
})
|
})
|
||||||
|
if (dbAuthType.value) {
|
||||||
|
const { code }: any = await fetchdbAuthAdd({
|
||||||
|
cateId: cateIds.value,
|
||||||
|
type: dbAuthType.value,
|
||||||
|
userIdList
|
||||||
|
})
|
||||||
|
if (code == 200) {
|
||||||
|
message.success('设置成功!')
|
||||||
|
if (dbAuthType.value) {
|
||||||
|
dbAuthType.value = 0
|
||||||
|
getAuth()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (flg.value.id) {
|
if (flg.value.id) {
|
||||||
flg.value.userIdList = userIdList
|
flg.value.userIdList = userIdList
|
||||||
// marketPreADD(flg.value)
|
// marketPreADD(flg.value)
|
||||||
|
|
@ -433,12 +645,15 @@ async function getUser(row: { id: any; userList: any; }) {
|
||||||
if (userIdList.length > 0) {
|
if (userIdList.length > 0) {
|
||||||
userData.value = true
|
userData.value = true
|
||||||
console.log(userIdList, 8888)
|
console.log(userIdList, 8888)
|
||||||
}
|
} else userData.value = false
|
||||||
else userData.value = false
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const CloseThiss = (data: boolean) => {
|
const CloseThiss = (data: boolean) => {
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
|
// setUserList.value = []
|
||||||
|
if (dbAuthType.value) {
|
||||||
|
dbAuthType.value = 0
|
||||||
|
getAuth()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const getAll = () => {
|
const getAll = () => {
|
||||||
// cateIds.value = ''
|
// cateIds.value = ''
|
||||||
|
|
@ -451,7 +666,7 @@ const lazyState = computed(() => [pageInfo.currentPage])
|
||||||
async (v) => {
|
async (v) => {
|
||||||
getTree()
|
getTree()
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true },
|
{ immediate: true, deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleSizeChange = (e) => {
|
const handleSizeChange = (e) => {
|
||||||
|
|
@ -463,40 +678,66 @@ const handleCurrentChange=(e)=>{
|
||||||
}
|
}
|
||||||
// 上移
|
// 上移
|
||||||
async function onUpload(it) {
|
async function onUpload(it) {
|
||||||
console.log(infoData);
|
console.log(infoData)
|
||||||
// 当前数据的索引
|
// 当前数据的索引
|
||||||
let index = infoData._rawValue.findIndex((value :any) => value.id === it.id);
|
let index = infoData._rawValue.findIndex((value: any) => value.id === it.id)
|
||||||
index -= 1;
|
index -= 1
|
||||||
const onUploaddate = await dragFile({
|
const onUploaddate = await dragFile({
|
||||||
cateId: it.cateId,
|
cateId: it.cateId,
|
||||||
curId: it.id,
|
curId: it.id,
|
||||||
lastId:infoData._rawValue[index].id,
|
lastId: infoData._rawValue[index].id
|
||||||
});
|
})
|
||||||
getInfo();
|
getInfo()
|
||||||
|
|
||||||
|
console.log(infoData)
|
||||||
console.log(infoData);
|
console.log(it.cateId, '分类id')
|
||||||
console.log(it.cateId,"分类id");
|
console.log(it.id, '当前位置的id')
|
||||||
console.log(it.id, "当前位置的id");
|
console.log(infoData._rawValue[index].id, '上移位置的id')
|
||||||
console.log(infoData._rawValue[index].id,"上移位置的id");
|
|
||||||
// console.log(tableData._rawValue);
|
// console.log(tableData._rawValue);
|
||||||
}
|
}
|
||||||
// 下移
|
// 下移
|
||||||
async function ondownloads(it) {
|
async function ondownloads(it) {
|
||||||
// 当前数据的索引
|
// 当前数据的索引
|
||||||
let index = infoData._rawValue.findIndex((value) => value.id === it.id);
|
let index = infoData._rawValue.findIndex((value) => value.id === it.id)
|
||||||
index += 1;
|
index += 1
|
||||||
// const {rows,total} = await cateFileList({cateId:prop.cateId,pageNum:currentPage,pageSize})
|
// const {rows,total} = await cateFileList({cateId:prop.cateId,pageNum:currentPage,pageSize})
|
||||||
const ondownloads = await dragFile({
|
const ondownloads = await dragFile({
|
||||||
cateId: it.cateId,
|
cateId: it.cateId,
|
||||||
curId: it.id,
|
curId: it.id,
|
||||||
lastId:infoData._rawValue[index].id,
|
lastId: infoData._rawValue[index].id
|
||||||
});
|
})
|
||||||
getInfo();
|
getInfo()
|
||||||
console.log(ondownloads);
|
console.log(ondownloads)
|
||||||
|
}
|
||||||
|
// 获取该目录下是否设置过权限
|
||||||
|
const setUpload = ref(false)
|
||||||
|
const hasUpload = ref(false)
|
||||||
|
const setReview = ref(false)
|
||||||
|
const hasReview = ref(false)
|
||||||
|
async function getAuth() {
|
||||||
|
const { data: uploadUser = [] } = await fetchdbAuthGetInfo({
|
||||||
|
cateId: cateIds.value,
|
||||||
|
type: 1
|
||||||
|
})
|
||||||
|
setUpload.value = uploadUser.length > 0
|
||||||
|
hasUpload.value = uploadUser.findIndex((x:any) => x.userId === store.user?.id) > -1
|
||||||
|
const { data: reviewUser = [] } = await fetchdbAuthGetInfo({
|
||||||
|
cateId: cateIds.value,
|
||||||
|
type: 2
|
||||||
|
})
|
||||||
|
setReview.value = reviewUser.length > 0
|
||||||
|
hasReview.value = reviewUser.findIndex((x:any) => x.userId === store.user?.id) > -1
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
console.log(cateIds.value)
|
||||||
|
push({path:'/DataBase/review',query:{cateId:cateIds.value}})
|
||||||
|
}
|
||||||
|
const handTooltip = (data: any[] = []) => {
|
||||||
|
return data.map((item:any) => item.nickName)?.join(', ') || ''
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less" scoped>
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import { saveArticle } from '@/api/daikin/base'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
|
|
||||||
const store =useUserStore()
|
const store =useUserStore()
|
||||||
|
console.log("🚀 ~ file: Layout.vue:15 ~ store:", store.user)
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
||||||
|
|
@ -29,10 +30,10 @@ const { push } = useRouter()
|
||||||
<div class="text-36px">外部情报</div>
|
<div class="text-36px">外部情报</div>
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="text-18px flex-1">{{ week }}</div>
|
<div class="text-18px flex-1">{{ week }}</div>
|
||||||
<div style="margin-right: 8px" v-if="store.user.isPublish === 1">
|
<div style="margin-right: 8px" v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'">
|
||||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
|
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-right: 8px" v-if="store.user.isPublish ===1">
|
<div style="margin-right: 8px" v-if="store.user.isPublish ===1 || store.user.roleCode === 'zhuxi'">
|
||||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})">留言板</div>
|
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})">留言板</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="store.user.isPublish ===1">
|
<div v-if="store.user.isPublish ===1">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue