Compare commits
No commits in common. "0a9151eb3c31d808509014d61f6385333000f33a" and "6537b15aca382198e17b12eea9b2c606fcdbabdf" have entirely different histories.
0a9151eb3c
...
6537b15aca
|
|
@ -33,15 +33,12 @@ declare module 'vue' {
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElOption: typeof import('element-plus/es')['ElOption']
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
|
||||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||||
|
|
|
||||||
|
|
@ -1050,19 +1050,6 @@ export async function marketPreADD(data: any) {
|
||||||
export async function badartAdd(data: any) {
|
export async function badartAdd(data: any) {
|
||||||
return http.post(`/quality/badartAdd`, data)
|
return http.post(`/quality/badartAdd`, data)
|
||||||
}
|
}
|
||||||
/**不良情报-添加--用户权限
|
|
||||||
*
|
|
||||||
* http://127.0.0.1:8811/openApi/quality/badartAdd
|
|
||||||
*/
|
|
||||||
export async function badartAddUser(data: any) {
|
|
||||||
return http.post(`/quality/addUser`, data)
|
|
||||||
}
|
|
||||||
/**不良情报-获取用户权限
|
|
||||||
* http://127.0.0.1:8811/openApi/quality/badartDel?id=3
|
|
||||||
*/
|
|
||||||
export async function badartGetUser(params: { indexId: any }) {
|
|
||||||
return http.get(`/quality/getUser`, { params })
|
|
||||||
}
|
|
||||||
/**不良情报-删除
|
/**不良情报-删除
|
||||||
* http://127.0.0.1:8811/openApi/quality/badartDel?id=3
|
* http://127.0.0.1:8811/openApi/quality/badartDel?id=3
|
||||||
*/
|
*/
|
||||||
|
|
@ -1417,104 +1404,3 @@ export async function fetchPostList(params?: any) {
|
||||||
export async function fetchInternalUserStat(params?: any) {
|
export async function fetchInternalUserStat(params?: any) {
|
||||||
return http.get(`/moduleStat/internalUserStat`, { params })
|
return http.get(`/moduleStat/internalUserStat`, { params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// CD-三个据点总发注金额饼状图
|
|
||||||
export async function fetchPartStatisRate(params?: any) {
|
|
||||||
return http.get(`/cdcontent/partStatisRate`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// CD-三据点历年发注金额
|
|
||||||
export async function fetchPartHisList(params?: any) {
|
|
||||||
return http.get(`/cdcontent/partHisList`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// CD-小业种发注金额
|
|
||||||
export async function fetchPartminBusSeedsRate(params?: any) {
|
|
||||||
return http.get(`/cdcontent/partminBusSeedsRate`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// CD-大业种发注金额
|
|
||||||
export async function fetchPartmaxBusSeedsRate(params?: any) {
|
|
||||||
return http.get(`/cdcontent/partmaxBusSeedsRate`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// CD-图表2-大业种发注金额
|
|
||||||
export async function fetchPartmaxBusSeedsDetailList(params?: any) {
|
|
||||||
return http.get(`/cdcontent/maxBusSeedsDetailList`, { params })
|
|
||||||
}
|
|
||||||
// CD-图表2-大业种发注金额供应商
|
|
||||||
export async function fetchPartmaxBusSeedsRateBySupplier(params?: any) {
|
|
||||||
return http.get(`/cdcontent/partmaxBusSeedsRateBySupplier`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// smm首页数据
|
|
||||||
export async function fetchHomeSmmExInfo(params?: any) {
|
|
||||||
return http.get(`/marketPre/homeSmmExInfo`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// smm/lme 分类数据
|
|
||||||
export async function fetchExchangeInfo(params?: any) {
|
|
||||||
return http.get(`/marketPre/getExchangeInfo`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取分时数据 --沪铜主连
|
|
||||||
export async function fetchTimeFuturecenterCu(params?: any) {
|
|
||||||
return http.get(`/marketPre/getTimeFuturecenter/${params.type}`)
|
|
||||||
}
|
|
||||||
// 获取分时数据 --沪铜主连
|
|
||||||
export async function fetchTimeFuturecenterAl(params?: any) {
|
|
||||||
return http.get(`/marketPre/getTimeFuturecenter/${params.type}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取SMM/LEM 更新时间
|
|
||||||
export async function fetchMarketUpdateTime(params?: any) {
|
|
||||||
return http.get(`/marketPre/getLastTime`, { params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询HP-联络人列表
|
|
||||||
export async function fetchContactList(params?: any) {
|
|
||||||
return http.get(`/liaison/list`, { params })
|
|
||||||
}
|
|
||||||
// 获取HP-联络人详细信息
|
|
||||||
export async function fetchContactDetail(id: any = '') {
|
|
||||||
return http.get(`/liaison/info/${id}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增HP-联络人
|
|
||||||
export async function fetchContactAdd(data?: any) {
|
|
||||||
return http.post(`/liaison/post`, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改HP-联络人
|
|
||||||
export async function fetchContactEdit(data?: any) {
|
|
||||||
return http.post(`/liaison/update`, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除HP-联络人
|
|
||||||
export async function fetchContactDel(id: any = '') {
|
|
||||||
return http.get(`/liaison/${id}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询HP-年度方针列表
|
|
||||||
export async function fetchYearPlanList(params?: any) {
|
|
||||||
return http.get(`/policy/list`, { params })
|
|
||||||
}
|
|
||||||
// 获取HP-年度方针详细信息
|
|
||||||
export async function fetchYearPlanDetail(id: any = '') {
|
|
||||||
return http.get(`/policy/info/${id}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增HP-年度方针
|
|
||||||
export async function fetchYearPlanAdd(data?: any) {
|
|
||||||
return http.post(`/policy/add`, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改HP-年度方针
|
|
||||||
export async function fetchYearPlanEdit(data?: any) {
|
|
||||||
return http.post(`/policy/update`, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除HP-年度方针
|
|
||||||
export async function fetchYearPlanDel(id: any = '') {
|
|
||||||
return http.get(`/policy/${id}`)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ onMounted(() => {
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
// console.log( flgs.value,store.user.type, 'tech_service')
|
// console.log( flgs.value,store.user.type, 'tech_service')
|
||||||
flgs.value = [1, 2, 3, 4].includes(store.user.type)
|
flgs.value = [1, 2, 3, 4].includes(store.user.type)
|
||||||
userCode.value = ['admin', 'tech_service', 'footprint_dandang'].some((item) =>
|
userCode.value = ['admin', 'tech_service', 'footprint_dandang'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
const options = [
|
const options = [
|
||||||
|
|
@ -56,11 +56,11 @@ const noticeShow = ref(false)
|
||||||
let showIs = false
|
let showIs = false
|
||||||
//模块id,1-情报 2-市况汇率 3-数据平台 4-BCP管理 5-碳中和 6-品质 7-差别化LAB
|
//模块id,1-情报 2-市况汇率 3-数据平台 4-BCP管理 5-碳中和 6-品质 7-差别化LAB
|
||||||
const goModeuls = (obj) => {
|
const goModeuls = (obj) => {
|
||||||
const { moduleId, type } = obj
|
const { moduleId } = obj
|
||||||
if (!moduleId) return
|
if (!moduleId) return
|
||||||
switch (moduleId) {
|
switch (moduleId) {
|
||||||
case 1:
|
case 1:
|
||||||
if ((store.user.isReview === 1 || store.user.isPublish === 1) && type == 2) {
|
if (store.user.isReview === 1 || store.user.isPublish === 1) {
|
||||||
push('/Home/Process')
|
push('/Home/Process')
|
||||||
} else {
|
} else {
|
||||||
push('/Home/intelligence')
|
push('/Home/intelligence')
|
||||||
|
|
@ -85,7 +85,7 @@ const goModeuls = (obj) => {
|
||||||
push({ name: 'Diffspace' })
|
push({ name: 'Diffspace' })
|
||||||
break
|
break
|
||||||
case 9:
|
case 9:
|
||||||
push({ name: type === 2 ? 'DataBaseReview' : 'DataBase' })
|
push({ name: 'DataBaseReview' })
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
push('/Home/intelligence')
|
push('/Home/intelligence')
|
||||||
|
|
@ -108,7 +108,9 @@ const toFootPrint = () => {
|
||||||
<div class="inline-flex items-center relative">
|
<div class="inline-flex items-center relative">
|
||||||
<!-- 足迹 -->
|
<!-- 足迹 -->
|
||||||
<!-- <div class="cursor-pointer w-40px h-40px z-200"> -->
|
<!-- <div class="cursor-pointer w-40px h-40px z-200"> -->
|
||||||
<el-icon size="35" v-if="userCode" @click="toFootPrint"><Platform /></el-icon>
|
<el-icon size="35" v-if="userCode" @click="toFootPrint"
|
||||||
|
><Platform
|
||||||
|
/></el-icon>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
||||||
<!-- 全屏小图标 -->
|
<!-- 全屏小图标 -->
|
||||||
|
|
@ -137,27 +139,23 @@ const toFootPrint = () => {
|
||||||
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
||||||
>
|
>
|
||||||
<div size="small" @click="noticeShows">
|
<div size="small" @click="noticeShows">
|
||||||
<img src="../assets/images/tongzhi@2x.png" class="w20px mr5px mt--5px" />新着通知<span
|
<img
|
||||||
class="ml8px pl5px pr5px rounded-20px bg-#002FA7"
|
src="../assets/images/tongzhi@2x.png"
|
||||||
>{{ store.user.reviewCount ?? 0 }}</span
|
class="w20px mr5px mt--5px"
|
||||||
>
|
/>新着通知<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||||
|
store.user.reviewCount ?? 0
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 跳转到碳中和页面的 -->
|
<!-- 跳转到碳中和页面的 -->
|
||||||
<div class="notice" v-if="noticeShow">
|
<div class="notice" v-if="noticeShow">
|
||||||
<div
|
<div
|
||||||
v-for="ite in noticeData"
|
v-for="ite in noticeData"
|
||||||
class="p10px box flex justify-between items-center"
|
class="p10px box flex justify-between"
|
||||||
v-if="noticeData"
|
v-if="noticeData"
|
||||||
@click="goModeuls(ite)"
|
@click="goModeuls(ite)"
|
||||||
>
|
>
|
||||||
<template v-if="ite.type == 1">
|
|
||||||
<div>{{ ite.moduleName }}</div>
|
<div>{{ ite.moduleName }}</div>
|
||||||
<span class="min-w-70px">未读{{ ite.moduleCount }}</span>
|
<span class="">{{ ite.moduleCount }}</span>
|
||||||
</template>
|
|
||||||
<template v-if="ite.type == 2">
|
|
||||||
<div>{{ ite.moduleName }}</div>
|
|
||||||
<span class="min-w-70px">待审批{{ ite.moduleCount }}</span>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -167,8 +165,8 @@ const toFootPrint = () => {
|
||||||
<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||||
store.user.reviewCount ?? 0
|
store.user.reviewCount ?? 0
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div> -->
|
||||||
<n-popover :overlap="false" placement="bottom-start" trigger="click">
|
<!-- <n-popover :overlap="false" placement="bottom-start" trigger="click">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div size="small">
|
<div size="small">
|
||||||
新着通知
|
新着通知
|
||||||
|
|
@ -176,8 +174,11 @@ const toFootPrint = () => {
|
||||||
store.user.reviewCount ?? 0
|
store.user.reviewCount ?? 0
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template> -->
|
||||||
<div class="inline-flex items-center p10px cursor-pointer" v-if="store.user.isReview === 1">
|
<!-- <div
|
||||||
|
class="inline-flex items-center p10px cursor-pointer"
|
||||||
|
v-if="store.user.isReview === 1"
|
||||||
|
>
|
||||||
待审核信息{{ store.user.reviewCount ?? 0 }}条
|
待审核信息{{ store.user.reviewCount ?? 0 }}条
|
||||||
<n-button
|
<n-button
|
||||||
class="text-#fff bg-#0058E4 rounded-5px p5px pt2px pb2px ml 8px"
|
class="text-#fff bg-#0058E4 rounded-5px p5px pt2px pb2px ml 8px"
|
||||||
|
|
@ -205,13 +206,16 @@ const toFootPrint = () => {
|
||||||
@click="push({ path: '/Home/intelligence' })"
|
@click="push({ path: '/Home/intelligence' })"
|
||||||
>去查看</n-button
|
>去查看</n-button
|
||||||
>
|
>
|
||||||
</div>
|
</div> -->
|
||||||
</n-popover> -->
|
<!-- </n-popover> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- 当前登录用户信息 -->
|
<!-- 当前登录用户信息 -->
|
||||||
<NDropdown show-arrow placement="bottom-end" size="huge" :options="options">
|
<NDropdown show-arrow placement="bottom-end" size="huge" :options="options">
|
||||||
<div class="cursor-pointer inline-flex items-center">
|
<div class="cursor-pointer inline-flex items-center">
|
||||||
<img src="@/assets/images/icon-user.svg" class="ml40px mr16px w60px h60px" />
|
<img
|
||||||
|
src="@/assets/images/icon-user.svg"
|
||||||
|
class="ml40px mr16px w60px h60px"
|
||||||
|
/>
|
||||||
<!-- @click="toggle" -->
|
<!-- @click="toggle" -->
|
||||||
<span>{{ store.user.nikeName ?? '游客' }}</span>
|
<span>{{ store.user.nikeName ?? '游客' }}</span>
|
||||||
<img src="@/assets/images/icon-more.svg" class="ml30px w13px" />
|
<img src="@/assets/images/icon-more.svg" class="ml30px w13px" />
|
||||||
|
|
@ -225,7 +229,7 @@ const toFootPrint = () => {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 52px;
|
top: 52px;
|
||||||
left: -3px;
|
left: -3px;
|
||||||
min-width: 240px;
|
width: 200px;
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
max-height: 520px;
|
max-height: 520px;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ const props = defineProps({
|
||||||
<img
|
<img
|
||||||
v-if="isNotOneWeekAgo(publishTime) && labelText !== '紧急'"
|
v-if="isNotOneWeekAgo(publishTime) && labelText !== '紧急'"
|
||||||
src="../assets/images/NEW3.gif"
|
src="../assets/images/NEW3.gif"
|
||||||
:class="'h20px'"
|
:class="size || []"
|
||||||
/>
|
/>
|
||||||
<img v-if="labelText === '紧急'" src="../assets/images/jj.gif" :class="'h30px'" />
|
<img v-if="labelText === '紧急'" src="../assets/images/jj.gif" :class="size || []" />
|
||||||
<span :style="isRead === 2 ? 'color:#0058E5;font-weight:800' : ''">{{ text }}</span>
|
<span :style="isRead === 2 ? 'color:#0058E5;font-weight:800' : ''">{{ text }}</span>
|
||||||
<!-- <span class="invisible">{{ date }}</span> -->
|
<!-- <span class="invisible">{{ date }}</span> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
25
src/main.ts
|
|
@ -1,21 +1,22 @@
|
||||||
import { createApp } from 'vue'
|
import { createApp } from "vue";
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from "pinia";
|
||||||
import ECharts from 'vue-echarts'
|
import ECharts from 'vue-echarts'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from "./App.vue";
|
||||||
import router from './router'
|
import router from "./router";
|
||||||
import './styles/smallDog.css'
|
import "./styles/smallDog.css"
|
||||||
import './styles/main.css'
|
import "./styles/main.css";
|
||||||
import 'uno.css'
|
import "uno.css";
|
||||||
import 'animate.css' // https://animate.style/
|
import "animate.css"; // https://animate.style/
|
||||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const app = createApp(App)
|
|
||||||
|
const app = createApp(App);
|
||||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||||
app.component(key, component)
|
app.component(key, component)
|
||||||
}
|
}
|
||||||
app.component('VChart',ECharts)
|
app.component('VChart',ECharts)
|
||||||
app.use(createPinia())
|
app.use(createPinia());
|
||||||
app.use(router)
|
app.use(router);
|
||||||
|
|
||||||
app.mount('#app')
|
app.mount("#app");
|
||||||
|
|
|
||||||
|
|
@ -80,16 +80,16 @@ const router = createRouter({
|
||||||
name: 'DetailInfos',
|
name: 'DetailInfos',
|
||||||
component: () => import('@/views/extermal/Article/Details.vue')
|
component: () => import('@/views/extermal/Article/Details.vue')
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/external/Board',
|
path: '/external/Board',
|
||||||
// name: 'BoardlInfo',
|
name: 'BoardlInfo',
|
||||||
// component: () => import('@/views/extermal/Board/index.vue')
|
component: () => import('@/views/extermal/Board/index.vue')
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// path: '/external/Process',
|
path: '/external/Process',
|
||||||
// name: 'Process1',
|
name: 'Process1',
|
||||||
// component: () => import('@/views/extermal/Process/index.vue')
|
component: () => import('@/views/extermal/Process/index.vue')
|
||||||
// },
|
},
|
||||||
|
|
||||||
// 内部首页
|
// 内部首页
|
||||||
{
|
{
|
||||||
|
|
@ -260,8 +260,7 @@ const router = createRouter({
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: 'Market',
|
name: 'Market',
|
||||||
component: () => import('@/views/home/market/Market_new.vue')
|
component: () => import('@/views/home/market/Market.vue')
|
||||||
// component: () => import('@/views/home/market/Market.vue')
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'MarketDataModify',
|
path: 'MarketDataModify',
|
||||||
|
|
@ -357,16 +356,6 @@ const router = createRouter({
|
||||||
name: 'Process',
|
name: 'Process',
|
||||||
component: () => import('@/views/home/intelligence/process/Process.vue')
|
component: () => import('@/views/home/intelligence/process/Process.vue')
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/external/Board',
|
|
||||||
name: 'BoardlInfo',
|
|
||||||
component: () => import('@/views/extermal/Board/index.vue')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/external/Process',
|
|
||||||
name: 'Process1',
|
|
||||||
component: () => import('@/views/extermal/Process/index.vue')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/Home/Process/ProcessInfo/:id',
|
path: '/Home/Process/ProcessInfo/:id',
|
||||||
meta: { title: '情报审批详情' },
|
meta: { title: '情报审批详情' },
|
||||||
|
|
@ -467,12 +456,6 @@ const router = createRouter({
|
||||||
name: 'Group',
|
name: 'Group',
|
||||||
component: () => import('@/views/company/index.vue')
|
component: () => import('@/views/company/index.vue')
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
meta: { title: '集团方针管理' },
|
|
||||||
name: 'policyManage',
|
|
||||||
component: () => import('@/views/company/manage.vue')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'company',
|
path: 'company',
|
||||||
meta: { title: '公司方针' },
|
meta: { title: '公司方针' },
|
||||||
|
|
@ -497,11 +480,6 @@ const router = createRouter({
|
||||||
name: 'phone',
|
name: 'phone',
|
||||||
component: () => import('@/views/home/phone/index.vue')
|
component: () => import('@/views/home/phone/index.vue')
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'manage',
|
|
||||||
name: 'phoneManage',
|
|
||||||
component: () => import('@/views/home/phone/manage.vue')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'visit',
|
path: 'visit',
|
||||||
meta: { title: '拜访' },
|
meta: { title: '拜访' },
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export const useUserStore = defineStore('user', () => {
|
||||||
token:'',
|
token:'',
|
||||||
appLoginCount:0,
|
appLoginCount:0,
|
||||||
appLoginToDayCount:0,
|
appLoginToDayCount:0,
|
||||||
isUpPwd: 0
|
isUpPwd:0,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getUser() {
|
async function getUser() {
|
||||||
|
|
@ -31,13 +31,13 @@ export const useUserStore = defineStore('user', () => {
|
||||||
user.value = Object.assign(data,{
|
user.value = Object.assign(data,{
|
||||||
token:token.value
|
token:token.value
|
||||||
})
|
})
|
||||||
if (a.some((item) => data.roleCode?.includes(item))) {
|
if(a.includes(data.roleCode)){
|
||||||
user.value.isReview = 1
|
user.value.isReview = 1
|
||||||
}
|
}
|
||||||
if (b.some((item) => data.roleCode?.includes(item))) {
|
if(b.includes(data.roleCode)){
|
||||||
user.value.isPublish = 1
|
user.value.isPublish = 1
|
||||||
}
|
}
|
||||||
// console.log('----40----', user.value)
|
// console.log( user.value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LogOut()
|
LogOut()
|
||||||
}
|
}
|
||||||
|
|
@ -61,7 +61,7 @@ export const useUserStore = defineStore('user', () => {
|
||||||
appLoginCount:0,
|
appLoginCount:0,
|
||||||
isUpPwd:0
|
isUpPwd:0
|
||||||
}
|
}
|
||||||
// console.log('------64-', user.value)
|
console.log(user.value)
|
||||||
push({ name: 'Entry' })
|
push({ name: 'Entry' })
|
||||||
}
|
}
|
||||||
return { user, getUser, LogOut }
|
return { user, getUser, LogOut }
|
||||||
|
|
|
||||||
|
|
@ -275,6 +275,5 @@ declare global {
|
||||||
// for type re-export
|
// for type re-export
|
||||||
declare global {
|
declare global {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
|
||||||
import('vue')
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import dayjs from 'dayjs'
|
|
||||||
const pickerOptions = {
|
|
||||||
disabledDate: (time) => {
|
|
||||||
return time.getTime() < Date.now()
|
|
||||||
},
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
shortcuts: [
|
|
||||||
{
|
|
||||||
text: '3天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 3)
|
|
||||||
date.setHours(0, 0, 0, 0)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '5天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 5)
|
|
||||||
date.setHours(0, 0, 0, 0)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '7天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
|
|
||||||
date.setHours(0, 0, 0, 0)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '10天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 10)
|
|
||||||
date.setHours(0, 0, 0, 0)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
day: (() => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 1)
|
|
||||||
date.setHours(0, 0, 0, 0)
|
|
||||||
return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
})()
|
|
||||||
}
|
|
||||||
|
|
||||||
export { pickerOptions }
|
|
||||||
|
|
@ -112,7 +112,9 @@ service.interceptors.response.use(
|
||||||
code: 200
|
code: 200
|
||||||
}
|
}
|
||||||
if (response.headers['content-disposition']) {
|
if (response.headers['content-disposition']) {
|
||||||
const fileName = response.headers['content-disposition']?.split(';')[1]?.split('=')[1]
|
const fileName = response.headers['content-disposition']
|
||||||
|
?.split(';')[1]
|
||||||
|
?.split('=')[1]
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject('没有访问权限')
|
return Promise.reject('没有访问权限')
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +128,7 @@ service.interceptors.response.use(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![0, 200].includes(code)) {
|
if (![0, 200].includes(code)) {
|
||||||
if (errMsg === '用户未登录') return Promise.reject(errMsg)
|
// if(errMsg==='用户未登录')
|
||||||
// { message.error(errMsg);}
|
// { message.error(errMsg);}
|
||||||
// else if(errMsg==='密码不正确'){
|
// else if(errMsg==='密码不正确'){
|
||||||
// message.error(errMsg);
|
// message.error(errMsg);
|
||||||
|
|
|
||||||
|
|
@ -10,45 +10,4 @@ function isNotOneWeekAgo(date: any) {
|
||||||
return dayjs(date).isSameOrAfter(oneWeekAgo, 'day')
|
return dayjs(date).isSameOrAfter(oneWeekAgo, 'day')
|
||||||
}
|
}
|
||||||
|
|
||||||
const pickerOptions = {
|
export { isNotOneWeekAgo }
|
||||||
disabledDate(time) {
|
|
||||||
return time.getTime() < Date.now()
|
|
||||||
},
|
|
||||||
valueFormat: 'YYYY-MM-dd HH:mm:ss',
|
|
||||||
shortcuts: [
|
|
||||||
{
|
|
||||||
text: '3天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 3)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '5天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 5)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '7天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '10天后',
|
|
||||||
value: () => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() + 3600 * 1000 * 24 * 10)
|
|
||||||
return date
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
export { isNotOneWeekAgo, pickerOptions }
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,8 @@
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
|
// import { NTimeline, NTimelineItem } from 'naive-ui'
|
||||||
import { useMessage } from 'naive-ui'
|
import { useMessage } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
// import { groupBy } from 'lodash-es'
|
|
||||||
const store = useUserStore()
|
|
||||||
|
|
||||||
import { cateFileList } from '@/api/daikin/base'
|
import { cateFileList } from '@/api/daikin/base'
|
||||||
|
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
|
|
@ -78,13 +75,6 @@ const goFile = (row: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
getFile()
|
getFile()
|
||||||
|
|
||||||
const userCode = ref(false)
|
|
||||||
watchEffect(() => {
|
|
||||||
userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -113,14 +103,7 @@ watchEffect(() => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="mt20px mr20px pt40px flex w100% relative">
|
<div class="mt30px mr20px flex w100% relative">
|
||||||
<!-- <el-button
|
|
||||||
v-if="userCode"
|
|
||||||
type="primary"
|
|
||||||
class="button absolute top-0px right-50px"
|
|
||||||
@click="push({ name: 'policyManage' })"
|
|
||||||
>数据管理</el-button
|
|
||||||
> -->
|
|
||||||
<!-- <img src="../../assets/images/fangz.png" class="w100%"/> -->
|
<!-- <img src="../../assets/images/fangz.png" class="w100%"/> -->
|
||||||
<!-- <img src="../../assets/images/fzqiet.png" class="w100%" />
|
<!-- <img src="../../assets/images/fzqiet.png" class="w100%" />
|
||||||
<div
|
<div
|
||||||
|
|
@ -132,14 +115,14 @@ watchEffect(() => {
|
||||||
</div> -->
|
</div> -->
|
||||||
<img src="../../assets/images/2024fz.jpg" class="w100%" />
|
<img src="../../assets/images/2024fz.jpg" class="w100%" />
|
||||||
<div
|
<div
|
||||||
class="absolute py10px left-880px top-282px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer font"
|
class="absolute py10px left-880px top-250px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer"
|
||||||
@click="goFile(fileItem)"
|
@click="goFile(fileItem)"
|
||||||
>
|
>
|
||||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||||
2024年グループ年頭方针
|
2024年グループ年頭方针
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="absolute py10px left-920px top-678px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer font"
|
class="absolute py10px left-920px top-645px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer"
|
||||||
@click="goFile(fileItemTwo)"
|
@click="goFile(fileItemTwo)"
|
||||||
>
|
>
|
||||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||||
|
|
@ -154,9 +137,6 @@ watchEffect(() => {
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: -92px;
|
top: -92px;
|
||||||
}
|
}
|
||||||
.font {
|
|
||||||
font-family: '微软雅黑', 'Microsoft YaHei', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.g-wrapper {
|
.g-wrapper {
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
|
|
|
||||||
|
|
@ -1,394 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import AppBlock from '@/components/AppBlock.vue'
|
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
|
||||||
import { useMessage, NModal } from 'naive-ui'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
|
||||||
import dayjs from 'dayjs'
|
|
||||||
|
|
||||||
import {
|
|
||||||
fetchDelHis,
|
|
||||||
marketPreADD,
|
|
||||||
getMetalList,
|
|
||||||
fetchGetHisPage,
|
|
||||||
fetchUpdateHis,
|
|
||||||
fetchSaveHis,
|
|
||||||
fetchContactList,
|
|
||||||
fetchContactEdit,
|
|
||||||
fetchContactDel,
|
|
||||||
fetchContactAdd,
|
|
||||||
fetchYearPlanList,
|
|
||||||
fetchYearPlanEdit,
|
|
||||||
fetchYearPlanAdd,
|
|
||||||
fetchYearPlanDel
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
|
|
||||||
const message = useMessage()
|
|
||||||
const store = useUserStore()
|
|
||||||
const header = { token: store.user.token }
|
|
||||||
const pageInfo = reactive({
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 15,
|
|
||||||
total: 0
|
|
||||||
})
|
|
||||||
|
|
||||||
const dataA = ref<any>([])
|
|
||||||
const editA = ref<any>({})
|
|
||||||
const metaList = ref<any>([])
|
|
||||||
const metaObj = ref<any>({})
|
|
||||||
|
|
||||||
const stDateList = ref<any>([])
|
|
||||||
const shomkA = ref(false)
|
|
||||||
|
|
||||||
const type = ref(2)
|
|
||||||
async function getDataA() {
|
|
||||||
const { data } = await fetchGetHisPage({})
|
|
||||||
dataA.value = Object.entries(data).map(([key, value]: any) => {
|
|
||||||
return {
|
|
||||||
stDate: key,
|
|
||||||
yearId: key,
|
|
||||||
children: value.map((item: any) => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
numbers: metaObj.value[item.number]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// setDataFiles(dataArr);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
// const { data = [] } = await getMetalList()
|
|
||||||
// metaList.value = data
|
|
||||||
// data.forEach((item: any) => {
|
|
||||||
// metaObj.value[item.value] = item.title
|
|
||||||
// })
|
|
||||||
// getDataA()
|
|
||||||
fetchDataList()
|
|
||||||
})
|
|
||||||
|
|
||||||
const contactList = ref<any>([])
|
|
||||||
const fetchDataList = async () => {
|
|
||||||
const { rows = [] } = await fetchYearPlanList({
|
|
||||||
pageNum: pageInfo.currentPage,
|
|
||||||
pageSize: pageInfo.pageSize
|
|
||||||
})
|
|
||||||
contactList.value = rows
|
|
||||||
console.log('🚀 ~ file: manage.vue:66 ~ data:', rows)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
|
|
||||||
console.log(row, 555)
|
|
||||||
const { id, title } = row
|
|
||||||
// let moduleId = 1;
|
|
||||||
let sendData = {}
|
|
||||||
if (!row.id) {
|
|
||||||
sendData = { title, type: type.value, userIdList: userData.value }
|
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
|
||||||
row.fileList.map((item) => {
|
|
||||||
if (item.response) {
|
|
||||||
sendData.filePath = item.response.url
|
|
||||||
// obj.title = title || computedName(item.response.originalFilename);
|
|
||||||
} else {
|
|
||||||
sendData.filePath = item.url
|
|
||||||
// obj.title = title || computedName(item.originalFilename);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sendData = { id, title, type: type.value, userIdList: userData.value }
|
|
||||||
}
|
|
||||||
const { code, msg } = await marketPreADD(sendData)
|
|
||||||
if (code === 200) {
|
|
||||||
message.success('修改成功!')
|
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkA.value = false
|
|
||||||
getDataA()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleEditA = (type: string, row: any = { type: 1 }) => {
|
|
||||||
if (!row) return
|
|
||||||
editA.value = { ...row }
|
|
||||||
// editA.value.stDateList = [row.stDate, row.stDate]
|
|
||||||
// stDateList.value = [row.stDate, row.stDate]
|
|
||||||
// setUserList.value =[]
|
|
||||||
shomkA.value = true
|
|
||||||
|
|
||||||
// editA.value.fileList = [{
|
|
||||||
// name: row.title,
|
|
||||||
// originalFilename: row.title,
|
|
||||||
// url: row.filePath,
|
|
||||||
// }]
|
|
||||||
// setUserList.value =row.userIdList
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDeleteA(index: number, row: any) {
|
|
||||||
const { id } = row
|
|
||||||
if (!id) return
|
|
||||||
const { code, msg } = await fetchYearPlanDel(id)
|
|
||||||
if (code === 200) {
|
|
||||||
message.success('删除成功!')
|
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
fetchDataList()
|
|
||||||
}
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const flg = ref()
|
|
||||||
const setUserList = ref()
|
|
||||||
async function getUser(row) {
|
|
||||||
console.log(row)
|
|
||||||
showModal.value = !showModal.value
|
|
||||||
flg.value = row
|
|
||||||
if (row.id && row.userIdList) {
|
|
||||||
setUserList.value = row.userIdList
|
|
||||||
}
|
|
||||||
// const {data: userArr} = await getBPCUser({moduleId})
|
|
||||||
// setUserList.value = userArr
|
|
||||||
}
|
|
||||||
// 获取子组件传过来的值
|
|
||||||
const userData = ref()
|
|
||||||
const handleChild = (data: any) => {
|
|
||||||
const { showModal: show, multipleSelection } = data
|
|
||||||
showModal.value = unref(show)
|
|
||||||
let userIdList: any[] = []
|
|
||||||
multipleSelection.value.forEach((i: { userId: any }) => {
|
|
||||||
userIdList.push(i.userId)
|
|
||||||
})
|
|
||||||
if (flg.value.id) {
|
|
||||||
flg.value.userIdList = userIdList
|
|
||||||
marketPreADD(flg.value)
|
|
||||||
getDataA()
|
|
||||||
console.log(flg.value)
|
|
||||||
}
|
|
||||||
userData.value = userIdList
|
|
||||||
}
|
|
||||||
const CloseThiss = (data: boolean) => {
|
|
||||||
showModal.value = data
|
|
||||||
}
|
|
||||||
const goBacks = () => {
|
|
||||||
history.back()
|
|
||||||
}
|
|
||||||
|
|
||||||
const editForm = ref(null)
|
|
||||||
const channelList = ref([
|
|
||||||
{
|
|
||||||
label: 'LME',
|
|
||||||
value: 'LME'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'SMM',
|
|
||||||
value: 'SMM'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
const handleClickA = async () => {
|
|
||||||
const req = { ...editA.value }
|
|
||||||
let flag = false
|
|
||||||
try {
|
|
||||||
} catch (error) {}
|
|
||||||
let res: any = req.id ? await fetchYearPlanEdit(req) : await fetchYearPlanAdd(req)
|
|
||||||
if (res.code == 200) {
|
|
||||||
shomkA.value = false
|
|
||||||
message.success('操作成功!')
|
|
||||||
fetchDataList()
|
|
||||||
} else {
|
|
||||||
message.error(res.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function generateDateRange() {
|
|
||||||
const [startDate, endDate] = stDateList.value || []
|
|
||||||
if (!startDate || !endDate) return []
|
|
||||||
const dateFormat = 'YYYY-MM-DD'
|
|
||||||
const dates = []
|
|
||||||
|
|
||||||
const start = dayjs(startDate, dateFormat)
|
|
||||||
const end = dayjs(endDate, dateFormat)
|
|
||||||
|
|
||||||
// 将开始日期添加到数组中
|
|
||||||
dates.push(start.format(dateFormat))
|
|
||||||
|
|
||||||
// 逐步增加日期,直到结束日期
|
|
||||||
let currentDate = start
|
|
||||||
while (currentDate.isSameOrBefore(end)) {
|
|
||||||
currentDate = currentDate.add(1, 'day')
|
|
||||||
dates.push(currentDate.format(dateFormat))
|
|
||||||
}
|
|
||||||
|
|
||||||
return dates
|
|
||||||
}
|
|
||||||
|
|
||||||
// 类型 1;调达本部 2: DSZ 3: DISH
|
|
||||||
const typeList = [
|
|
||||||
{
|
|
||||||
label: '调达本部',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'DSZ',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'DISH',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const handleClose = (tag: any) => {
|
|
||||||
editA.value = { type: 1 }
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<HomeHead class="top">
|
|
||||||
<template #content>
|
|
||||||
<!-- <HomeHeadSearch /> -->
|
|
||||||
</template>
|
|
||||||
</HomeHead>
|
|
||||||
<AppBlock class="w-full h-full p30px text-#000">
|
|
||||||
<div class="font-600 flex items-center">
|
|
||||||
<!-- <img src="./images/logo.svg" class="h56px mr21px" /> -->
|
|
||||||
<div class="text-36px text-#000">年度方针-数据管理</div>
|
|
||||||
</div>
|
|
||||||
<div class="cont relative w100% h900px overflow-y-auto">
|
|
||||||
<el-button type="primary" @click="handleEditA" class="my20px">新增年度方针</el-button>
|
|
||||||
<div
|
|
||||||
class="rounded-md cursor-pointer float-right mr-30px mt-20px px20px py10px z-200 bg-#f5f5f5 flex items-center justify-center w-100px"
|
|
||||||
@click="goBacks"
|
|
||||||
>
|
|
||||||
<el-icon><ArrowLeftBold size="18" /></el-icon> 返回
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
:data="contactList"
|
|
||||||
style="width: 100%"
|
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
height="740px"
|
|
||||||
>
|
|
||||||
<el-table-column label="标题" prop="title" />
|
|
||||||
<el-table-column label="内容" prop="content" />
|
|
||||||
<el-table-column label="文件路径" prop="filePath" />
|
|
||||||
<!-- <el-table-column label="手机号" prop="mobile" />
|
|
||||||
<el-table-column label="行号" prop="rowIndex" />
|
|
||||||
<el-table-column label="排序" prop="sort" />
|
|
||||||
<el-table-column label="创建时间" prop="createTime">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ dayjs(row.createTime).format('YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
|
|
||||||
<!-- <el-table-column label="查看范围" prop="userIdList">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.userIdList" v-for="it in scope.row.userIdList"> {{it.nickName}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="操作" width="180px">
|
|
||||||
<template #default="scope">
|
|
||||||
<template v-if="!scope.row.children?.length">
|
|
||||||
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
|
||||||
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<div class="absolute bottom-50px left-50% translate-x-[-50%] z-11">
|
|
||||||
<el-pagination
|
|
||||||
background
|
|
||||||
v-model:current-page="pageInfo.currentPage"
|
|
||||||
v-model:page-size="pageInfo.pageSize"
|
|
||||||
layout="prev, pager, next, total,jumper,->"
|
|
||||||
:total="pageInfo.total"
|
|
||||||
@current-change="fetchDataList"
|
|
||||||
/>
|
|
||||||
<!-- @size-change="handleSizeChange" -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
:z-index="200"
|
|
||||||
v-model="shomkA"
|
|
||||||
title=" "
|
|
||||||
width="30%"
|
|
||||||
:modal="false"
|
|
||||||
top="30vh"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<div class="bg-#FFF">
|
|
||||||
<el-form ref="editForm" :model="editA" label-width="100px" size="large">
|
|
||||||
<!-- <el-form-item label="部门" prop="dept">
|
|
||||||
<el-select v-model="editA.type" placeholder="选择部门" class="!w-100%">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<br /> -->
|
|
||||||
<el-form-item label="标题" prop="title">
|
|
||||||
<el-input v-model="editA.title" placeholder="请输入标题"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="内容" prop="content">
|
|
||||||
<el-input v-model="editA.content" placeholder="请输入内容"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="文件路径" prop="filePath">
|
|
||||||
<el-input v-model="editA.filePath" placeholder="请输入手机号"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<div class="text-center">
|
|
||||||
<el-button type="" @click="shomkA = false" class="mb-20px !mr-50rpx"> 取消</el-button>
|
|
||||||
<el-button type="primary" @click="handleClickA(editA)" class="mb-20px"> 确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<n-modal v-model:show="showModal">
|
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.demo-tabs > .el-tabs__content {
|
|
||||||
color: #6b778c;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -92px;
|
|
||||||
}
|
|
||||||
.flex-center {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
:deep(.el-input-number .el-input__inner) {
|
|
||||||
text-align: left !important;
|
|
||||||
}
|
|
||||||
:deep {
|
|
||||||
.el-dialog__body {
|
|
||||||
margin-top: 18px;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,19 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top"> </HomeHead>
|
<div class="page">
|
||||||
<div class="h-full relative flex flex-col">
|
<HomeHead class="top">
|
||||||
<div class="font-600 flex items-end mt30px">
|
<!-- <template #content>
|
||||||
<div class="text-36px">
|
<HomeHeadSearch />
|
||||||
{{ not.article.cate == 7 ? '外部新增-News' : '外部新增-重要通知' }}
|
</template> -->
|
||||||
</div>
|
</HomeHead>
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="back" @click="push({ name: 'external' })">返回首页</div>
|
||||||
<div class="text-18px">{{ week }}</div>
|
<div class="bg-#fff p30px rounded-5px mt40px overflow-y-auto max-h980px">
|
||||||
</div>
|
<n-form :label-width="900" size="medium" :model="formValue">
|
||||||
<div
|
|
||||||
class="q-wrapper flex-1 rounded-5px overflow-y-auto mt30px text-#142142 flex flex-col bg-#fff p30px"
|
|
||||||
>
|
|
||||||
<n-form :label-width="800" size="medium" :model="formValue">
|
|
||||||
<n-form-item label="标题" path="title">
|
<n-form-item label="标题" path="title">
|
||||||
<n-input class="w90%" v-model:value="formValue.title" placeholder="" />
|
<n-input v-model:value="formValue.title" placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item v-if="formValue.cate == 8" label="是否置顶" path="isTop">
|
<n-form-item v-if="formValue.cate == 8" label="是否置顶" path="isTop">
|
||||||
<n-radio-group v-model:value="formValue.isTop" name="radiogroup">
|
<n-radio-group v-model:value="formValue.isTop" name="radiogroup">
|
||||||
|
|
@ -39,7 +35,7 @@
|
||||||
<n-form-item label="内容" path="title">
|
<n-form-item label="内容" path="title">
|
||||||
<Editor @getChildData="handleChild" class="bg-#fff" />
|
<Editor @getChildData="handleChild" class="bg-#fff" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-button class="w-120px" @click="thisClick" v-if="formValue.cate == 8">
|
<n-button @click="thisClick" v-if="formValue.cate == 8">
|
||||||
情报公开范围
|
情报公开范围
|
||||||
</n-button>
|
</n-button>
|
||||||
<div class="mt15px h150px overflow-y-auto" v-if="formValue.cate == 8">
|
<div class="mt15px h150px overflow-y-auto" v-if="formValue.cate == 8">
|
||||||
|
|
@ -59,43 +55,16 @@
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
<n-button @click="showModal1 = true"> 文本内容预览</n-button>
|
<n-button @click="showModal1 = true"> 文本内容预览</n-button>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
|
<el-button type="primary" class="mt20px" @click="saveThis"
|
||||||
<n-form-item v-if="formValue.cate != 8" label="是否置顶">
|
>提交</el-button
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
inactive-value="Y"
|
|
||||||
active-value="N"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (formValue.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item label="发布时间" v-if="formValue.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formValue.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
|
||||||
</n-form-item>
|
|
||||||
<el-button type="primary" class="mt20px w-100px" @click="saveThis">提交</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="showModal1">
|
<n-modal v-model:show="showModal1">
|
||||||
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
||||||
<div class="overflow-y-auto h800px container" v-html="editorContent"></div>
|
<div
|
||||||
|
class="overflow-y-auto h800px container"
|
||||||
|
v-html="editorContent"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -113,8 +82,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Editor from '@/views/home/intelligence/components/TinyECE.vue'
|
import Editor from "@/views/home/intelligence/components/TinyECE.vue";
|
||||||
import UserPage from '../../home/intelligence/process/UserPages.vue'
|
import UserPage from "../../home/intelligence/process/UserPages.vue";
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NCard,
|
NCard,
|
||||||
|
|
@ -127,71 +96,68 @@ import {
|
||||||
NSpace,
|
NSpace,
|
||||||
NRadioGroup,
|
NRadioGroup,
|
||||||
useMessage,
|
useMessage,
|
||||||
treeDark
|
treeDark,
|
||||||
} from 'naive-ui'
|
} from "naive-ui";
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from "@/views/home/components/HomeHead.vue";
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
import { noticeld } from "@/stores/modules/noticeId";
|
||||||
import { saveArticle, trendsAdd } from '@/api/daikin/base'
|
import { saveArticle,trendsAdd } from "@/api/daikin/base";
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
const editorContent = ref();
|
||||||
import { pickerOptions } from '@/utils/date'
|
const { push } = useRouter();
|
||||||
const editorContent = ref()
|
const message = useMessage();
|
||||||
const { push } = useRouter()
|
const not = noticeld();
|
||||||
const message = useMessage()
|
|
||||||
const { day, week } = useDate()
|
|
||||||
const not = noticeld()
|
|
||||||
// const CloseThis = ()=>{
|
// const CloseThis = ()=>{
|
||||||
// mask.value = false
|
// mask.value = false
|
||||||
// }
|
// }
|
||||||
let formValue: any = ref({
|
let formValue: any = ref({
|
||||||
type: '1',
|
type: "1",
|
||||||
cate: not.article.cate,
|
cate: not.article.cate,
|
||||||
title: '',
|
title: "",
|
||||||
tag: '',
|
tag: "",
|
||||||
source: '',
|
source: "",
|
||||||
content: '',
|
content: "",
|
||||||
reviewSource: '3',
|
reviewSource: "3",
|
||||||
isTop: 'N',
|
isTop: "N",
|
||||||
treeSource: '3',
|
treeSource: "3",
|
||||||
isPublish: 0,
|
});
|
||||||
publishTime: ''
|
|
||||||
})
|
|
||||||
function escapeHTML(html: string): string {
|
function escapeHTML(html: string): string {
|
||||||
const tempElement = document.createElement('div')
|
const tempElement = document.createElement("div");
|
||||||
tempElement.textContent = html
|
tempElement.textContent = html;
|
||||||
return tempElement.innerHTML
|
return tempElement.innerHTML;
|
||||||
}
|
}
|
||||||
const handleClose = (tag: any) => {
|
const handleClose = (tag: any) => {
|
||||||
dataList.value.splice(dataList.value.indexOf(tag), 1)
|
dataList.value.splice(dataList.value.indexOf(tag), 1);
|
||||||
}
|
};
|
||||||
// 添加留言
|
// 添加留言
|
||||||
async function save() {
|
async function save() {
|
||||||
let userIdList: any[] = []
|
let userIdList: any[] = [];
|
||||||
const cont = editorContent.value
|
const cont = editorContent.value;
|
||||||
const content = escapeHTML(cont)
|
const content = escapeHTML(cont);
|
||||||
const { title, reviewSource, tag, treeSource, source, type, isTop, isPublish, publishTime } =
|
const { title, reviewSource, tag, treeSource, source, type, isTop } =
|
||||||
formValue.value
|
formValue.value;
|
||||||
const cate = not.article.cate
|
const cate = not.article.cate;
|
||||||
// console.log(formValue.value, content,cate)
|
// console.log(formValue.value, content,cate)
|
||||||
if (dataList.value) {
|
if (dataList.value) {
|
||||||
dataList.value.forEach((i: { userId: any }) => {
|
dataList.value.forEach((i: { userId: any }) => {
|
||||||
console.log(dataList.value)
|
console.log(dataList.value);
|
||||||
userIdList.push(i.userId)
|
userIdList.push(i.userId);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(formValue.value)
|
// console.log(formValue.value)
|
||||||
// if(userIdList.length<0) return
|
// if(userIdList.length<0) return
|
||||||
if (not.article.cate==='9') {
|
if (not.article.cate==='9') {
|
||||||
const { msg, code } = await trendsAdd({ title, content })
|
const { msg, code } = await trendsAdd({title,content});
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('新增成功')
|
message.success("新增成功");
|
||||||
} else {
|
} else {
|
||||||
message.success(msg)
|
message.success(msg);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
const { msg, code } = await saveArticle({
|
const { msg, code } = await saveArticle({
|
||||||
title,
|
title,
|
||||||
tag: '',
|
tag: "",
|
||||||
isTop,
|
isTop,
|
||||||
treeSource,
|
treeSource,
|
||||||
reviewSource,
|
reviewSource,
|
||||||
|
|
@ -200,50 +166,49 @@ async function save() {
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
userIdList,
|
userIdList,
|
||||||
isPublish,
|
});
|
||||||
publishTime
|
|
||||||
})
|
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('新增成功')
|
message.success("新增成功");
|
||||||
} else {
|
} else {
|
||||||
message.success(msg)
|
message.success(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push({ name: 'external' })
|
push({ name: "external" });
|
||||||
}
|
}
|
||||||
// 编辑器数据
|
// 编辑器数据
|
||||||
const handleChild = (data: string) => {
|
const handleChild = (data: string) => {
|
||||||
editorContent.value = data
|
editorContent.value = data;
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
}
|
};
|
||||||
// 添加
|
// 添加
|
||||||
const saveThis = (e: { preventDefault: () => void }) => {
|
const saveThis = (e: { preventDefault: () => void }) => {
|
||||||
e.preventDefault()
|
e.preventDefault();
|
||||||
save()
|
save();
|
||||||
}
|
};
|
||||||
const stores = noticeld()
|
const stores = noticeld();
|
||||||
const showModal = ref(false)
|
const showModal = ref(false);
|
||||||
const showModal1 = ref(false)
|
const showModal1 = ref(false);
|
||||||
const setUserList = ref()
|
const setUserList = ref();
|
||||||
const dataList = ref()
|
const dataList = ref();
|
||||||
const thisClick = () => {
|
const thisClick = () => {
|
||||||
showModal.value = true
|
showModal.value = true;
|
||||||
|
|
||||||
setUserList.value = dataList.value
|
setUserList.value = dataList.value;
|
||||||
stores.article.reviewSource = formValue.value.reviewSource
|
stores.article.reviewSource = formValue.value.reviewSource;
|
||||||
}
|
};
|
||||||
const CloseThis = (data: boolean) => {
|
const CloseThis = (data: boolean) => {
|
||||||
showModal.value = data
|
showModal.value = data;
|
||||||
}
|
};
|
||||||
const handleChild1 = (data: any) => {
|
const handleChild1 = (data: any) => {
|
||||||
const { showModal: show, multipleSelection } = data
|
const { showModal: show, multipleSelection } = data;
|
||||||
console.log(show)
|
console.log(show);
|
||||||
showModal.value = unref(show)
|
showModal.value = unref(show);
|
||||||
dataList.value = unref(multipleSelection)
|
dataList.value = unref(multipleSelection);
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
|
|
@ -260,28 +225,16 @@ const handleChild1 = (data: any) => {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.top {
|
.top {
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: -92px;
|
top: 0px;
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-wrapper {
|
|
||||||
border-radius: 18px;
|
|
||||||
border: 1px solid #e7ebf5;
|
|
||||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 100px;
|
// height: 100px;
|
||||||
font-family: 'PingFang SC';
|
font-family: "PingFang SC";
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
background-image: url('@/assets/images/bg.jpg');
|
background-image: url("@/assets/images/bg.jpg");
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -311,7 +264,7 @@ const handleChild1 = (data: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main {
|
.main {
|
||||||
background-image: url('@/assets/images/bg-rs-main.svg');
|
background-image: url("@/assets/images/bg-rs-main.svg");
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-size: auto;
|
background-size: auto;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ const userCode = ref(false)
|
||||||
const shormA = ref(false)
|
const shormA = ref(false)
|
||||||
const shormB = ref(false)
|
const shormB = ref(false)
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item) =>
|
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
console.log(isUpPwds.value, userCode.value)
|
console.log(isUpPwds.value, userCode.value)
|
||||||
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
||||||
|
|
@ -76,7 +76,8 @@ const fromtB = ref({
|
||||||
})
|
})
|
||||||
|
|
||||||
const addClickA = async () => {
|
const addClickA = async () => {
|
||||||
const { question1, question2, question3, question4, type, id, number } = fromtA.value
|
const { question1, question2, question3, question4, type, id, number } =
|
||||||
|
fromtA.value
|
||||||
if (type === 'edit') {
|
if (type === 'edit') {
|
||||||
const { code, msg } = await faqWithdraw({
|
const { code, msg } = await faqWithdraw({
|
||||||
addList: [
|
addList: [
|
||||||
|
|
@ -192,11 +193,15 @@ onMounted(async () => {
|
||||||
timeA.value = lastUTime
|
timeA.value = lastUTime
|
||||||
timeB.value = _lastUTime
|
timeB.value = _lastUTime
|
||||||
if (isUpPwds.value) {
|
if (isUpPwds.value) {
|
||||||
ElMessageBox.alert('为了您的帐号安全,此次登录必须更改密码', '重要提醒', {
|
ElMessageBox.alert(
|
||||||
|
'为了您的帐号安全,首次登录必须更改初始密码',
|
||||||
|
'重要提醒',
|
||||||
|
{
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
showClose: false,
|
showClose: false,
|
||||||
showCancelButton: false
|
showCancelButton: false
|
||||||
}).then(() => {
|
}
|
||||||
|
).then(() => {
|
||||||
push({ name: 'modify' })
|
push({ name: 'modify' })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -387,7 +392,8 @@ async function setModule(codes: any) {
|
||||||
const handleVisitsScoll = () => {
|
const handleVisitsScoll = () => {
|
||||||
const container = visitsScoll.value
|
const container = visitsScoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (visitPum < visitLength) {
|
if (visitPum < visitLength) {
|
||||||
++visitPum
|
++visitPum
|
||||||
|
|
@ -400,7 +406,8 @@ const handleVisitsScoll = () => {
|
||||||
const handleInvScoll = () => {
|
const handleInvScoll = () => {
|
||||||
const container = invsScoll.value
|
const container = invsScoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (invPum < invLength) {
|
if (invPum < invLength) {
|
||||||
++invPum
|
++invPum
|
||||||
|
|
@ -413,7 +420,8 @@ const handleInvScoll = () => {
|
||||||
const handleTabScoll = () => {
|
const handleTabScoll = () => {
|
||||||
const container = tabScll.value
|
const container = tabScll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (tabPume < tabLength) {
|
if (tabPume < tabLength) {
|
||||||
++tabPume
|
++tabPume
|
||||||
|
|
@ -427,7 +435,8 @@ const handleTabScoll = () => {
|
||||||
const handlePrScoll = () => {
|
const handlePrScoll = () => {
|
||||||
const container = portant.value
|
const container = portant.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (prpum < pLenght) {
|
if (prpum < pLenght) {
|
||||||
++prpum
|
++prpum
|
||||||
|
|
@ -441,7 +450,8 @@ const handlePrScoll = () => {
|
||||||
const handleNewScoll = () => {
|
const handleNewScoll = () => {
|
||||||
const container = newsSoll.value
|
const container = newsSoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (newPum < newLength) {
|
if (newPum < newLength) {
|
||||||
++newPum
|
++newPum
|
||||||
|
|
@ -455,7 +465,8 @@ const handleNewScoll = () => {
|
||||||
const handleMsgScoll = () => {
|
const handleMsgScoll = () => {
|
||||||
const container = msgScoll.value
|
const container = msgScoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (psgPum < maxMsgLingth) {
|
if (psgPum < maxMsgLingth) {
|
||||||
++psgPum
|
++psgPum
|
||||||
|
|
@ -572,7 +583,9 @@ const demandWithdraws = async (obj) => {
|
||||||
<template>
|
<template>
|
||||||
<div class="page w-1920px h-1080px p30px flex flex-col">
|
<div class="page w-1920px h-1080px p30px flex flex-col">
|
||||||
<div class="w300px -mr-1px flex flex-col shrink-0">
|
<div class="w300px -mr-1px flex flex-col shrink-0">
|
||||||
<div class="text-20px text-#fff font-600 mt6px">大金中国调达本部 HOMEPAGE</div>
|
<div class="text-20px text-#fff font-600 mt6px">
|
||||||
|
大金中国调达本部 HOMEPAGE
|
||||||
|
</div>
|
||||||
<!-- @dblclick="toggle" -->
|
<!-- @dblclick="toggle" -->
|
||||||
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
|
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -601,21 +614,26 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="cards w34% h800px page-wrapper">
|
<div class="cards w34% h800px page-wrapper">
|
||||||
<div class="cards_title">News</div>
|
<div class="cards_title">News</div>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false && userCode"
|
v-if="userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="absolute right-164px top-15px"
|
class="absolute right-164px top-15px"
|
||||||
@click="push('/external/Process')"
|
@click="push('/external/Process')"
|
||||||
>流程列表</el-button
|
>流程列表</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false && userCode"
|
v-if="userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="absolute right-80px top-15px"
|
class="absolute right-80px top-15px"
|
||||||
@click="toDetail2(7)"
|
@click="toDetail2(7)"
|
||||||
>+ 新增</el-button
|
>+ 新增</el-button
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
|
style="
|
||||||
|
border: #417bef 1px solid;
|
||||||
|
color: #417bef;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 30px;
|
||||||
|
"
|
||||||
class="mr15px mt17px flex px5px pt6px"
|
class="mr15px mt17px flex px5px pt6px"
|
||||||
@click="toList(7)"
|
@click="toList(7)"
|
||||||
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
||||||
|
|
@ -627,8 +645,15 @@ const demandWithdraws = async (obj) => {
|
||||||
<ArrowRightBold />
|
<ArrowRightBold />
|
||||||
</el-icon> -->
|
</el-icon> -->
|
||||||
</div>
|
</div>
|
||||||
<div ref="newsSoll" class="p20px w100% h355px cent_box overflow-y-auto">
|
<div
|
||||||
<div v-if="newsList" class="text-#152242 truncate-box text-18px" v-for="i in newsList">
|
ref="newsSoll"
|
||||||
|
class="p20px w100% h355px cent_box overflow-y-auto"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="newsList"
|
||||||
|
class="text-#152242 truncate-box text-18px"
|
||||||
|
v-for="i in newsList"
|
||||||
|
>
|
||||||
<div class="truncate" @click="toDetail(i, 'App_E_News')">
|
<div class="truncate" @click="toDetail(i, 'App_E_News')">
|
||||||
<img
|
<img
|
||||||
v-if="i.tag === 'New'"
|
v-if="i.tag === 'New'"
|
||||||
|
|
@ -640,12 +665,16 @@ const demandWithdraws = async (obj) => {
|
||||||
class="text-#fff bg-red p5px text-18px rounded-5px mr-5px badge-24"
|
class="text-#fff bg-red p5px text-18px rounded-5px mr-5px badge-24"
|
||||||
>置顶</span
|
>置顶</span
|
||||||
>
|
>
|
||||||
<span :style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''" :title="i.title">{{
|
<span
|
||||||
i.title
|
:style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''"
|
||||||
}}</span>
|
:title="i.title"
|
||||||
|
>{{ i.title }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0">
|
<div
|
||||||
|
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0"
|
||||||
|
>
|
||||||
{{ i.createTime.substring(0, 10) }}
|
{{ i.createTime.substring(0, 10) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -659,31 +688,41 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="icons w20px h20px mt15px absolute right-20px top-0"></div>
|
<div class="icons w20px h20px mt15px absolute right-20px top-0"></div>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">重要通知</div>
|
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">
|
||||||
|
重要通知
|
||||||
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false && userCode"
|
v-if="userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="mt0px mr0px"
|
class="mt0px mr0px"
|
||||||
@click="push({ path: '/external/Process', query: { cate: '8' } })"
|
@click="push({ path: '/external/Process', query: { cate: '8' } })"
|
||||||
>流程列表</el-button
|
>流程列表</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="false && userCode"
|
v-if="userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="mt0px mr10px"
|
class="mt0px mr10px"
|
||||||
@click="toDetail2(8)"
|
@click="toDetail2(8)"
|
||||||
>+ 新增</el-button
|
>+ 新增</el-button
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
|
style="
|
||||||
|
border: #417bef 1px solid;
|
||||||
|
color: #417bef;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 30px;
|
||||||
|
"
|
||||||
class="mr15px mt2px flex px5px pt6px"
|
class="mr15px mt2px flex px5px pt6px"
|
||||||
@click="toList(8)"
|
@click="toList(8)"
|
||||||
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
||||||
></span>
|
></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ref="portant" class="p20px pt0px w100% h355px cent_box overflow-y-auto">
|
<div
|
||||||
|
ref="portant"
|
||||||
|
class="p20px pt0px w100% h355px cent_box overflow-y-auto"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
v-if="portantList"
|
v-if="portantList"
|
||||||
class="text-#152242 truncate-box text-18px"
|
class="text-#152242 truncate-box text-18px"
|
||||||
|
|
@ -701,12 +740,16 @@ const demandWithdraws = async (obj) => {
|
||||||
class="text-#fff bg-red p5px text-14px rounded-5px mr-5px badge-24"
|
class="text-#fff bg-red p5px text-14px rounded-5px mr-5px badge-24"
|
||||||
>置顶</span
|
>置顶</span
|
||||||
>
|
>
|
||||||
<span :style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''" :title="i.title">{{
|
<span
|
||||||
i.title
|
:style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''"
|
||||||
}}</span>
|
:title="i.title"
|
||||||
|
>{{ i.title }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0">
|
<div
|
||||||
|
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0"
|
||||||
|
>
|
||||||
{{ i.createTime.substring(0, 10) }}
|
{{ i.createTime.substring(0, 10) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -719,7 +762,9 @@ const demandWithdraws = async (obj) => {
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cards w64% h800px !shadow-none !bg-transparent page-wrapper">
|
<div
|
||||||
|
class="cards w64% h800px !shadow-none !bg-transparent page-wrapper"
|
||||||
|
>
|
||||||
<div class="cards w760px h385px cursor-pointer">
|
<div class="cards w760px h385px cursor-pointer">
|
||||||
<div class="cards_title">市况汇率每日更新</div>
|
<div class="cards_title">市况汇率每日更新</div>
|
||||||
<div class="cards_nav cards_nav2 !top--3px !right--1px">
|
<div class="cards_nav cards_nav2 !top--3px !right--1px">
|
||||||
|
|
@ -762,7 +807,11 @@ const demandWithdraws = async (obj) => {
|
||||||
>
|
>
|
||||||
<td>{{ it.channel }}</td>
|
<td>{{ it.channel }}</td>
|
||||||
<td>{{ it.negAmount }}</td>
|
<td>{{ it.negAmount }}</td>
|
||||||
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
<td
|
||||||
|
:class="
|
||||||
|
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
{{ displayDiffValue(it.diffValue) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -795,7 +844,11 @@ const demandWithdraws = async (obj) => {
|
||||||
>
|
>
|
||||||
<td>{{ it.channel }}</td>
|
<td>{{ it.channel }}</td>
|
||||||
<td>{{ it.negAmount }}</td>
|
<td>{{ it.negAmount }}</td>
|
||||||
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
<td
|
||||||
|
:class="
|
||||||
|
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
{{ displayDiffValue(it.diffValue) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -832,9 +885,15 @@ const demandWithdraws = async (obj) => {
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
||||||
>
|
>
|
||||||
<td>{{ it.currencyCodeFrom }}-{{ it.currencyNameTo }}</td>
|
<td>
|
||||||
|
{{ it.currencyCodeFrom }}-{{ it.currencyNameTo }}
|
||||||
|
</td>
|
||||||
<td>{{ it.negAmount }}</td>
|
<td>{{ it.negAmount }}</td>
|
||||||
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
<td
|
||||||
|
:class="
|
||||||
|
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
{{ displayDiffValue(it.diffValue) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -868,7 +927,10 @@ const demandWithdraws = async (obj) => {
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@click="
|
@click="
|
||||||
openNewWindow('App_E_Link_GPROC', 'https://edi.daikin.net.cn:8443/gproc/')
|
openNewWindow(
|
||||||
|
'App_E_Link_GPROC',
|
||||||
|
'https://edi.daikin.net.cn:8443/gproc/'
|
||||||
|
)
|
||||||
"
|
"
|
||||||
class="text-#142142"
|
class="text-#142142"
|
||||||
>
|
>
|
||||||
|
|
@ -882,7 +944,12 @@ const demandWithdraws = async (obj) => {
|
||||||
>2</span
|
>2</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@click="openNewWindow('App_E_Link_DELTA', 'https://edi.daikin.net.cn')"
|
@click="
|
||||||
|
openNewWindow(
|
||||||
|
'App_E_Link_DELTA',
|
||||||
|
'https://edi.daikin.net.cn'
|
||||||
|
)
|
||||||
|
"
|
||||||
class="text-#142142"
|
class="text-#142142"
|
||||||
>
|
>
|
||||||
DELTA</span
|
DELTA</span
|
||||||
|
|
@ -914,7 +981,10 @@ const demandWithdraws = async (obj) => {
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@click="
|
@click="
|
||||||
openNewWindow('App_E_Link_DaiKin_Site', 'https://www.daikin-china.com.cn/')
|
openNewWindow(
|
||||||
|
'App_E_Link_DaiKin_Site',
|
||||||
|
'https://www.daikin-china.com.cn/'
|
||||||
|
)
|
||||||
"
|
"
|
||||||
class="text-#142142"
|
class="text-#142142"
|
||||||
>
|
>
|
||||||
|
|
@ -931,7 +1001,9 @@ const demandWithdraws = async (obj) => {
|
||||||
@click="openNewWindow('App_E_Link_DaiKin_CAN', 'shorm')"
|
@click="openNewWindow('App_E_Link_DaiKin_CAN', 'shorm')"
|
||||||
class="text-#142142"
|
class="text-#142142"
|
||||||
>
|
>
|
||||||
<a target="_blank" style="color: inherit">大金空调中国相关</a></span
|
<a target="_blank" style="color: inherit"
|
||||||
|
>大金空调中国相关</a
|
||||||
|
></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1013,10 +1085,26 @@ const demandWithdraws = async (obj) => {
|
||||||
'font-size': '18px'
|
'font-size': '18px'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-table-column property="title" label="调查表名称" align="left" />
|
<el-table-column
|
||||||
<el-table-column property="fillCTime" label="填表日期" align="center" />
|
property="title"
|
||||||
<el-table-column property="fillRangeDate" label="填表期间" align="center" />
|
label="调查表名称"
|
||||||
<el-table-column property="status" label="填报状态" align="center" />
|
align="left"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
property="fillCTime"
|
||||||
|
label="填表日期"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
property="fillRangeDate"
|
||||||
|
label="填表期间"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
property="status"
|
||||||
|
label="填报状态"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1082,7 +1170,13 @@ const demandWithdraws = async (obj) => {
|
||||||
<!-- lujinli -->
|
<!-- lujinli -->
|
||||||
<span v-if="flgs == 1" class="text-18px">{{ i.number }}</span>
|
<span v-if="flgs == 1" class="text-18px">{{ i.number }}</span>
|
||||||
<span v-if="flgs == 2" class="text-18px">{{
|
<span v-if="flgs == 2" class="text-18px">{{
|
||||||
i.demand + ' ' + i.location + ' ' + i.remark + ': ' + i.usdObj
|
i.demand +
|
||||||
|
' ' +
|
||||||
|
i.location +
|
||||||
|
' ' +
|
||||||
|
i.remark +
|
||||||
|
': ' +
|
||||||
|
i.usdObj
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="flgs == 3" class="text-18px">{{ i.title }}</span>
|
<span v-if="flgs == 3" class="text-18px">{{ i.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1122,7 +1216,9 @@ const demandWithdraws = async (obj) => {
|
||||||
@click="deleteMSG(i)"
|
@click="deleteMSG(i)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="flgs == 3" class="absolute right-0px top-18px">{{ i.createTime }}</span>
|
<span v-if="flgs == 3" class="absolute right-0px top-18px">{{
|
||||||
|
i.createTime
|
||||||
|
}}</span>
|
||||||
<span v-if="flgs == 2" class="absolute right-80px top-10px">{{
|
<span v-if="flgs == 2" class="absolute right-80px top-10px">{{
|
||||||
i.procureTime
|
i.procureTime
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
@ -1143,28 +1239,61 @@ const demandWithdraws = async (obj) => {
|
||||||
<div v-if="!msgList?.length" class="text-#808696 w515px">
|
<div v-if="!msgList?.length" class="text-#808696 w515px">
|
||||||
<div>
|
<div>
|
||||||
<!-- lujinli -->
|
<!-- lujinli -->
|
||||||
<span v-if="flgs == 1" class="text-18px" style="margin-left: 40%; display: flex">
|
<span
|
||||||
<div v-if="userCode" class="flex items-center justify-center flex-col">
|
v-if="flgs == 1"
|
||||||
<img src="./images/zanwly.png" alt="" style="margin-right: 50px" />
|
class="text-18px"
|
||||||
<p style="text-align: center; color: #dde5fd">暂无供方留言</p>
|
style="margin-left: 40%; display: flex"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="userCode"
|
||||||
|
class="flex items-center justify-center flex-col"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="./images/zanwly.png"
|
||||||
|
alt=""
|
||||||
|
style="margin-right: 50px"
|
||||||
|
/>
|
||||||
|
<p style="text-align: center; color: #dde5fd">
|
||||||
|
暂无供方留言
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex items-center justify-center flex-col">
|
<div
|
||||||
|
v-else
|
||||||
|
class="flex items-center justify-center flex-col"
|
||||||
|
>
|
||||||
<img src="./images/zanwly2.png" alt="" />
|
<img src="./images/zanwly2.png" alt="" />
|
||||||
<span style="display: flex; margin: 5px auto; color: #dde5fd"
|
<span
|
||||||
|
style="display: flex; margin: 5px auto; color: #dde5fd"
|
||||||
>您暂未留言</span
|
>您暂未留言</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="flgs == 2" class="text-18px" style="margin-left: 40%; display: flex">
|
<span
|
||||||
<div v-if="userCode" class="flex items-center justify-center flex-col">
|
v-if="flgs == 2"
|
||||||
<img src="./images/zanwly.png" alt="" style="margin-right: 50px" />
|
class="text-18px"
|
||||||
<span style="display: flex; margin: 5px auto; color: #dde5fd"
|
style="margin-left: 40%; display: flex"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-if="userCode"
|
||||||
|
class="flex items-center justify-center flex-col"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="./images/zanwly.png"
|
||||||
|
alt=""
|
||||||
|
style="margin-right: 50px"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
style="display: flex; margin: 5px auto; color: #dde5fd"
|
||||||
>暂无提供方留言</span
|
>暂无提供方留言</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex items-center justify-center flex-col">
|
<div
|
||||||
|
v-else
|
||||||
|
class="flex items-center justify-center flex-col"
|
||||||
|
>
|
||||||
<img src="./images/zanwly2.png" alt="" />
|
<img src="./images/zanwly2.png" alt="" />
|
||||||
<span style="display: flex; margin: 5px auto; color: #dde5fd"
|
<span
|
||||||
|
style="display: flex; margin: 5px auto; color: #dde5fd"
|
||||||
>您暂未留言</span
|
>您暂未留言</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1178,7 +1307,10 @@ const demandWithdraws = async (obj) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<n-modal v-model:show="shormA" class="w-940px h740px rd-20px relative bg-#fff">
|
<n-modal
|
||||||
|
v-model:show="shormA"
|
||||||
|
class="w-940px h740px rd-20px relative bg-#fff"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
|
|
@ -1198,7 +1330,13 @@ const demandWithdraws = async (obj) => {
|
||||||
<div
|
<div
|
||||||
size="40"
|
size="40"
|
||||||
color="#ccc"
|
color="#ccc"
|
||||||
style="font-size: 20px; margin: 10px; width: 18.09px; height: 18.21px; color: #b2b2b2"
|
style="
|
||||||
|
font-size: 20px;
|
||||||
|
margin: 10px;
|
||||||
|
width: 18.09px;
|
||||||
|
height: 18.21px;
|
||||||
|
color: #b2b2b2;
|
||||||
|
"
|
||||||
@click="close1"
|
@click="close1"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|
@ -1215,7 +1353,12 @@ const demandWithdraws = async (obj) => {
|
||||||
</div>
|
</div>
|
||||||
<!-- 内容区 -->
|
<!-- 内容区 -->
|
||||||
<div
|
<div
|
||||||
style="border-top: 1px solid #e1e1e1; width: 100%; padding-top: 38px; padding-left: 38px"
|
style="
|
||||||
|
border-top: 1px solid #e1e1e1;
|
||||||
|
width: 100%;
|
||||||
|
padding-top: 38px;
|
||||||
|
padding-left: 38px;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
|
|
@ -1344,7 +1487,12 @@ const demandWithdraws = async (obj) => {
|
||||||
<span
|
<span
|
||||||
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
|
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
|
||||||
@click="shormA = false"
|
@click="shormA = false"
|
||||||
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #ffffff"
|
style="
|
||||||
|
width: 100px;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
background: #ffffff;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
|
|
@ -1363,7 +1511,12 @@ const demandWithdraws = async (obj) => {
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
|
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
|
||||||
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #3870e5"
|
style="
|
||||||
|
width: 100px;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
background: #3870e5;
|
||||||
|
"
|
||||||
@click="addClickA"
|
@click="addClickA"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -1415,7 +1568,13 @@ const demandWithdraws = async (obj) => {
|
||||||
<div
|
<div
|
||||||
size="40"
|
size="40"
|
||||||
color="#ccc"
|
color="#ccc"
|
||||||
style="font-size: 20px; margin: 10px; width: 18.09px; height: 18.21px; color: #b2b2b2"
|
style="
|
||||||
|
font-size: 20px;
|
||||||
|
margin: 10px;
|
||||||
|
width: 18.09px;
|
||||||
|
height: 18.21px;
|
||||||
|
color: #b2b2b2;
|
||||||
|
"
|
||||||
@click="close1"
|
@click="close1"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
|
@ -1430,7 +1589,9 @@ const demandWithdraws = async (obj) => {
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="border-top: 1px solid #e1e1e1; width: 100%; padding-left: 38px">
|
<div
|
||||||
|
style="border-top: 1px solid #e1e1e1; width: 100%; padding-left: 38px"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
@ -1577,7 +1738,12 @@ const demandWithdraws = async (obj) => {
|
||||||
<span
|
<span
|
||||||
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
|
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
|
||||||
@click="shormB = false"
|
@click="shormB = false"
|
||||||
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #ffffff"
|
style="
|
||||||
|
width: 100px;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
background: #ffffff;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style="
|
style="
|
||||||
|
|
@ -1596,7 +1762,12 @@ const demandWithdraws = async (obj) => {
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
|
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
|
||||||
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #3870e5"
|
style="
|
||||||
|
width: 100px;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 5px 5px 5px 5px;
|
||||||
|
background: #3870e5;
|
||||||
|
"
|
||||||
@click="addClickB"
|
@click="addClickB"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -1622,7 +1793,11 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="w700px h430px bg-#fff rd-15px">
|
<div class="w700px h430px bg-#fff rd-15px">
|
||||||
<div
|
<div
|
||||||
class="py5px px15px"
|
class="py5px px15px"
|
||||||
style="border-bottom: 1px solid #dadada; font-weight: bold; color: #494a63"
|
style="
|
||||||
|
border-bottom: 1px solid #dadada;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #494a63;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
大金空调中国相关
|
大金空调中国相关
|
||||||
<img
|
<img
|
||||||
|
|
@ -1634,13 +1809,17 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="flex mt70px text-center">
|
<div class="flex mt70px text-center">
|
||||||
<div class="w-full text-center">
|
<div class="w-full text-center">
|
||||||
<img src="@/assets/images/ewm1@2x.png" class="w200px" />
|
<img src="@/assets/images/ewm1@2x.png" class="w200px" />
|
||||||
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
|
<div
|
||||||
|
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
|
||||||
|
>
|
||||||
大金空调中国视频号
|
大金空调中国视频号
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<img src="@/assets/images/ewm2@2x.png" class="w200px" />
|
<img src="@/assets/images/ewm2@2x.png" class="w200px" />
|
||||||
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
|
<div
|
||||||
|
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
|
||||||
|
>
|
||||||
大金空调抖音号
|
大金空调抖音号
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getImg } from './images'
|
import { getImg } from "./images";
|
||||||
import {
|
import {
|
||||||
getNoticeList,
|
getNoticeList,
|
||||||
deleteWithdraw,
|
deleteWithdraw,
|
||||||
getManagerList,
|
getManagerList,
|
||||||
getExternalManagerDetail, // news/重要通知-流程详情
|
getExternalManagerDetail, // news/重要通知-流程详情
|
||||||
externalWithdraw, // news/重要通知-撤回
|
externalWithdraw, // news/重要通知-撤回
|
||||||
getExternalManagerList // news/重要通知-流程列表
|
getExternalManagerList, // news/重要通知-流程列表
|
||||||
} from '@/api/daikin/base'
|
} from "@/api/daikin/base";
|
||||||
import Editor from '@/views/home/intelligence/components/TinyECE.vue'
|
import Editor from "@/views/home/intelligence/components/TinyECE.vue";
|
||||||
import UserPage from '../../home/intelligence/process/UserPages.vue'
|
import UserPage from "../../home/intelligence/process/UserPages.vue";
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NCard,
|
NCard,
|
||||||
|
|
@ -24,137 +24,137 @@ import {
|
||||||
useMessage,
|
useMessage,
|
||||||
treeDark,
|
treeDark,
|
||||||
NTag
|
NTag
|
||||||
} from 'naive-ui'
|
} from "naive-ui";
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from "@/views/home/components/HomeHead.vue";
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
import { noticeld } from "@/stores/modules/noticeId";
|
||||||
import { saveArticle } from '@/api/daikin/base'
|
import { saveArticle } from "@/api/daikin/base";
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
const editorContent = ref();
|
||||||
const editorContent = ref()
|
const { push } = useRouter();
|
||||||
const { push } = useRouter()
|
const message = useMessage();
|
||||||
const message = useMessage()
|
const not = noticeld();
|
||||||
const not = noticeld()
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const activeNames = ref('2')
|
const activeNames = ref("2");
|
||||||
const Status = reactive({
|
const Status = reactive({
|
||||||
reviewStatus: 1,
|
reviewStatus: 1,
|
||||||
reviewSource: 2
|
reviewSource: 2,
|
||||||
})
|
});
|
||||||
const cate = ref('7')
|
const cate = ref('7')
|
||||||
const activeName = ref('0')
|
const activeName = ref("0");
|
||||||
const tabIndex = ref('0')
|
const tabIndex = ref("0");
|
||||||
const tabs = ref([
|
const tabs = ref([
|
||||||
{
|
{
|
||||||
name: '审核中',
|
name: "审核中",
|
||||||
icon: getImg('shhz2@2x.png'),
|
icon: getImg("shhz2@2x.png"),
|
||||||
icons: getImg('shhz1@2x.png'),
|
icons: getImg("shhz1@2x.png"),
|
||||||
id: 0
|
id: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已审核',
|
name: "已审核",
|
||||||
icon: getImg('wanc2@2x.png'),
|
icon: getImg("wanc2@2x.png"),
|
||||||
icons: getImg('wanc1@2x.png'),
|
icons: getImg("wanc1@2x.png"),
|
||||||
id: 1
|
id: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '驳回/撤回',
|
name: "驳回/撤回",
|
||||||
icon: getImg('boh2@2x.png'),
|
icon: getImg("boh2@2x.png"),
|
||||||
icons: getImg('boh1@2x.png'),
|
icons: getImg("boh1@2x.png"),
|
||||||
id: 2
|
id: 2,
|
||||||
}
|
},
|
||||||
])
|
]);
|
||||||
const listData = ref<any>([])
|
const listData = ref<any>([]);
|
||||||
|
|
||||||
const store2 = useUserStore()
|
const store2 = useUserStore();
|
||||||
// 二级
|
// 二级
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
tabIndex.value = tab.index
|
tabIndex.value = tab.index;
|
||||||
switch (tab.index) {
|
switch (tab.index) {
|
||||||
case '0':
|
case "0":
|
||||||
getPageList('1')
|
getPageList("1");
|
||||||
break
|
break;
|
||||||
case '1':
|
case "1":
|
||||||
// 审核通过
|
// 审核通过
|
||||||
getPageList('3')
|
getPageList("3");
|
||||||
break
|
break;
|
||||||
case '2':
|
case "2":
|
||||||
// 撤销驳回
|
// 撤销驳回
|
||||||
getPageList('4')
|
getPageList("4");
|
||||||
break
|
break;
|
||||||
default:
|
default:
|
||||||
getPageList('1')
|
getPageList("1");
|
||||||
break
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
async function getPageList(reviewStatus: string) {
|
async function getPageList(reviewStatus: string) {
|
||||||
const { pageNum, pageSize } = pageInfo
|
const { pageNum, pageSize } = pageInfo;
|
||||||
const resp = await getExternalManagerList({
|
const resp = await getExternalManagerList({
|
||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
reviewStatus,
|
reviewStatus,
|
||||||
cate: cate.value
|
cate: cate.value,
|
||||||
})
|
});
|
||||||
// listData.value = [];
|
// listData.value = [];
|
||||||
listData.value = resp?.rows || []
|
listData.value = resp?.rows || [];
|
||||||
}
|
}
|
||||||
// 撤回按钮
|
// 撤回按钮
|
||||||
const clickCancel = (data: any) => {
|
const clickCancel = (data: any) => {
|
||||||
const { id, noticeId, reviewStatus } = data
|
const { id, noticeId, reviewStatus } = data;
|
||||||
externalWithdraw(id).then((res) => {
|
externalWithdraw(id).then((res) => {
|
||||||
console.log(res, '删除结果')
|
console.log(res, "删除结果");
|
||||||
getPageList('1')
|
getPageList("1");
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
let formValue: any = ref({
|
let formValue: any = ref({
|
||||||
type: '1',
|
type: "1",
|
||||||
cate: not.article.cate,
|
cate: not.article.cate,
|
||||||
title: '',
|
title: "",
|
||||||
tag: '',
|
tag: "",
|
||||||
source: '',
|
source: "",
|
||||||
content: '',
|
content: "",
|
||||||
reviewSource: '3',
|
reviewSource: "3",
|
||||||
isTop: 'N',
|
isTop: "N",
|
||||||
treeSource: '1'
|
treeSource: "1",
|
||||||
})
|
});
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: '1',
|
type: "1",
|
||||||
cate: '7',
|
cate: "7",
|
||||||
total: 10
|
total: 10,
|
||||||
})
|
});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
cate.value = route.query.cate
|
cate.value = route.query.cate
|
||||||
getPageList('1')
|
getPageList("1");
|
||||||
})
|
});
|
||||||
function escapeHTML(html: string): string {
|
function escapeHTML(html: string): string {
|
||||||
const tempElement = document.createElement('div')
|
const tempElement = document.createElement("div");
|
||||||
tempElement.textContent = html
|
tempElement.textContent = html;
|
||||||
return tempElement.innerHTML
|
return tempElement.innerHTML;
|
||||||
}
|
}
|
||||||
const handleClose = (tag: any) => {
|
const handleClose = (tag: any) => {
|
||||||
dataList.value.splice(dataList.value.indexOf(tag), 1)
|
dataList.value.splice(dataList.value.indexOf(tag), 1);
|
||||||
}
|
};
|
||||||
// 添加留言
|
// 添加留言
|
||||||
async function save() {
|
async function save() {
|
||||||
let userIdList: any[] = []
|
let userIdList: any[] = [];
|
||||||
const cont = editorContent.value
|
const cont = editorContent.value;
|
||||||
const content = escapeHTML(cont)
|
const content = escapeHTML(cont);
|
||||||
const { title, reviewSource, tag, treeSource, source, type, isTop } = formValue.value
|
const { title, reviewSource, tag, treeSource, source, type, isTop } =
|
||||||
const cate = not.article.cate
|
formValue.value;
|
||||||
|
const cate = not.article.cate;
|
||||||
// console.log(formValue.value, content,cate)
|
// console.log(formValue.value, content,cate)
|
||||||
if (dataList.value) {
|
if (dataList.value) {
|
||||||
dataList.value.forEach((i: { userId: any }) => {
|
dataList.value.forEach((i: { userId: any }) => {
|
||||||
console.log(dataList.value)
|
console.log(dataList.value);
|
||||||
userIdList.push(i.userId)
|
userIdList.push(i.userId);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(formValue.value)
|
// console.log(formValue.value)
|
||||||
// if(userIdList.length<0) return
|
// if(userIdList.length<0) return
|
||||||
const { msg, code } = await saveArticle({
|
const { msg, code } = await saveArticle({
|
||||||
title,
|
title,
|
||||||
tag: '',
|
tag: "",
|
||||||
isTop,
|
isTop,
|
||||||
treeSource,
|
treeSource,
|
||||||
reviewSource,
|
reviewSource,
|
||||||
|
|
@ -162,57 +162,54 @@ async function save() {
|
||||||
cate,
|
cate,
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
userIdList
|
userIdList,
|
||||||
})
|
});
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('新增成功')
|
message.success("新增成功");
|
||||||
} else {
|
} else {
|
||||||
message.success(msg)
|
message.success(msg);
|
||||||
}
|
}
|
||||||
push({ name: 'external' })
|
push({ name: "external" });
|
||||||
}
|
}
|
||||||
// 编辑器数据
|
// 编辑器数据
|
||||||
const handleChild = (data: string) => {
|
const handleChild = (data: string) => {
|
||||||
editorContent.value = data
|
editorContent.value = data;
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
}
|
};
|
||||||
// 添加
|
// 添加
|
||||||
const saveThis = (e: { preventDefault: () => void }) => {
|
const saveThis = (e: { preventDefault: () => void }) => {
|
||||||
e.preventDefault()
|
e.preventDefault();
|
||||||
save()
|
save();
|
||||||
}
|
};
|
||||||
const { day, week } = useDate()
|
const stores = noticeld();
|
||||||
const stores = noticeld()
|
const showModal = ref(false);
|
||||||
const showModal = ref(false)
|
const setUserList = ref();
|
||||||
const setUserList = ref()
|
const dataList = ref();
|
||||||
const dataList = ref()
|
|
||||||
const thisClick = () => {
|
const thisClick = () => {
|
||||||
showModal.value = true
|
showModal.value = true;
|
||||||
setUserList.value = dataList.value
|
setUserList.value = dataList.value;
|
||||||
stores.article.reviewSource = formValue.value.reviewSource
|
stores.article.reviewSource = formValue.value.reviewSource;
|
||||||
}
|
};
|
||||||
const CloseThis = (data: boolean) => {
|
const CloseThis = (data: boolean) => {
|
||||||
showModal.value = data
|
showModal.value = data;
|
||||||
}
|
};
|
||||||
const handleChild1 = (data: any) => {
|
const handleChild1 = (data: any) => {
|
||||||
const { showModal: show, multipleSelection } = data
|
const { showModal: show, multipleSelection } = data;
|
||||||
console.log('🚀 ~ file: index.vue:197 ~ data:', data)
|
console.log("🚀 ~ file: index.vue:197 ~ data:", data)
|
||||||
// showModal.value = unref(show);
|
// showModal.value = unref(show);
|
||||||
// dataList.value = unref(multipleSelection);
|
// dataList.value = unref(multipleSelection);
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top"> </HomeHead>
|
<div class="page">
|
||||||
<div class="h-full relative flex flex-col">
|
<HomeHead class="top">
|
||||||
<div class="font-600 flex items-end mt30px">
|
<!-- <template #content>
|
||||||
<div class="text-36px">{{ cate == 7 ? '外部审批流程-News' : '外部审批流程-重要通知' }}</div>
|
<HomeHeadSearch />
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
</template> -->
|
||||||
<div class="text-18px">{{ week }}</div>
|
</HomeHead>
|
||||||
</div>
|
<div class="back" @click="push({ name: 'external' })">返回首页</div>
|
||||||
<div
|
<div class="bg-#fff p30px rounded-5px mt40px overflow-y-scroll h900px">
|
||||||
class="q-wrapper flex-1 rounded-5px mt30px overflow-y-scroll h900px text-#142142 flex flex-col bg-#fff p30px"
|
|
||||||
>
|
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane v-for="item in tabs" :key="item">
|
<el-tab-pane v-for="item in tabs" :key="item">
|
||||||
<template #label>
|
<template #label>
|
||||||
|
|
@ -266,20 +263,28 @@ const handleChild1 = (data: any) => {
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="i.firstReviewName">
|
<el-dropdown-item v-if="i.firstReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
<span class="min-w120px"
|
||||||
|
>初审人:{{ i.firstReviewName }}</span
|
||||||
|
>
|
||||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
<span class="min-w120px"
|
||||||
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
>终审人:{{ i.ultimateReviewName }}</span
|
||||||
|
>
|
||||||
|
<span class="ml20px"
|
||||||
|
>终审时间:{{ i.ultimateReviewTime }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
||||||
|
i.createTime
|
||||||
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-if="store2.user.isReview > 0 && i.publishName"
|
v-if="store2.user.isReview > 0 && i.publishName"
|
||||||
class="ml20px text-#808696 text-16px flex-1"
|
class="ml20px text-#808696 text-16px flex-1"
|
||||||
|
|
@ -309,28 +314,16 @@ const handleChild1 = (data: any) => {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.top {
|
.top {
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: -92px;
|
top: 0px;
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-wrapper {
|
|
||||||
border-radius: 18px;
|
|
||||||
border: 1px solid #e7ebf5;
|
|
||||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 100px;
|
// height: 100px;
|
||||||
font-family: 'PingFang SC';
|
font-family: "PingFang SC";
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
background-image: url('@/assets/images/bg.jpg');
|
background-image: url("@/assets/images/bg.jpg");
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -360,7 +353,7 @@ const handleChild1 = (data: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main {
|
.main {
|
||||||
background-image: url('@/assets/images/bg-rs-main.svg');
|
background-image: url("@/assets/images/bg-rs-main.svg");
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-size: auto;
|
background-size: auto;
|
||||||
|
|
|
||||||
|
|
@ -4,32 +4,14 @@ import { useChart1, useChart22, useChart21, useChart3, useChart23 } from './Home
|
||||||
import AppHeadUserInfo from '@/components/AppHeadUserInfo.vue'
|
import AppHeadUserInfo from '@/components/AppHeadUserInfo.vue'
|
||||||
import { NSelect } from 'naive-ui'
|
import { NSelect } from 'naive-ui'
|
||||||
import News from './components/New.vue'
|
import News from './components/New.vue'
|
||||||
import { useMessage } from 'naive-ui'
|
import { homePageMarket, homePageRate, report, getHomeList, amountList } from '@/api/daikin/base'
|
||||||
import {
|
|
||||||
homePageMarket,
|
|
||||||
homePageRate,
|
|
||||||
report,
|
|
||||||
getHomeList,
|
|
||||||
amountList,
|
|
||||||
fetchHomeSmmExInfo,
|
|
||||||
fetchExchangeInfo,
|
|
||||||
fetchMarketUpdateTime
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { groupBy } from 'lodash-es'
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
|
||||||
|
|
||||||
const isUpPwds = ref(false)
|
const isUpPwds = ref(false)
|
||||||
const userCode = ref(false)
|
const userCode = ref(false)
|
||||||
const useCdView = ref(false)
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) =>
|
userCode.value = ['admin', 'cd_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
useCdView.value = ['admin', 'cd_view', 'cd_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
||||||
})
|
})
|
||||||
const activeCard5NavKey = ref('DIS')
|
const activeCard5NavKey = ref('DIS')
|
||||||
|
|
@ -68,8 +50,6 @@ const addDISH3 = ref()
|
||||||
const timeObj = ref<any>({})
|
const timeObj = ref<any>({})
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
getHomeSmmExInfo()
|
|
||||||
// getHomeExInfo()
|
|
||||||
const {
|
const {
|
||||||
data: { ailist, culist, lastUTime },
|
data: { ailist, culist, lastUTime },
|
||||||
data
|
data
|
||||||
|
|
@ -188,7 +168,7 @@ onMounted(async () => {
|
||||||
addDISH3.value > 0 ? (addDISH3.value = addDISH3.value.toFixed(2)) : 0
|
addDISH3.value > 0 ? (addDISH3.value = addDISH3.value.toFixed(2)) : 0
|
||||||
}
|
}
|
||||||
if (isUpPwds.value) {
|
if (isUpPwds.value) {
|
||||||
ElMessageBox.alert('为了您的帐号安全,此次登录必须更改密码', '重要提醒', {
|
ElMessageBox.alert('为了您的帐号安全,首次登录必须更改初始密码', '重要提醒', {
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
showClose: false,
|
showClose: false,
|
||||||
showCancelButton: false
|
showCancelButton: false
|
||||||
|
|
@ -208,26 +188,19 @@ const { chartRef: chartRef2, option: chartOption2, state } = useChart21()
|
||||||
const { chartRef: chartRef22, option: chartOption22 } = useChart22()
|
const { chartRef: chartRef22, option: chartOption22 } = useChart22()
|
||||||
const { chartRef: chartRef23, option: chartOption23 } = useChart23()
|
const { chartRef: chartRef23, option: chartOption23 } = useChart23()
|
||||||
const { chartRef: chartRef3, option: chartOption3 } = useChart3()
|
const { chartRef: chartRef3, option: chartOption3 } = useChart3()
|
||||||
|
|
||||||
const displayDiffValue = (diffValue: number) => {
|
const displayDiffValue = (diffValue: number) => {
|
||||||
// return diffValue + '%'
|
|
||||||
if (diffValue > 0) {
|
if (diffValue > 0) {
|
||||||
return `+${diffValue}`
|
return `+${diffValue} %`
|
||||||
} else if (diffValue < 0) {
|
} else if (diffValue < 0) {
|
||||||
// return `-${Math.abs(diffValue)}`
|
return `-${Math.abs(diffValue)} %`
|
||||||
return `${diffValue}`
|
|
||||||
} else {
|
} else {
|
||||||
// return `${formatNumber(diffValue)} %`
|
return `${diffValue} %`
|
||||||
return `${diffValue}`
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setModule(codes: any, names: any) {
|
async function setModule(codes: any, names: any) {
|
||||||
const moduleCode = codes
|
const moduleCode = codes
|
||||||
console.log(codes, names)
|
console.log(codes, names)
|
||||||
if (names == 'CD' && !useCdView.value) {
|
|
||||||
return message.info('没有访问权限!')
|
|
||||||
}
|
|
||||||
push({ name: names })
|
push({ name: names })
|
||||||
const { code } = await report({ moduleCode })
|
const { code } = await report({ moduleCode })
|
||||||
}
|
}
|
||||||
|
|
@ -263,31 +236,6 @@ function formatNumber(num = 0) {
|
||||||
const formattedDecimalPart = decimalPart.padEnd(2, '0')
|
const formattedDecimalPart = decimalPart.padEnd(2, '0')
|
||||||
return `${wholePart}.${formattedDecimalPart}`
|
return `${wholePart}.${formattedDecimalPart}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const homeSmmExInfo = ref<any>({铜:[],铝:[]})
|
|
||||||
async function getHomeSmmExInfo() {
|
|
||||||
// const { data } = await fetchHomeSmmExInfo()
|
|
||||||
// console.log("🚀 ~ file: Home.vue:268 ~ data:", groupBy(data,'instrumentName'))
|
|
||||||
// homeSmmExInfo.value = groupBy(data,'instrumentName')
|
|
||||||
const { data } = await homePageMarket()
|
|
||||||
homeSmmExInfo.value = data
|
|
||||||
delete homeSmmExInfo.value.lastUTime
|
|
||||||
}
|
|
||||||
|
|
||||||
const homeExchangeInfo = ref<any>([])
|
|
||||||
async function getHomeExInfo() {
|
|
||||||
const { data } = await fetchExchangeInfo()
|
|
||||||
homeExchangeInfo.value = data
|
|
||||||
console.log('🚀 ~ file: Home.vue:252 ~ }):', data)
|
|
||||||
}
|
|
||||||
|
|
||||||
getLastTime()
|
|
||||||
const updateTime = ref<any>({})
|
|
||||||
async function getLastTime() {
|
|
||||||
const { data } = await fetchMarketUpdateTime()
|
|
||||||
// homeExchangeInfo.value = data
|
|
||||||
updateTime.value = data
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -318,9 +266,9 @@ async function getLastTime() {
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="card_sub-title">责任者:调达中心 Device变革T/原材料变革T</div> -->
|
<!-- <div class="card_sub-title">责任者:调达中心 Device变革T/原材料变革T</div> -->
|
||||||
|
|
||||||
<div class="card_content px-30px overflow-y-scroll">
|
<div class="card_content">
|
||||||
<!-- <VChart :option="chartOption1" autoresize /> -->
|
<!-- <VChart :option="chartOption1" autoresize /> -->
|
||||||
<!-- <div class="flex pl15px pr10px pt15px text-#898F9F-1 text-#152242">
|
<div class="flex pl15px pr10px pt15px text-#898F9F-1 text-#152242">
|
||||||
<div class="">
|
<div class="">
|
||||||
<span class="icoT">市况</span>
|
<span class="icoT">市况</span>
|
||||||
<span class="ml10px text-14px">更新时间:{{ timeA }}</span>
|
<span class="ml10px text-14px">更新时间:{{ timeA }}</span>
|
||||||
|
|
@ -436,122 +384,7 @@ async function getLastTime() {
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
|
||||||
<!-- <div class="flex flex-col">
|
|
||||||
<div class="flex justify-end items-center text-#ACACAC mb6px">
|
|
||||||
<div class="text-#fff bg-#002FA7 rounded-5px px18px py6px">市况</div>
|
|
||||||
<div class="min-w-180px text-end">更新时间:{{ timeA }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end items-center text-#ACACAC mb6px">
|
|
||||||
<div class="text-#fff bg-#99aff6 rounded-5px px18px py6px">汇率</div>
|
|
||||||
<div class="min-w-180px text-end">更新时间:{{ timeB }}</div>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="flex justify-between items-center">
|
|
||||||
<div class="text-#fff bg-#002FA7 rounded-5px px18px py6px">市况</div>
|
|
||||||
<div class="flex flex-col text-#ACACAC flex-1 justify-end text-end text-13px">
|
|
||||||
<div class="text- flex justify-end">更新时间:<p class="min-w-100px text-start">{{ updateTime.SMM }}</p > (SMM)</div>
|
|
||||||
<div class="text- my4px flex justify-end"><p class="min-w-100px text-start">{{ updateTime.LME }}</p> (LME)</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<table
|
|
||||||
v-if="Object.keys(homeSmmExInfo)?.length"
|
|
||||||
class="history w-full text-center text-16px border-spacing-0"
|
|
||||||
>
|
|
||||||
<thead
|
|
||||||
style="
|
|
||||||
background-color: #417bef;
|
|
||||||
color: #fff;
|
|
||||||
height: 30px;
|
|
||||||
width: 220px;
|
|
||||||
border: 1px solid #417bef;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<tr class="h30px">
|
|
||||||
<th colspan="2" class="w-22%">原材料</th>
|
|
||||||
<th class="w-32%">最新</th>
|
|
||||||
<th>前日差</th>
|
|
||||||
<th>前日比</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<!-- <tbody>
|
|
||||||
<tr v-for="it in homeSmmExInfo" :key="it.instrumentId" class="h32px bg-#fff">
|
|
||||||
<td class="text-14px text-#000">{{ it.instrumentName }}</td>
|
|
||||||
<td class="text-14px text-#000">{{ it.negAmount }}</td>
|
|
||||||
<td
|
|
||||||
class="text-14px text-#000"
|
|
||||||
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
|
|
||||||
>
|
|
||||||
{{ it.diffValue }}%
|
|
||||||
</td>
|
|
||||||
<td
|
|
||||||
class="text-14px text-#000"
|
|
||||||
:class="it.diffRate < 0 ? 'text-#63BF8D' : 'text-red'"
|
|
||||||
>
|
|
||||||
{{ it.diffRate }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody> -->
|
|
||||||
<tbody v-for="(item, index) in Object.keys(homeSmmExInfo)" :key="item" >
|
|
||||||
<tr class="h30px bg-#fff">
|
|
||||||
<td rowspan="2" class="text-14px text-#000 bg-#EDF8FF">{{ item === 'ailist' ? '铝': '铜' }}</td>
|
|
||||||
<td class="text-14px text-#000">{{ homeSmmExInfo[item]?.[0]?.channel }}</td>
|
|
||||||
<td class="text-14px text-#000">{{ homeSmmExInfo[item]?.[0]?.negAmount }}</td>
|
|
||||||
<td class="text-14px text-#000" :class="homeSmmExInfo[item]?.[0]?.diffPrice < 0 ? 'text-#63BF8D' : 'text-red'">{{ displayDiffValue(homeSmmExInfo[item]?.[0]?.diffPrice || '') }}</td>
|
|
||||||
<td class="text-14px text-#000" :class="homeSmmExInfo[item]?.[0]?.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">{{ displayDiffValue(homeSmmExInfo[item]?.[0]?.diffValue || '') }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="h30px bg-#fff">
|
|
||||||
<!-- <td rowspan="2" class="text-14px text-#000 bg-#EDF8FF">{{ item }}</td> -->
|
|
||||||
<td class="text-14px text-#000">{{ homeSmmExInfo[item]?.[1]?.channel }}</td>
|
|
||||||
<td class="text-14px text-#000">{{ homeSmmExInfo[item]?.[1]?.negAmount }}</td>
|
|
||||||
<td class="text-14px text-#000" :class="homeSmmExInfo[item]?.[1]?.diffPrice < 0 ? 'text-#63BF8D' : 'text-red'">{{ displayDiffValue(homeSmmExInfo[item]?.[1]?.diffPrice || '') }}</td>
|
|
||||||
<td class="text-14px text-#000" :class="homeSmmExInfo[item]?.[1]?.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">{{ displayDiffValue(homeSmmExInfo[item]?.[1]?.diffValue || '') }}%</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="flex justify-between items-center my4px">
|
|
||||||
<div class="text-#fff bg-#002FA7 rounded-5px px18px py6px">汇率</div>
|
|
||||||
<div class="flex flex-col text-#ACACAC flex-1 justify-end text-end text-13px">
|
|
||||||
<div class="text- flex justify-end">更新时间:<p class="">{{ timeB }}</p class="min-w-200px"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<table class="mb10px history w-full text-center text-16px border-spacing-0">
|
|
||||||
<thead
|
|
||||||
style="
|
|
||||||
background-color: #417bef;
|
|
||||||
color: #fff;
|
|
||||||
height: 30px;
|
|
||||||
width: 220px;
|
|
||||||
border: 1px solid #417bef;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<tr class="h30px">
|
|
||||||
<th colspan="0" class="w-22%">币种</th>
|
|
||||||
<th class="w-32%">最新</th>
|
|
||||||
<th>前日差</th>
|
|
||||||
<th>前日比</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody v-if="itemLists" class="">
|
|
||||||
<tr
|
|
||||||
class="h30px !text-14px text-center"
|
|
||||||
v-for="(it, index) in itemLists"
|
|
||||||
:key="index"
|
|
||||||
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
|
||||||
>
|
|
||||||
<td class="text-center text-#000">
|
|
||||||
{{ it.currencyNameFrom }}-{{ it.currencyNameTo }}
|
|
||||||
</td>
|
|
||||||
<td class="text-center text-#000">{{ it.negAmount }}</td>
|
|
||||||
<td class="text-center" :class="it.diffPrice < 0 ? 'text-#63BF8D' : 'text-red'">
|
|
||||||
{{ it.diffPrice > 0 ? "+" + it.diffPrice : it.diffPrice }}
|
|
||||||
</td>
|
|
||||||
<td class="text-center" :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
|
||||||
{{ displayDiffValue(it.diffValue)+'%' }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -871,8 +704,7 @@ async function getLastTime() {
|
||||||
<div class="item_title hover:underline">AI差别化LAB</div>
|
<div class="item_title hover:underline">AI差别化LAB</div>
|
||||||
<div class="item_sub-title">责任者:开发调达部</div>
|
<div class="item_sub-title">责任者:开发调达部</div>
|
||||||
<div class="item_sub-title">差别化研究T</div>
|
<div class="item_sub-title">差别化研究T</div>
|
||||||
<!-- <img src="@/assets/images/img-43.png" class="item_img" /> -->
|
<img src="@/assets/images/img-43.png" class="item_img" />
|
||||||
<img src="./images/LAB.pic.png" class="item_img w-200px right--10px" />
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="item !w-full flex flex-col cursor-pointer"
|
class="item !w-full flex flex-col cursor-pointer"
|
||||||
|
|
|
||||||
|
|
@ -1,984 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import VChart from 'vue-echarts'
|
|
||||||
import { useChart1, useChart22, useChart21, useChart3, useChart23 } from './HomeData'
|
|
||||||
import AppHeadUserInfo from '@/components/AppHeadUserInfo.vue'
|
|
||||||
import { NSelect } from 'naive-ui'
|
|
||||||
import News from './components/New.vue'
|
|
||||||
import { homePageMarket, homePageRate, report, getHomeList, amountList } from '@/api/daikin/base'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import { useMessage } from 'naive-ui'
|
|
||||||
|
|
||||||
const store = useUserStore()
|
|
||||||
const message = useMessage()
|
|
||||||
|
|
||||||
const isUpPwds = ref(false)
|
|
||||||
const userCode = ref(false)
|
|
||||||
const useCdView = ref(false)
|
|
||||||
watchEffect(() => {
|
|
||||||
userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
useCdView.value = ['admin', 'cd_view', 'cd_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
|
||||||
})
|
|
||||||
const activeCard5NavKey = ref('DIS')
|
|
||||||
const Card5Navs = [
|
|
||||||
{ key: 'DIS', name: 'DIS' },
|
|
||||||
{ key: 'DSZ', name: 'DSZ' },
|
|
||||||
{ key: 'DISH', name: 'DISH' }
|
|
||||||
]
|
|
||||||
const ailists = ref()
|
|
||||||
const culists = ref()
|
|
||||||
const itemLists = ref()
|
|
||||||
const timeA = ref()
|
|
||||||
const timeB = ref()
|
|
||||||
|
|
||||||
const disList = ref<any>([{}, {}, {}, {}])
|
|
||||||
const dszList = ref<any>([{}, {}, {}, {}])
|
|
||||||
const dishList = ref<any>([{}, {}, {}, {}])
|
|
||||||
const month_1 = ref()
|
|
||||||
const month_2 = ref()
|
|
||||||
const month_3 = ref()
|
|
||||||
let now = new Date().getMonth() + 13
|
|
||||||
month_2.value = (now - 2) % 12
|
|
||||||
month_1.value = (now - 1) % 12
|
|
||||||
const dataDIS = ref()
|
|
||||||
const dataDSZ = ref()
|
|
||||||
const dataDISH = ref()
|
|
||||||
const addDSZ1 = ref()
|
|
||||||
const addDIS1 = ref()
|
|
||||||
const addDISH1 = ref()
|
|
||||||
const addDSZ2 = ref()
|
|
||||||
const addDIS2 = ref()
|
|
||||||
const addDISH2 = ref()
|
|
||||||
const addDSZ3 = ref()
|
|
||||||
const addDIS3 = ref()
|
|
||||||
const addDISH3 = ref()
|
|
||||||
const timeObj = ref<any>({})
|
|
||||||
onMounted(async () => {
|
|
||||||
try {
|
|
||||||
const {
|
|
||||||
data: { ailist, culist, lastUTime },
|
|
||||||
data
|
|
||||||
} = await homePageMarket() //市况
|
|
||||||
const {
|
|
||||||
data: { itemList, lastUTime: _lastUTime }
|
|
||||||
} = await homePageRate() //汇率
|
|
||||||
const { data: _disList } = await getHomeList({ number: 'DIS' }) //汇率
|
|
||||||
const { data: _dszList } = await getHomeList({ number: 'DSZ' }) //汇率
|
|
||||||
const { data: _dishList } = await getHomeList({ number: 'DISH' }) //汇率
|
|
||||||
const { data: fazhu } = await amountList()
|
|
||||||
fazhu.forEach((i: { number: string; amount: any }) => {
|
|
||||||
// timeObj.value[i.number] = i.modifyTime?.substring(0, 10) || ''
|
|
||||||
timeObj.value[i.number] = i.updateDate || ''
|
|
||||||
if (i.number == 'DIS') {
|
|
||||||
dataDIS.value = i.amount
|
|
||||||
}
|
|
||||||
if (i.number == 'DSZ') {
|
|
||||||
dataDSZ.value = i.amount
|
|
||||||
}
|
|
||||||
if (i.number == 'DISH') {
|
|
||||||
dataDISH.value = i.amount
|
|
||||||
}
|
|
||||||
})
|
|
||||||
ailists.value = ailist
|
|
||||||
culists.value = culist
|
|
||||||
itemLists.value = itemList
|
|
||||||
timeA.value = lastUTime
|
|
||||||
timeB.value = _lastUTime
|
|
||||||
disList.value = _disList
|
|
||||||
dszList.value = _dszList
|
|
||||||
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 }) => {
|
|
||||||
const sum = parseFloat(currentValue.budget) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_disList[0].budget == _disList[1].budget && addDIS1.value > 0) {
|
|
||||||
addDIS1.value -= _disList[0].budget
|
|
||||||
addDIS1.value > 0 ? (addDIS1.value = addDIS1.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.budget) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dszList[0].budget == _dszList[1].budget && addDSZ1.value > 0) {
|
|
||||||
addDSZ1.value -= _dszList[0].budget
|
|
||||||
addDSZ1.value > 0 ? (addDSZ1.value = addDSZ1.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDISH1.value = _dishList.reduce((previousValue: any, currentValue: { budget: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.budget) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dishList[0].budget == _dishList[1].budget && addDISH1.value > 0) {
|
|
||||||
addDISH1.value -= _dishList[0].budget
|
|
||||||
addDISH1.value > 0 ? (addDISH1.value = addDISH1.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDIS2.value = _disList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthOne) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_disList[0].monthOne == _disList[1].monthOne && addDIS2.value > 0) {
|
|
||||||
addDIS2.value -= _disList[0].monthOne
|
|
||||||
addDIS2.value > 0 ? (addDIS2.value = addDIS2.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDSZ2.value = _dszList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthOne) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dszList[0].monthOne == _dszList[1].monthOne && addDSZ2.value > 0) {
|
|
||||||
addDSZ2.value -= _dszList[0].monthOne
|
|
||||||
addDSZ2.value > 0 ? (addDSZ2.value = addDSZ2.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDISH2.value = _dishList.reduce((previousValue: any, currentValue: { monthOne: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthOne) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dishList[0].monthOne == _dishList[1].monthOne && addDISH2.value > 0) {
|
|
||||||
addDISH2.value -= _dishList[0].monthOne
|
|
||||||
addDISH2.value > 0 ? (addDISH2.value = addDISH2.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDIS3.value = _disList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthTwo) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_disList[0].monthTwo == _disList[1].monthTwo && addDIS3.value > 0) {
|
|
||||||
addDIS3.value -= _disList[0].monthTwo
|
|
||||||
addDIS3.value > 0 ? (addDIS3.value = addDIS3.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDSZ3.value = _dszList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthTwo) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dszList[0].monthTwo == _dszList[1].monthTwo && addDSZ3.value > 0) {
|
|
||||||
addDSZ3.value -= _dszList[0].monthTwo
|
|
||||||
addDSZ3.value > 0 ? (addDSZ3.value = addDSZ3.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
addDISH3.value = _dishList.reduce((previousValue: any, currentValue: { monthTwo: any }) => {
|
|
||||||
const sum = parseFloat(currentValue.monthTwo) + parseFloat(previousValue)
|
|
||||||
// return sum > 0 ? sum.toFixed(2) : 0
|
|
||||||
return sum
|
|
||||||
}, 0)
|
|
||||||
if (_dishList[0].monthTwo == _dishList[1].monthTwo && addDISH3.value > 0) {
|
|
||||||
addDISH3.value -= _dishList[0].monthTwo
|
|
||||||
addDISH3.value > 0 ? (addDISH3.value = addDISH3.value.toFixed(2)) : 0
|
|
||||||
}
|
|
||||||
if (isUpPwds.value) {
|
|
||||||
ElMessageBox.alert('为了您的帐号安全,此次登录必须更改密码', '重要提醒', {
|
|
||||||
confirmButtonText: 'OK',
|
|
||||||
showClose: false,
|
|
||||||
showCancelButton: false
|
|
||||||
}).then(() => {
|
|
||||||
push({ name: 'modifys' })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
report({ moduleCode: 'App_Home' })
|
|
||||||
} catch (error) {}
|
|
||||||
})
|
|
||||||
const { push } = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const timeNow = useDateFormat(useNow(), 'YYYY-MM-DD')
|
|
||||||
|
|
||||||
const { chartRef: chartRef1, option: chartOption1 } = useChart1()
|
|
||||||
const { chartRef: chartRef2, option: chartOption2, state } = useChart21()
|
|
||||||
const { chartRef: chartRef22, option: chartOption22 } = useChart22()
|
|
||||||
const { chartRef: chartRef23, option: chartOption23 } = useChart23()
|
|
||||||
const { chartRef: chartRef3, option: chartOption3 } = useChart3()
|
|
||||||
|
|
||||||
const displayDiffValue = (diffValue: number) => {
|
|
||||||
// return diffValue + '%'
|
|
||||||
if (diffValue > 0) {
|
|
||||||
return `+${diffValue}%`
|
|
||||||
} else if (diffValue < 0) {
|
|
||||||
return `-${Math.abs(diffValue)}%`
|
|
||||||
} else {
|
|
||||||
// return `${formatNumber(diffValue)} %`
|
|
||||||
return `${diffValue}%`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function setModule(codes: any, names: any) {
|
|
||||||
const moduleCode = codes
|
|
||||||
console.log(codes, names)
|
|
||||||
if (names == 'CD' && !useCdView.value) {
|
|
||||||
return message.info('没有访问权限!')
|
|
||||||
}
|
|
||||||
push({ name: names })
|
|
||||||
const { code } = await report({ moduleCode })
|
|
||||||
}
|
|
||||||
const selectData = ref('原材料')
|
|
||||||
const option = [
|
|
||||||
{
|
|
||||||
label: '全部数据',
|
|
||||||
value: 'quanbu'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '原材料',
|
|
||||||
value: 'yuancailiao'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '加工品',
|
|
||||||
value: 'jiagongping'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '机能部品',
|
|
||||||
value: 'jineng'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const thisSelect = (e) => {
|
|
||||||
console.log(e)
|
|
||||||
state.title = e
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatNumber(num = 0) {
|
|
||||||
num = +num
|
|
||||||
const roundedNum: string = num.toFixed(2)
|
|
||||||
const [wholePart, decimalPart] = roundedNum.split('.')
|
|
||||||
const formattedDecimalPart = decimalPart.padEnd(2, '0')
|
|
||||||
return `${wholePart}.${formattedDecimalPart}`
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="top flex items-center text-20px">
|
|
||||||
<div class="flex-1 font-800 text-30px"></div>
|
|
||||||
<AppHeadUserInfo />
|
|
||||||
</div>
|
|
||||||
<div class="page-wrapper h-full flex-1 flex flex-col flex-wrap">
|
|
||||||
<div class="font-800 text-30px mt39px">
|
|
||||||
<!-- FY23年度调达本部方针:创新实干,勇毅前行,以综合实力挑战变革,提升存在感 -->
|
|
||||||
FY24年度公司方针:提升全员价值,直击一切困难
|
|
||||||
</div>
|
|
||||||
<div class="mt30px flex-1 flex flex-wrap justify-between">
|
|
||||||
<News></News>
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<div
|
|
||||||
class="card_title cursor-pointer hover:underline"
|
|
||||||
@click="setModule('App_Market', 'Market')"
|
|
||||||
>
|
|
||||||
市况汇率 每日更新
|
|
||||||
</div>
|
|
||||||
<div class="card_nav card_nav2 !top--3px !right--1px">
|
|
||||||
<div class="!text-14px w260px top--4px text-right leading-18px">
|
|
||||||
出处:市况-SMM/LME<br />
|
|
||||||
汇率-外汇管理局
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="card_sub-title">责任者:调达中心 Device变革T/原材料变革T</div> -->
|
|
||||||
|
|
||||||
<div class="card_content">
|
|
||||||
<!-- <VChart :option="chartOption1" autoresize /> -->
|
|
||||||
<div class="flex pl15px pr10px pt15px text-#898F9F-1 text-#152242">
|
|
||||||
<div class="">
|
|
||||||
<span class="icoT">市况</span>
|
|
||||||
<span class="ml10px text-14px">更新时间:{{ timeA }}</span>
|
|
||||||
|
|
||||||
<div class="h150px overflow-auto">
|
|
||||||
<table class="history w-full text-center mt18px text-16px border-spacing-0 w219px">
|
|
||||||
<thead
|
|
||||||
style="
|
|
||||||
background-color: #417bef;
|
|
||||||
color: #fff;
|
|
||||||
height: 42px;
|
|
||||||
width: 220px;
|
|
||||||
border: 1px solid #417bef;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th>铜</th>
|
|
||||||
<th>最新</th>
|
|
||||||
<th>前日差</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody v-if="culists">
|
|
||||||
<tr
|
|
||||||
class="h45px"
|
|
||||||
v-for="(it, index) in culists"
|
|
||||||
:key="index"
|
|
||||||
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
|
||||||
>
|
|
||||||
<td class="text-14px">{{ it.channel }}</td>
|
|
||||||
<td class="text-14px">{{ it.negAmount }}</td>
|
|
||||||
<td class="text-14px" :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="h150px overflow-auto">
|
|
||||||
<table
|
|
||||||
class="history w-full text-center mt15px text-16px border-spacing-0 overflow-auto w219px"
|
|
||||||
>
|
|
||||||
<thead
|
|
||||||
style="
|
|
||||||
background-color: #417bef;
|
|
||||||
color: #fff;
|
|
||||||
height: 42px;
|
|
||||||
width: 220px;
|
|
||||||
border: 1px solid #417bef;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th>铝</th>
|
|
||||||
<th>最新</th>
|
|
||||||
<th>前日差</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody v-if="ailists">
|
|
||||||
<tr
|
|
||||||
class="h45px"
|
|
||||||
v-for="(it, index) in ailists"
|
|
||||||
:key="index"
|
|
||||||
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
|
||||||
>
|
|
||||||
<td class="text-14px">{{ it.channel }}</td>
|
|
||||||
<td class="text-14px">{{ it.negAmount }}</td>
|
|
||||||
<td class="text-14px" :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
|
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ml10px">
|
|
||||||
<span class="icoT">汇率</span>
|
|
||||||
<span class="ml10px text-14px">更新时间:{{ timeB }}</span>
|
|
||||||
<div class="h282px pt18px">
|
|
||||||
<table class="history w-full text-center text-16px border-spacing-0 w219px">
|
|
||||||
<thead
|
|
||||||
style="
|
|
||||||
background-color: #417bef;
|
|
||||||
color: #fff;
|
|
||||||
height: 42px;
|
|
||||||
width: 220px;
|
|
||||||
border: 1px solid #417bef;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th class="w75px">币种</th>
|
|
||||||
<th>最新</th>
|
|
||||||
<th class="w65px">前日差</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody v-if="itemLists" class="h238px overflow-auto absolute">
|
|
||||||
<tr
|
|
||||||
class="h60px !text-14px"
|
|
||||||
v-for="(it, index) in itemLists"
|
|
||||||
:key="index"
|
|
||||||
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
|
|
||||||
>
|
|
||||||
<td class="w75px text-center">
|
|
||||||
{{ it.currencyNameFrom }}-{{ it.currencyNameTo }}
|
|
||||||
</td>
|
|
||||||
<td class="w85px text-center">{{ it.negAmount }}</td>
|
|
||||||
<td
|
|
||||||
class="w65px text-center"
|
|
||||||
:class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'"
|
|
||||||
>
|
|
||||||
{{ displayDiffValue(it.diffValue) }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<div
|
|
||||||
class="card_title cursor-pointer hover:underline"
|
|
||||||
@click="setModule('App_data_platform', 'CD')"
|
|
||||||
>
|
|
||||||
数据平台
|
|
||||||
</div>
|
|
||||||
<!-- <div class="card_sub-title">责任者:调达中心 企画变革T</div> -->
|
|
||||||
<div class="card_nav card_nav1">
|
|
||||||
<div
|
|
||||||
class="card_nav_item cursor-pointer hover:underline"
|
|
||||||
:class="activeCard5NavKey === i.key && 'active'"
|
|
||||||
v-for="i in Card5Navs"
|
|
||||||
:key="i.name"
|
|
||||||
@click="() => (activeCard5NavKey = i.key)"
|
|
||||||
>
|
|
||||||
{{ i.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="table-container">
|
|
||||||
<el-button
|
|
||||||
v-if="userCode"
|
|
||||||
type="primary"
|
|
||||||
class="button abs-top"
|
|
||||||
@click="push({ name: 'dataPlatform' })"
|
|
||||||
>数据管理</el-button
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="block p-[10px] pr-0 absolute top-[4px] right-[36px] font-normal h-[20px] !text-[16px] text-[#000]"
|
|
||||||
>
|
|
||||||
更新日:{{ timeObj[activeCard5NavKey] }}
|
|
||||||
</div>
|
|
||||||
<table class="data-table" border v-if="activeCard5NavKey === 'DIS'">
|
|
||||||
<colgroup>
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
</colgroup>
|
|
||||||
<tr class="header">
|
|
||||||
<th rowspan="2" colspan="2">拠点</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<div class="tab-header">
|
|
||||||
<div class="tb-title">DIS</div>
|
|
||||||
<div class="tb-subtitle">发注金额:{{ dataDIS }}百万元</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="header">
|
|
||||||
<td>年初予算</td>
|
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
|
||||||
<td>改订</td>
|
|
||||||
<td>{{ +month_1 }}月</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">合计</th>
|
|
||||||
<td>{{ formatNumber(addDIS1) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDIS2) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDIS3) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th rowspan="2">C/D</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<td :rowspan="disList[0].budget == disList[1].budget ? '2' : ''">
|
|
||||||
{{ formatNumber(disList[0].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="disList[0].monthOne == disList[1].monthOne ? '2' : ''">
|
|
||||||
{{ formatNumber(disList[0].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="disList[0].monthTwo == disList[1].monthTwo ? '2' : ''">
|
|
||||||
{{ formatNumber(disList[0].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>THEME</th>
|
|
||||||
<td v-if="disList[1].budget != disList[0].budget">
|
|
||||||
{{ formatNumber(disList[1].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="disList[1].monthOne != disList[0].monthOne">
|
|
||||||
{{ formatNumber(disList[1].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="disList[1].monthTwo != disList[0].monthTwo">
|
|
||||||
{{ formatNumber(disList[1].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">市况</th>
|
|
||||||
<td>{{ formatNumber(disList[2].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(disList[2].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(disList[2].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">為替レート</th>
|
|
||||||
<td>{{ formatNumber(disList[3].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(disList[3].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(disList[3].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table class="data-table" border v-if="activeCard5NavKey === 'DSZ'">
|
|
||||||
<colgroup>
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
</colgroup>
|
|
||||||
<tr class="header">
|
|
||||||
<th rowspan="2" colspan="2">抛点</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<div class="tab-header">
|
|
||||||
<div class="tb-title">DSZ</div>
|
|
||||||
<div class="tb-subtitle">发注金额:{{ dataDSZ }}百万元</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="header">
|
|
||||||
<td>年初予算</td>
|
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
|
||||||
<td>改订</td>
|
|
||||||
<td>{{ +month_2 }}月</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">合计</th>
|
|
||||||
<td>{{ formatNumber(addDSZ1) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDSZ2) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDSZ3) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th rowspan="2">C/D</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<td :rowspan="dszList[0].budget == dszList[1].budget ? '2' : ''">
|
|
||||||
{{ formatNumber(dszList[0].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="dszList[0].monthOne == dszList[1].monthOne ? '2' : ''">
|
|
||||||
{{ formatNumber(dszList[0].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="dszList[0].monthTwo == dszList[1].monthTwo ? '2' : ''">
|
|
||||||
{{ formatNumber(dszList[0].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>THEME</th>
|
|
||||||
<td v-if="dszList[1].budget != dszList[0].budget">
|
|
||||||
{{ formatNumber(dszList[1].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="dszList[1].monthOne != dszList[0].monthOne">
|
|
||||||
{{ formatNumber(dszList[1].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="dszList[1].monthTwo != dszList[0].monthTwo">
|
|
||||||
{{ formatNumber(dszList[1].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">市况</th>
|
|
||||||
<td>{{ formatNumber(dszList[2].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(dszList[2].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(dszList[2].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">為替レート</th>
|
|
||||||
<td>{{ formatNumber(dszList[3].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(dszList[3].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(dszList[3].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table class="data-table" border v-if="activeCard5NavKey === 'DISH'">
|
|
||||||
<colgroup>
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
<col width="20%" />
|
|
||||||
</colgroup>
|
|
||||||
<tr class="header">
|
|
||||||
<th rowspan="2" colspan="2">抛点</th>
|
|
||||||
<td colspan="3">
|
|
||||||
<div class="tab-header">
|
|
||||||
<div class="tb-title">DISH</div>
|
|
||||||
<div class="tb-subtitle">发注金额:{{ dataDISH }}百万元</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="header">
|
|
||||||
<td>年初予算</td>
|
|
||||||
<!-- <td>{{month_2}}月</td> -->
|
|
||||||
<td>改订</td>
|
|
||||||
<td>{{ +month_3 }}月</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">合计</th>
|
|
||||||
<td>{{ formatNumber(addDISH1) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDISH2) }}%</td>
|
|
||||||
<td>{{ formatNumber(addDISH3) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th rowspan="2">C/D</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<td :rowspan="dishList[0].budget == dishList[1].budget ? '2' : ''">
|
|
||||||
{{ formatNumber(dishList[0].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="dishList[0].monthOne == dishList[1].monthOne ? '2' : ''">
|
|
||||||
{{ formatNumber(dishList[0].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td :rowspan="dishList[0].monthTwo == dishList[1].monthTwo ? '2' : ''">
|
|
||||||
{{ formatNumber(dishList[0].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>THEME</th>
|
|
||||||
<td v-if="dishList[1].budget != dishList[0].budget">
|
|
||||||
{{ formatNumber(dishList[1].budget) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="dishList[1].monthOne != dishList[0].monthOne">
|
|
||||||
{{ formatNumber(dishList[1].monthOne) }}%
|
|
||||||
</td>
|
|
||||||
<td v-if="dishList[1].monthTwo != dishList[0].monthTwo">
|
|
||||||
{{ formatNumber(dishList[1].monthTwo) }}%
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">市况</th>
|
|
||||||
<td>{{ formatNumber(dishList[2].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(dishList[2].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(dishList[2].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">為替レート</th>
|
|
||||||
<td>{{ formatNumber(dishList[3].budget) }}%</td>
|
|
||||||
<td>{{ formatNumber(dishList[3].monthOne) }}%</td>
|
|
||||||
<td>{{ formatNumber(dishList[3].monthTwo) }}%</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<!-- <img src="@/assets/images/xiaogouzi1.jpg" class="w-full h-full cover" v-if="activeCard5NavKey === 'DSZ'"/>
|
|
||||||
<img src="@/assets/images/xiaogouzi2.jpg" class="w-full h-full cover" v-if="activeCard5NavKey === 'DISH'"/> -->
|
|
||||||
<!-- <img src="@/assets/images/xiaogouzi3.jpg" class="w-full h-full cover" v-if="activeCard5NavKey === 'DIS'"/> -->
|
|
||||||
</div>
|
|
||||||
<!-- <div class="card_content">
|
|
||||||
<VChart ref="chartRef3" :option="chartOption3" autoresize />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="card" @click="setModule('App_BCP', 'BCP')">
|
|
||||||
<div class="card_title cursor-pointer hover:underline">调达BCP管理</div>
|
|
||||||
<div class="card_sub-title">责任者:调达部 加工品变革T</div>
|
|
||||||
<div class="card_content">
|
|
||||||
<img src="@/assets/images/img-11.png" class="w-full h-full object-cover" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card relative">
|
|
||||||
<!-- <img src="@/assets/images/img-42.png" class="absolute top-10px right-0" /> -->
|
|
||||||
<div class="card_title cursor-pointer hover:underline" @click="setModule('App_CSR', 'CSR')">
|
|
||||||
SCM碳中和活动
|
|
||||||
</div>
|
|
||||||
<div class="card_sub-title" @click="setModule('App_CSR', 'CSR')">
|
|
||||||
责任者:开发调达部 调达机能研究T
|
|
||||||
</div>
|
|
||||||
<div class="card_content px20px" @click="setModule('App_CSR', 'CSR')">
|
|
||||||
<img src="../../assets/images/scmtzh@2x.png" class="w-full h-96% cover" />
|
|
||||||
<!-- <div class="flex text-center">
|
|
||||||
<div class="bg-#F4F8FF text-#000 h30px w-full pt5px font-bold">F25碳减排目标 <el-icon class="!text-#004DE1">
|
|
||||||
<CaretTop />
|
|
||||||
</el-icon>30%</div>
|
|
||||||
<div class="bg-#F4F8FF text-#000 h30px w-full pt5px font-bold">F23碳减排目标 <el-icon class="!text-#004DE1">
|
|
||||||
<CaretTop />
|
|
||||||
</el-icon>15%</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex text-center">
|
|
||||||
<div class=" text-#677BB2 h30px w-full pt5px font-500">供方碳排放推移表</div>
|
|
||||||
<div class=" text-#677BB2 h30px w-full pt5px font-500 flex"><span>重点供方碳排放情况</span>
|
|
||||||
<n-select v-model:value="selectData" :options="option" class="w80px !text-12px h20px mt--4px" :show-checkmark="false" size="tiny"
|
|
||||||
@update:value="thisSelect" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex w-full h-full">
|
|
||||||
<div class="w150px h-full">
|
|
||||||
<VChart :option="chartOption1" />
|
|
||||||
</div>
|
|
||||||
<div class="w280px h275px overflow-y-auto">
|
|
||||||
<VChart :option="chartOption2" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <div class="mt25px text-#142142"> -->
|
|
||||||
<!-- <img src="@/assets/images/tiad@2x.png" class="w100% h96%" /> -->
|
|
||||||
<!-- <div class="text-#002fa7 text-18px">大金中国调达本部紧扣大金集团2050愿景中CO2“零”排放目标展开调达碳中和活动</div>
|
|
||||||
<AppNewsBox class="mt10px" text="脱碳素供应链管理(原材料排放,部品加工·部品运输过程中的排放)
|
|
||||||
空调解决方案(部品碳足迹管理,贩促活动,案例情报共享)" date="2023-05-22" /> -->
|
|
||||||
<!-- </div> -->
|
|
||||||
<!-- <div class="mt25px text-#142142">
|
|
||||||
<div class="text-#002fa7 text-18px">人材育成</div>
|
|
||||||
<AppNewsBox class="mt10px" text="FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来" date="2023-05-22" />
|
|
||||||
</div>
|
|
||||||
<div class="mt25px text-#142142">
|
|
||||||
<div class="text-#002fa7 text-18px">工作模式变革</div>
|
|
||||||
<AppNewsBox class="mt10px" text="FY22年度集团新年方针:领先时代的变化开创崭新的未来变化开 创崭新的未来" date="2023-05-22" />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card topics">
|
|
||||||
<div class="card_title cursor-pointer hover:underline">重点Theme取组</div>
|
|
||||||
<div class="card_content p20px pt10px">
|
|
||||||
<div
|
|
||||||
class="w-full h-full flex flex-wrap content-between justify-between text-18px font-bold"
|
|
||||||
>
|
|
||||||
<div class="item !h-188px cursor-pointer" @click="setModule('App_Quality', 'Quality')">
|
|
||||||
<div class="item_title hover:underline">品质</div>
|
|
||||||
<div class="item_sub-title">责任者:调达部 企画管理T</div>
|
|
||||||
<!-- <img src="@/assets/images/img-45.svg" class="item_img pb13px pr20px" /> -->
|
|
||||||
<img src="@/assets/images/img-41.png" class="item_img b !bottom--20px" />
|
|
||||||
</div>
|
|
||||||
<div class="item !h-188px cursor-pointer" @click="setModule('App_Lab', 'Diffspace')">
|
|
||||||
<div class="item_title hover:underline">AI差别化LAB</div>
|
|
||||||
<div class="item_sub-title">责任者:开发调达部</div>
|
|
||||||
<div class="item_sub-title">差别化研究T</div>
|
|
||||||
<!-- <img src="@/assets/images/img-43.png" class="item_img" /> -->
|
|
||||||
<img src="./images/LAB.pic.png" class="item_img w-200px right--10px" />
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="item !w-full flex flex-col cursor-pointer"
|
|
||||||
@click="push({ name: 'StrategicPlanning' })"
|
|
||||||
>
|
|
||||||
<div class="item_title hover:underline">战略企划</div>
|
|
||||||
<div class="item_sub-title">责任者:调达本部 管理G</div>
|
|
||||||
<!-- <img src="./images/home-1.svg" /> -->
|
|
||||||
<div class="flex mt20px items-center justify-center">
|
|
||||||
<div class="bg-#0038BE w210px px15px py7px rounded-30px">
|
|
||||||
<img src="@/assets/images/biaoq2@2x.png" class="w25px h21px" />
|
|
||||||
重点Theme管理
|
|
||||||
</div>
|
|
||||||
<span class="text-#000 font-thin underline-text mx23px hover:underline-solid"
|
|
||||||
>开发调达部</span
|
|
||||||
>
|
|
||||||
<span class="text-#000 font-thin underline-text hover:underline-solid">调达部</span>
|
|
||||||
<!-- <VChart :option="chartOption2" autoresize /> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.tab-header {
|
|
||||||
display: flex;
|
|
||||||
.tb-title {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.tb-subtitle {
|
|
||||||
margin-right: 8px;
|
|
||||||
font-size: 0.75em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.table-container {
|
|
||||||
padding: 0 36px;
|
|
||||||
padding-top: 40px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.data-table {
|
|
||||||
width: 100%;
|
|
||||||
color: #808696;
|
|
||||||
border-collapse: collapse;
|
|
||||||
line-height: 2.3rem;
|
|
||||||
text-align: center;
|
|
||||||
border-color: #e0e0e0;
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
.table-container .abs-top {
|
|
||||||
position: absolute;
|
|
||||||
left: 36px;
|
|
||||||
top: 4px;
|
|
||||||
}
|
|
||||||
.data-table tr:nth-child(2n + 1) {
|
|
||||||
background: #f9f9f9;
|
|
||||||
}
|
|
||||||
.data-table th {
|
|
||||||
background: #f4f5ff;
|
|
||||||
color: #142142;
|
|
||||||
}
|
|
||||||
.data-table tr.header,
|
|
||||||
.data-table tr.header th {
|
|
||||||
background: #417bef;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
::v-deep .n-base-select .n-base-select-option {
|
|
||||||
font-size: 12px; /* 设置字体大小 */
|
|
||||||
}
|
|
||||||
.naive-select .n-select-dropdown {
|
|
||||||
font-size: 12px; /* 设置字体大小 */
|
|
||||||
}
|
|
||||||
.underline-text {
|
|
||||||
border-bottom: 1px solid black;
|
|
||||||
padding-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icoT {
|
|
||||||
padding: 5px;
|
|
||||||
color: #fff;
|
|
||||||
background-color: #002aae;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-wrapper {
|
|
||||||
.card {
|
|
||||||
// width: 480px;
|
|
||||||
// height: 428px;
|
|
||||||
width: 480px;
|
|
||||||
height: 395px;
|
|
||||||
border-radius: 18px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
background-color: #fff;
|
|
||||||
// border: 1px solid #e7ebf5;
|
|
||||||
box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32);
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: ' ';
|
|
||||||
background-image: url('@/assets/images/bg-card.svg');
|
|
||||||
pointer-events: none;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 127px;
|
|
||||||
background-size: cover;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_title {
|
|
||||||
flex-shrink: 0;
|
|
||||||
font-size: 28px;
|
|
||||||
color: #142142;
|
|
||||||
padding: 20px;
|
|
||||||
padding-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_sub-title {
|
|
||||||
color: rgba(128, 134, 150, 0.8);
|
|
||||||
font-size: 16px;
|
|
||||||
padding: 0 20px;
|
|
||||||
padding-bottom: 0;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_nav1 {
|
|
||||||
background-image: url('@/assets/images/bg-card-nav.svg');
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_nav2 {
|
|
||||||
background-image: url('@/assets/images/youj@2x.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_nav {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 276px;
|
|
||||||
height: 66px;
|
|
||||||
|
|
||||||
background-position: top right;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-end;
|
|
||||||
padding-left: 38px;
|
|
||||||
padding-right: 22px;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
|
|
||||||
.card_nav_item {
|
|
||||||
width: 80px;
|
|
||||||
height: 36px;
|
|
||||||
text-align: center;
|
|
||||||
padding-top: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: #032fa0;
|
|
||||||
background-image: url('@/assets/images/bg-card-nav-item.svg');
|
|
||||||
background-position: bottom;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_content {
|
|
||||||
flex: 1;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.topics {
|
|
||||||
.item {
|
|
||||||
border-radius: 8px;
|
|
||||||
width: 210px;
|
|
||||||
height: 155px;
|
|
||||||
box-shadow: inset 1.4px 1.4px 0px 0px rgba(255, 255, 255, 0.004);
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
background-image: url('@/assets/images/bg-card4.svg');
|
|
||||||
background-position: -2px -2px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 215px 165px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.item_title {
|
|
||||||
padding-left: 16px;
|
|
||||||
padding-top: 22px;
|
|
||||||
color: #002fa7;
|
|
||||||
position: relative;
|
|
||||||
// z-index: 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_sub-title {
|
|
||||||
color: rgba(128, 134, 150, 0.8);
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: normal;
|
|
||||||
padding: 0 16px;
|
|
||||||
padding-bottom: 0;
|
|
||||||
margin-top: 10px;
|
|
||||||
z-index: 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item_img {
|
|
||||||
position: absolute;
|
|
||||||
bottom: -10px;
|
|
||||||
right: 0;
|
|
||||||
// z-index: 5;
|
|
||||||
transition: transform 0.3s;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: scale(1.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.news {
|
|
||||||
.card_content {
|
|
||||||
padding: 20px;
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.news_card {
|
|
||||||
// width: 442px;
|
|
||||||
height: 180px;
|
|
||||||
padding: 16px;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
|
|
||||||
background-size: 100% 100%;
|
|
||||||
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -13,8 +13,8 @@ import { Swiper, SwiperSlide } from 'swiper/vue'
|
||||||
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
||||||
const modules = [Autoplay, Pagination, Navigation, A11y]
|
const modules = [Autoplay, Pagination, Navigation, A11y]
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin', 'bcp_dandnag', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'bcp_dandnag', 'tech_service'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
|
|
||||||
// import { da } from 'element-plus/es/locale/index.js'
|
// import { da } from 'element-plus/es/locale/index.js'
|
||||||
|
|
@ -166,14 +166,20 @@ const download = async (row) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let { briefingPath, filePath } = row
|
let { briefingPath, filePath } = row
|
||||||
console.log('🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:', briefingPath, filePath)
|
console.log(
|
||||||
|
'🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:',
|
||||||
|
briefingPath,
|
||||||
|
filePath
|
||||||
|
)
|
||||||
|
|
||||||
if (!briefingPath && !filePath) {
|
if (!briefingPath && !filePath) {
|
||||||
message.info('没有可预览文件!')
|
message.info('没有可预览文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(briefingPath || filePath)
|
srcType.value = getLastSubstring(briefingPath || filePath)
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
if (
|
||||||
|
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||||
|
) {
|
||||||
// src.value = filePath
|
// src.value = filePath
|
||||||
// pdfShow.value = true
|
// pdfShow.value = true
|
||||||
let url = 'https://view.xdocin.com/view?src=' + (briefingPath || filePath)
|
let url = 'https://view.xdocin.com/view?src=' + (briefingPath || filePath)
|
||||||
|
|
@ -182,7 +188,14 @@ const download = async (row) => {
|
||||||
window.open(
|
window.open(
|
||||||
url,
|
url,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
// window.open(
|
// window.open(
|
||||||
// briefingPath,
|
// briefingPath,
|
||||||
|
|
@ -197,7 +210,9 @@ const download = async (row) => {
|
||||||
// 0
|
// 0
|
||||||
// )
|
// )
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -293,7 +308,11 @@ const isChart = (content) => {
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="new-content overflow-hidden" id="newContent" v-if="dataA.length > 0">
|
<div
|
||||||
|
class="new-content overflow-hidden"
|
||||||
|
id="newContent"
|
||||||
|
v-if="dataA.length > 0"
|
||||||
|
>
|
||||||
<!-- <div v-for="it in dataA" class="new-item h20px mb-10px overflow-hidden" :key="it">
|
<!-- <div v-for="it in dataA" class="new-item h20px mb-10px overflow-hidden" :key="it">
|
||||||
<div class="news1 w340px h38px text-16px lh-22px" @click="showDetail(it, 1)">
|
<div class="news1 w340px h38px text-16px lh-22px" @click="showDetail(it, 1)">
|
||||||
<span v-if="it.status === 'New'" class="tit bg-#2CBA06" style="color: white">{{ it.status }}:</span>
|
<span v-if="it.status === 'New'" class="tit bg-#2CBA06" style="color: white">{{ it.status }}:</span>
|
||||||
|
|
@ -316,7 +335,8 @@ const isChart = (content) => {
|
||||||
}"
|
}"
|
||||||
:cell-style="{}"
|
:cell-style="{}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="" label="时间" width="70px"> </el-table-column>
|
<el-table-column prop="" label="时间" width="70px">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="" label="情报内容"> </el-table-column>
|
<el-table-column prop="" label="情报内容"> </el-table-column>
|
||||||
<el-table-column prop="" label="风险评估"> </el-table-column>
|
<el-table-column prop="" label="风险评估"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -397,7 +417,11 @@ const isChart = (content) => {
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div
|
<div
|
||||||
class="h-45px p0 m0"
|
class="h-45px p0 m0"
|
||||||
:class="isChart(scope.row.riskEstimation) ? 'two-line-header ' : ''"
|
:class="
|
||||||
|
isChart(scope.row.riskEstimation)
|
||||||
|
? 'two-line-header '
|
||||||
|
: ''
|
||||||
|
"
|
||||||
:title="scope.row.riskEstimation"
|
:title="scope.row.riskEstimation"
|
||||||
>
|
>
|
||||||
{{ scope.row.riskEstimation }}
|
{{ scope.row.riskEstimation }}
|
||||||
|
|
@ -408,7 +432,10 @@ const isChart = (content) => {
|
||||||
</div>
|
</div>
|
||||||
<div v-if="dataA.length == 0" class="empty-content"></div>
|
<div v-if="dataA.length == 0" class="empty-content"></div>
|
||||||
</div>
|
</div>
|
||||||
<img src="./images/yojjt@2x.png" class="w-18px h18px absolute left-49.5% top-20% ml--8px" />
|
<img
|
||||||
|
src="./images/yojjt@2x.png"
|
||||||
|
class="w-18px h18px absolute left-49.5% top-20% ml--8px"
|
||||||
|
/>
|
||||||
<div class="summary absolute">
|
<div class="summary absolute">
|
||||||
<!-- <div class="arrow"></div> -->
|
<!-- <div class="arrow"></div> -->
|
||||||
<div
|
<div
|
||||||
|
|
@ -465,7 +492,10 @@ const isChart = (content) => {
|
||||||
</div> -->
|
</div> -->
|
||||||
<swiper-slide v-for="i in dataC" :key="i.id">
|
<swiper-slide v-for="i in dataC" :key="i.id">
|
||||||
<div class="py22px item-row items-center flex">
|
<div class="py22px item-row items-center flex">
|
||||||
<div class="inline-flex cur_p file-icon text-16px" @click="download(i)">
|
<div
|
||||||
|
class="inline-flex cur_p file-icon text-16px"
|
||||||
|
@click="download(i)"
|
||||||
|
>
|
||||||
{{ i.title }}
|
{{ i.title }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -484,7 +514,12 @@ const isChart = (content) => {
|
||||||
运营守则
|
运营守则
|
||||||
</div>
|
</div>
|
||||||
<div class="operate-content overflow-y-auto" v-if="dataB.length > 0">
|
<div class="operate-content overflow-y-auto" v-if="dataB.length > 0">
|
||||||
<div v-if="dataB" v-for="it in dataB" class="py12px h34px overflow-hidden" :key="it">
|
<div
|
||||||
|
v-if="dataB"
|
||||||
|
v-for="it in dataB"
|
||||||
|
class="py12px h34px overflow-hidden"
|
||||||
|
:key="it"
|
||||||
|
>
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div
|
<div
|
||||||
|
|
@ -507,7 +542,7 @@ const isChart = (content) => {
|
||||||
<div class="gen w293px h92px absolute">
|
<div class="gen w293px h92px absolute">
|
||||||
<div class="ring-gen"></div>
|
<div class="ring-gen"></div>
|
||||||
<div class="text-23px text-#00E4FF font-500 gen-title">供方SCM</div>
|
<div class="text-23px text-#00E4FF font-500 gen-title">供方SCM</div>
|
||||||
<div class="gen-content overflow-y-auto relative" v-if="true">
|
<div class="gen-content overflow-y-auto" v-if="true">
|
||||||
<!-- <div v-if="dataC" v-for="it in dataC" class="py8px h28px overflow-hidden" :key="it">
|
<!-- <div v-if="dataC" v-for="it in dataC" class="py8px h28px overflow-hidden" :key="it">
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
@ -521,14 +556,6 @@ const isChart = (content) => {
|
||||||
</n-popover>
|
</n-popover>
|
||||||
</div> -->
|
</div> -->
|
||||||
<img src="./images/ss.png" class="w-388px" />
|
<img src="./images/ss.png" class="w-388px" />
|
||||||
<div
|
|
||||||
class="absolute flex flex-col w-97% rounded-md overflow-hidden h-full z-200 top-0 left-0 right-50px text-center bg-red justify-center items-center"
|
|
||||||
style="background-color: rgba(255, 255, 255, 0.9)"
|
|
||||||
>
|
|
||||||
<img src="@/assets/images/chah.png" />
|
|
||||||
<br />
|
|
||||||
<div class="text-#5683DB text-36px">【做成中,敬请期待】</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="empty-content">
|
<div v-else class="empty-content">
|
||||||
<div class="content"></div>
|
<div class="content"></div>
|
||||||
|
|
@ -544,7 +571,10 @@ const isChart = (content) => {
|
||||||
>
|
>
|
||||||
BCP情报
|
BCP情报
|
||||||
</div>
|
</div>
|
||||||
<div class="supplier-content overflow-y-auto text-16px" v-if="dataD.length > 0">
|
<div
|
||||||
|
class="supplier-content overflow-y-auto text-16px"
|
||||||
|
v-if="dataD.length > 0"
|
||||||
|
>
|
||||||
<s-tree
|
<s-tree
|
||||||
:data="dataD"
|
:data="dataD"
|
||||||
@changeIsShow="changeIsShowFn"
|
@changeIsShow="changeIsShowFn"
|
||||||
|
|
|
||||||
|
|
@ -7,66 +7,69 @@
|
||||||
</li>
|
</li>
|
||||||
<div id="earth" class="earth"></div>
|
<div id="earth" class="earth"></div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const numCards = ref(9)
|
|
||||||
const mouseX = ref(0)
|
const numCards = ref(9);
|
||||||
const mouseY = ref(0)
|
const mouseX = ref(0);
|
||||||
const isDragging = ref(false)
|
const mouseY = ref(0);
|
||||||
|
const isDragging = ref(false);
|
||||||
|
|
||||||
const handleMouseMove = (event) => {
|
const handleMouseMove = (event) => {
|
||||||
const rect = event.currentTarget?.getBoundingClientRect()
|
const rect = event.currentTarget.getBoundingClientRect();
|
||||||
mouseX.value = event.clientX - rect.left
|
mouseX.value = event.clientX - rect.left;
|
||||||
mouseY.value = event.clientY - rect.top
|
mouseY.value = event.clientY - rect.top;
|
||||||
}
|
};
|
||||||
|
|
||||||
const updateRotation = () => {
|
const updateRotation = () => {
|
||||||
const cardRefs = ref([])
|
const cardRefs = ref([]);
|
||||||
const earth = ref(null)
|
const earth = ref(null);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
cardRefs.value = document.querySelectorAll('#ul1 li')
|
cardRefs.value = document.querySelectorAll('#ul1 li');
|
||||||
earth.value = document.getElementById('earth')
|
earth.value = document.getElementById('earth');
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
cardRefs.value.forEach((card, index) => {
|
cardRefs.value.forEach((card, index) => {
|
||||||
const d = (360 / numCards.value) * index + mouseX.value / 10
|
const d = (360 / numCards.value) * index + mouseX.value / 10;
|
||||||
card.style.transform = `rotateY(${d}deg) translateZ(350px)`
|
card.style.transform = `rotateY(${d}deg) translateZ(350px)`;
|
||||||
|
|
||||||
if (Math.abs(d) < 30) {
|
if (Math.abs(d) < 30) {
|
||||||
card.style.zIndex = 2
|
card.style.zIndex = 2;
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(-400px)'
|
earth.value.style.transform = 'translateZ(-400px)';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
card.style.zIndex = -1
|
card.style.zIndex = -1;
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(400px)'
|
earth.value.style.transform = 'translateZ(400px)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}, 30)
|
}, 30);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const autoRotate = () => {
|
const autoRotate = () => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (!isDragging.value) {
|
if (!isDragging.value) {
|
||||||
// 自动旋转的速度
|
// 自动旋转的速度
|
||||||
rotationY.value += 1
|
rotationY.value += 1;
|
||||||
}
|
}
|
||||||
}, 30)
|
}, 30);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
clearInterval(interval)
|
clearInterval(interval);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
updateRotation()
|
updateRotation();
|
||||||
autoRotate()
|
autoRotate();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -109,6 +112,7 @@ body {
|
||||||
/* font-size: 30px; */
|
/* font-size: 30px; */
|
||||||
p{
|
p{
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,3 +137,4 @@ body {
|
||||||
transition: transform 0.5s ease;
|
transition: transform 0.5s ease;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -3,12 +3,11 @@
|
||||||
<ul id="ul1">
|
<ul id="ul1">
|
||||||
<li class="ation-li" v-for="(item, index) in props.dataE" :key="index" ref="cards">
|
<li class="ation-li" v-for="(item, index) in props.dataE" :key="index" ref="cards">
|
||||||
<div class="pt10px pb10px text-15px title">{{item.title}}</div>
|
<div class="pt10px pb10px text-15px title">{{item.title}}</div>
|
||||||
<div class="text-12px leading-15px sub-title" @click="downloadHandle(item)">
|
<div class="text-12px leading-15px sub-title" @click="downloadHandle(item)">{{item.content}}</div>
|
||||||
{{ item.content }}
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
<div id="earth" class="earth"></div>
|
<div id="earth" class="earth"></div>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -20,80 +19,86 @@ const downloadHandle = (item) => {
|
||||||
emit('downloadHandle', item, 5)
|
emit('downloadHandle', item, 5)
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
//对象写法
|
const props = defineProps({//对象写法
|
||||||
dataE:{
|
dataE:{
|
||||||
type:Array,//接受的数据类型
|
type:Array,//接受的数据类型
|
||||||
default: [] //接受默认数据
|
default:[],//接受默认数据
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const numCards = ref(10)
|
|
||||||
const mouseX = ref(0)
|
|
||||||
const mouseY = ref(0)
|
const numCards = ref(10);
|
||||||
const isDragging = ref(false)
|
const mouseX = ref(0);
|
||||||
|
const mouseY = ref(0);
|
||||||
|
const isDragging = ref(false);
|
||||||
|
|
||||||
const handleMouseMove = (event) => {
|
const handleMouseMove = (event) => {
|
||||||
const rect = event.currentTarget?.getBoundingClientRect()
|
const rect = event.currentTarget.getBoundingClientRect();
|
||||||
mouseX.value = event.clientX - rect.left
|
mouseX.value = event.clientX - rect.left;
|
||||||
mouseY.value = event.clientY - rect.top
|
mouseY.value = event.clientY - rect.top;
|
||||||
}
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.dataE,
|
() => props.dataE,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
updateRotation()
|
updateRotation();
|
||||||
// autoRotate();
|
// autoRotate();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const updateRotation = () => {
|
const updateRotation = () => {
|
||||||
const cardRefs = ref([])
|
const cardRefs = ref([]);
|
||||||
const earth = ref(null)
|
const earth = ref(null);
|
||||||
|
|
||||||
cardRefs.value = document.querySelectorAll('#ul1 li')
|
cardRefs.value = document.querySelectorAll('#ul1 li');
|
||||||
earth.value = document.getElementById('earth')
|
earth.value = document.getElementById('earth');
|
||||||
console.log(cardRefs, 1111)
|
console.log(cardRefs, 1111)
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
numCards.value = cardRefs.value.length
|
numCards.value = cardRefs.value.length;
|
||||||
cardRefs.value.forEach((card, index) => {
|
cardRefs.value.forEach((card, index) => {
|
||||||
const d = (360 / numCards.value) * index + mouseX.value / 10
|
const d = (360 / numCards.value) * index + mouseX.value / 10;
|
||||||
let radian = (d * Math.PI) / 180
|
let radian = d * Math.PI / 180;
|
||||||
let opacity = (Math.cos(radian) + 1) / 2
|
let opacity = (Math.cos(radian) + 1) / 2;
|
||||||
card.style.transform = `rotateY(${d}deg) translateZ(280px) rotateY(${-d}deg)`
|
card.style.transform = `rotateY(${d}deg) translateZ(280px) rotateY(${-d}deg)`;
|
||||||
card.style.opacity = opacity * opacity
|
card.style.opacity = opacity * opacity;
|
||||||
|
|
||||||
if (Math.abs(d) < 30) {
|
if (Math.abs(d) < 30) {
|
||||||
card.style.zIndex = 2
|
card.style.zIndex = 2;
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(-400px)'
|
earth.value.style.transform = 'translateZ(-400px)';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
card.style.zIndex = -1
|
card.style.zIndex = -1;
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(400px)'
|
earth.value.style.transform = 'translateZ(400px)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}, 30)
|
}, 30);
|
||||||
}
|
};
|
||||||
|
|
||||||
const autoRotate = () => {
|
const autoRotate = () => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (!isDragging.value) {
|
if (!isDragging.value) {
|
||||||
// 自动旋转的速度
|
// 自动旋转的速度
|
||||||
mouseY.value += 1
|
mouseY.value += 1;
|
||||||
}
|
}
|
||||||
}, 30)
|
}, 30);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
clearInterval(interval)
|
clearInterval(interval);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -130,7 +135,7 @@ body {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// background: rgba(14, 116, 238, 0.8);
|
// background: rgba(14, 116, 238, 0.8);
|
||||||
background-image: url('./images/biaoq.png');
|
background-image: url("./images/biaoq.png");
|
||||||
color: rgb(255, 255, 255);
|
color: rgb(255, 255, 255);
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -138,6 +143,7 @@ body {
|
||||||
/* font-size: 30px; */
|
/* font-size: 30px; */
|
||||||
p{
|
p{
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,7 +176,7 @@ body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.sub-title {
|
.sub-title {
|
||||||
color: #00e4ff;
|
color: #00E4FF;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,7 @@ import { useMessage, NModal } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
|
|
||||||
import {
|
import { getBPCUser, BPCSaveUser, getBPCEditList,updateBPC,updateBPCOne,delBPCActList, BPCDownload } from '@/api/daikin/base'
|
||||||
getBPCUser,
|
|
||||||
BPCSaveUser,
|
|
||||||
getBPCEditList,
|
|
||||||
updateBPC,
|
|
||||||
updateBPCOne,
|
|
||||||
delBPCActList,
|
|
||||||
BPCDownload
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
|
|
@ -32,6 +24,7 @@ const editC = ref()
|
||||||
const editD = ref()
|
const editD = ref()
|
||||||
const editE = ref()
|
const editE = ref()
|
||||||
|
|
||||||
|
|
||||||
const shomkA = ref(false)
|
const shomkA = ref(false)
|
||||||
const shomkB = ref(false)
|
const shomkB = ref(false)
|
||||||
const shomkC = ref(false)
|
const shomkC = ref(false)
|
||||||
|
|
@ -43,8 +36,8 @@ async function setDataFiles(arr, _row) {
|
||||||
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
||||||
if (i.filePathList && i.filePathList.length > 0) {
|
if (i.filePathList && i.filePathList.length > 0) {
|
||||||
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
||||||
file.name = file.originalFileName
|
file.name = file.originalFileName;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
|
|
@ -54,68 +47,61 @@ async function setDataFiles(arr, _row) {
|
||||||
async function getDataA() {
|
async function getDataA() {
|
||||||
const {rows: dataArr} = await getBPCEditList({moduleId: 1})
|
const {rows: dataArr} = await getBPCEditList({moduleId: 1})
|
||||||
dataA.value = dataArr
|
dataA.value = dataArr
|
||||||
setDataFiles(dataArr)
|
setDataFiles(dataArr);
|
||||||
}
|
}
|
||||||
async function getDataB() {
|
async function getDataB() {
|
||||||
const {rows: dataBrr} = await getBPCEditList({moduleId: 2})
|
const {rows: dataBrr} = await getBPCEditList({moduleId: 2})
|
||||||
dataB.value = dataBrr
|
dataB.value = dataBrr
|
||||||
setDataFiles(dataBrr)
|
setDataFiles(dataBrr);
|
||||||
}
|
}
|
||||||
async function getDataC() {
|
async function getDataC() {
|
||||||
const {rows: dataCrr} = await getBPCEditList({moduleId: 3})
|
const {rows: dataCrr} = await getBPCEditList({moduleId: 3})
|
||||||
dataC.value = dataCrr
|
dataC.value = dataCrr
|
||||||
setDataFiles(dataCrr)
|
setDataFiles(dataCrr);
|
||||||
}
|
}
|
||||||
async function getDataD() {
|
async function getDataD() {
|
||||||
const {rows: dataDrr} = await getBPCEditList({moduleId: 4})
|
const {rows: dataDrr} = await getBPCEditList({moduleId: 4})
|
||||||
dataD.value = dataDrr
|
dataD.value = dataDrr
|
||||||
setDataFiles(dataDrr)
|
setDataFiles(dataDrr);
|
||||||
}
|
}
|
||||||
async function getDataE() {
|
async function getDataE() {
|
||||||
const {rows: dataErr} = await getBPCEditList({moduleId: 5})
|
const {rows: dataErr} = await getBPCEditList({moduleId: 5})
|
||||||
dataE.value = dataErr
|
dataE.value = dataErr
|
||||||
setDataFiles(dataErr)
|
setDataFiles(dataErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getDataA()
|
getDataA();
|
||||||
getDataB()
|
getDataB();
|
||||||
getDataC()
|
getDataC();
|
||||||
getDataD()
|
getDataD();
|
||||||
getDataE()
|
getDataE();
|
||||||
})
|
})
|
||||||
|
|
||||||
function computedName(title) {
|
function computedName(title) {
|
||||||
let index = title.indexOf('.')
|
let index = title.indexOf(".");
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
return title.slice(0, index - 1)
|
return title.slice(0, index - 1);
|
||||||
}
|
}
|
||||||
return title
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitA(row: {
|
async function onSubmitA(row: { filePathList?: any; id?: any; indexId?: any; title?: any; proportion?: any; partSum?: any; badSum?: any }) {
|
||||||
filePathList?: any
|
|
||||||
id?: any
|
|
||||||
indexId?: any
|
|
||||||
title?: any
|
|
||||||
proportion?: any
|
|
||||||
partSum?: any
|
|
||||||
badSum?: any
|
|
||||||
}) {
|
|
||||||
console.log(row, 444)
|
console.log(row, 444)
|
||||||
const { id, status, title, type } = row
|
const { id, status, title, type } = row
|
||||||
let moduleId = 1
|
let moduleId = 1;
|
||||||
|
|
||||||
let sendData = []
|
let sendData = []
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
let obj = { id, status, moduleId }
|
let obj = { id, status, moduleId };
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
obj.filePath = item.response.url
|
obj.filePath = item.response.url;
|
||||||
obj.title = title || computedName(item.response.originalFilename)
|
obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
obj.filePath = item.url
|
else {
|
||||||
obj.title = title || computedName(item.originalFilename)
|
obj.filePath = item.url;
|
||||||
|
obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
sendData.push(obj)
|
sendData.push(obj)
|
||||||
})
|
})
|
||||||
|
|
@ -126,29 +112,27 @@ async function onSubmitA(row: {
|
||||||
}else {
|
}else {
|
||||||
var { code, msg } = await updateBPCOne(sendData[0])
|
var { code, msg } = await updateBPCOne(sendData[0])
|
||||||
}
|
}
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
getDataA()
|
getDataA();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
|
async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
|
||||||
const { id, title, type } = row
|
const { id, title, type } = row
|
||||||
let moduleId = 2
|
let moduleId = 2;
|
||||||
|
|
||||||
let sendData = []
|
let sendData = []
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
let obj = { id, status, moduleId }
|
let obj = { id, status, moduleId };
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
obj.filePath = item.response.url
|
obj.filePath = item.response.url;
|
||||||
obj.title = title || computedName(item.response.originalFilename)
|
obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
obj.filePath = item.url
|
else {
|
||||||
obj.title = title || computedName(item.originalFilename)
|
obj.filePath = item.url;
|
||||||
|
obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
sendData.push(obj)
|
sendData.push(obj)
|
||||||
})
|
})
|
||||||
|
|
@ -159,30 +143,28 @@ async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?
|
||||||
}else {
|
}else {
|
||||||
var { code, msg } = await updateBPCOne(sendData[0])
|
var { code, msg } = await updateBPCOne(sendData[0])
|
||||||
}
|
}
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkB.value = false
|
shomkB.value = false
|
||||||
|
|
||||||
getDataB()
|
getDataB();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; title?: any }) {
|
async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; title?: any }) {
|
||||||
const { id, title, type } = row
|
const { id, title, type } = row
|
||||||
let moduleId = 3
|
let moduleId = 3;
|
||||||
|
|
||||||
let sendData = []
|
let sendData = []
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
let obj = { id, status, moduleId }
|
let obj = { id, status, moduleId };
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
obj.filePath = item.response.url
|
obj.filePath = item.response.url;
|
||||||
obj.title = title || computedName(item.response.originalFilename)
|
obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
obj.filePath = item.url
|
else {
|
||||||
obj.title = title || computedName(item.originalFilename)
|
obj.filePath = item.url;
|
||||||
|
obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
sendData.push(obj)
|
sendData.push(obj)
|
||||||
})
|
})
|
||||||
|
|
@ -193,26 +175,26 @@ async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; titl
|
||||||
}else {
|
}else {
|
||||||
var { code, msg } = await updateBPCOne(sendData[0])
|
var { code, msg } = await updateBPCOne(sendData[0])
|
||||||
}
|
}
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else message.error(msg)
|
||||||
} else message.error(msg)
|
|
||||||
shomkC.value = false
|
shomkC.value = false
|
||||||
getDataC()
|
getDataC()
|
||||||
}
|
}
|
||||||
async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
|
async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
|
||||||
const { id, title, type } = row
|
const { id, title, type } = row
|
||||||
let moduleId = 4
|
let moduleId = 4;
|
||||||
|
|
||||||
let sendData = []
|
let sendData = []
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
let obj = { id, status, moduleId }
|
let obj = { id, status, moduleId };
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
obj.filePath = item.response.url
|
obj.filePath = item.response.url;
|
||||||
obj.title = title || computedName(item.response.originalFilename)
|
obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
obj.filePath = item.url
|
else {
|
||||||
obj.title = title || computedName(item.originalFilename)
|
obj.filePath = item.url;
|
||||||
|
obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
sendData.push(obj)
|
sendData.push(obj)
|
||||||
})
|
})
|
||||||
|
|
@ -223,9 +205,8 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
|
||||||
}else {
|
}else {
|
||||||
var { code, msg } = await updateBPCOne(sendData[0])
|
var { code, msg } = await updateBPCOne(sendData[0])
|
||||||
}
|
}
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else {
|
||||||
} else {
|
|
||||||
message.error(msg)
|
message.error(msg)
|
||||||
}
|
}
|
||||||
shomkD.value = false
|
shomkD.value = false
|
||||||
|
|
@ -233,17 +214,18 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
|
||||||
}
|
}
|
||||||
async function onSubmitE(row: { filePathList?: any; id?: any; title?: any }) {
|
async function onSubmitE(row: { filePathList?: any; id?: any; title?: any }) {
|
||||||
const { id, title, type } = row
|
const { id, title, type } = row
|
||||||
let moduleId = 5
|
let moduleId = 5;
|
||||||
let sendData = []
|
let sendData = []
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
let obj = { id, status, moduleId }
|
let obj = { id, status, moduleId };
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
obj.filePath = item.response.url
|
obj.filePath = item.response.url;
|
||||||
obj.title = title || computedName(item.response.originalFilename)
|
obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
obj.filePath = item.url
|
else {
|
||||||
obj.title = title || computedName(item.originalFilename)
|
obj.filePath = item.url;
|
||||||
|
obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
sendData.push(obj)
|
sendData.push(obj)
|
||||||
})
|
})
|
||||||
|
|
@ -254,33 +236,31 @@ async function onSubmitE(row: { filePathList?: any; id?: any; title?: any }) {
|
||||||
}else {
|
}else {
|
||||||
var { code, msg } = await updateBPCOne(sendData[0])
|
var { code, msg } = await updateBPCOne(sendData[0])
|
||||||
}
|
}
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else {
|
||||||
} else {
|
|
||||||
message.error(msg)
|
message.error(msg)
|
||||||
}
|
}
|
||||||
shomkE.value = false
|
shomkE.value = false
|
||||||
getDataE()
|
getDataE()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleEditA = (type: string, row: any) => {
|
const handleEditA = (type: string, row: any) => {
|
||||||
editA.value = {
|
editA.value = {
|
||||||
type: type,
|
type: type,
|
||||||
status: '紧急',
|
status: '紧急',
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
shomkA.value = true
|
shomkA.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editA.value = row
|
editA.value = row
|
||||||
editA.value.type = type
|
editA.value.type = type;
|
||||||
editA.value.fileList = [
|
editA.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
// BPCDownload({ id: row.id }).then(res => {
|
// BPCDownload({ id: row.id }).then(res => {
|
||||||
// editA.value.fileList = [res.data]
|
// editA.value.fileList = [res.data]
|
||||||
// })
|
// })
|
||||||
|
|
@ -289,19 +269,17 @@ const handleEditB = (type: string, row: any) => {
|
||||||
editB.value = {
|
editB.value = {
|
||||||
type: type,
|
type: type,
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
shomkB.value = true
|
shomkB.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editB.value = row
|
editB.value = row
|
||||||
editB.value.type = type
|
editB.value.type = type;
|
||||||
editB.value.fileList = [
|
editB.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
// editB.value.fileList = [row.filePath]
|
// editB.value.fileList = [row.filePath]
|
||||||
// BPCDownload({ id: row.id }).then(res => {
|
// BPCDownload({ id: row.id }).then(res => {
|
||||||
// editB.value.fileList = [res.data]
|
// editB.value.fileList = [res.data]
|
||||||
|
|
@ -311,19 +289,17 @@ const handleEditC = (type: string, row: any) => {
|
||||||
editC.value = {
|
editC.value = {
|
||||||
type: type,
|
type: type,
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
shomkC.value = true
|
shomkC.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editC.value = row
|
editC.value = row
|
||||||
editC.value.type = type
|
editC.value.type = type;
|
||||||
editC.value.fileList = [
|
editC.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
// editC.value.fileList = [row.filePath]
|
// editC.value.fileList = [row.filePath]
|
||||||
// BPCDownload({ id: row.id }).then(res => {
|
// BPCDownload({ id: row.id }).then(res => {
|
||||||
// editC.value.fileList = [res.data]
|
// editC.value.fileList = [res.data]
|
||||||
|
|
@ -333,19 +309,17 @@ const handleEditD = (type: string, row: any) => {
|
||||||
editD.value = {
|
editD.value = {
|
||||||
type: type,
|
type: type,
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
shomkD.value = true
|
shomkD.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editD.value = row
|
editD.value = row
|
||||||
editD.value.type = type
|
editD.value.type = type;
|
||||||
editD.value.fileList = [
|
editD.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
// BPCDownload({ id: row.id }).then(res => {
|
// BPCDownload({ id: row.id }).then(res => {
|
||||||
// editD.value.fileList = [res.data]
|
// editD.value.fileList = [res.data]
|
||||||
// })
|
// })
|
||||||
|
|
@ -354,82 +328,67 @@ const handleEditE = (type: string, row: any) => {
|
||||||
editE.value = {
|
editE.value = {
|
||||||
type: type,
|
type: type,
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
shomkE.value = true
|
shomkE.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editE.value = row
|
editE.value = row
|
||||||
editE.value.type = type
|
editE.value.type = type;
|
||||||
editE.value.fileList = [
|
editE.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
// BPCDownload({ id: row.id }).then(res => {
|
// BPCDownload({ id: row.id }).then(res => {
|
||||||
// editE.value.fileList = [res.data]
|
// editE.value.fileList = [res.data]
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleDeleteA(index: number, row: any) {
|
async function handleDeleteA(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await delBPCActList({ id })
|
const { code, msg } = await delBPCActList({ id })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
getDataA();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataA()
|
|
||||||
}
|
}
|
||||||
async function handleDeleteB(index: number, row: any) {
|
async function handleDeleteB(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await delBPCActList({ id })
|
const { code, msg } = await delBPCActList({ id })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
getDataB()
|
getDataB();
|
||||||
}
|
}
|
||||||
async function handleDeleteC(index: number, row: any) {
|
async function handleDeleteC(index: number, row: any) {
|
||||||
|
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await delBPCActList({ id })
|
const { code, msg } = await delBPCActList({ id })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataC()
|
getDataC()
|
||||||
}
|
}
|
||||||
async function handleDeleteD(index: number, row: any) {
|
async function handleDeleteD(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await delBPCActList({ id })
|
const { code, msg } = await delBPCActList({ id })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
getDataD();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataD()
|
|
||||||
}
|
}
|
||||||
async function handleDeleteE(index: number, row: any) {
|
async function handleDeleteE(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await delBPCActList({ id })
|
const { code, msg } = await delBPCActList({ id })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
getDataE();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataE()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeName = ref('first')
|
const activeName = ref("first")
|
||||||
const userList = ref()
|
const userList = ref()
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
const flg = ref()
|
const flg = ref()
|
||||||
|
|
@ -439,10 +398,11 @@ async function getUser(moduleId: any) {
|
||||||
flg.value = moduleId
|
flg.value = moduleId
|
||||||
const {data: userArr} = await getBPCUser({moduleId})
|
const {data: userArr} = await getBPCUser({moduleId})
|
||||||
setUserList.value = userArr
|
setUserList.value = userArr
|
||||||
|
|
||||||
}
|
}
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const handleChild = (data: any) => {
|
const handleChild = (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)
|
||||||
// userList.value = multipleSelection
|
// userList.value = multipleSelection
|
||||||
|
|
@ -461,35 +421,6 @@ const CloseThiss = (data: boolean) => {
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
const pickerOptions = {
|
|
||||||
disabledDate(time) {
|
|
||||||
return time.getTime() > Date.now()
|
|
||||||
},
|
|
||||||
shortcuts: [
|
|
||||||
{
|
|
||||||
text: '今天',
|
|
||||||
onClick(picker) {
|
|
||||||
picker.$emit('pick', new Date())
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '昨天',
|
|
||||||
onClick(picker) {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
|
||||||
picker.$emit('pick', date)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '一周前',
|
|
||||||
onClick(picker) {
|
|
||||||
const date = new Date()
|
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
|
|
||||||
picker.$emit('pick', date)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top">
|
<HomeHead class="top">
|
||||||
|
|
@ -502,35 +433,20 @@ const pickerOptions = {
|
||||||
<!-- <img src="./images/logo.svg" class="h56px mr21px" /> -->
|
<!-- <img src="./images/logo.svg" class="h56px mr21px" /> -->
|
||||||
<div class="text-36px text-#000">BCP内容管理</div>
|
<div class="text-36px text-#000">BCP内容管理</div>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs
|
<el-tabs type="card" v-model="activeName" class="demo-tabs mt30px text-20px" @tab-click="handleClick">
|
||||||
type="card"
|
|
||||||
v-model="activeName"
|
|
||||||
class="demo-tabs mt30px text-20px"
|
|
||||||
@tab-click="handleClick"
|
|
||||||
>
|
|
||||||
<el-tab-pane name="first">
|
<el-tab-pane name="first">
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="custom-tabs-label">
|
<span class="custom-tabs-label">
|
||||||
|
|
||||||
<span class="text-20px">BCP今日简报模块</span>
|
<span class="text-20px">BCP今日简报模块</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div class=" cont relative w100% h800px overflow-y-auto">
|
<div class=" cont relative w100% h800px overflow-y-auto">
|
||||||
<el-button type="primary" @click="handleEditA('add')" class="my20px"
|
<el-button type="primary" @click="handleEditA('add')" class="my20px">BCP今日简报新增</el-button>
|
||||||
>BCP今日简报新增</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="getUser(1)" > 查看范围</el-button>
|
<el-button type="primary" @click="getUser(1)" > 查看范围</el-button>
|
||||||
<el-table
|
<el-table :data="dataA" style="width: 95%"
|
||||||
:data="dataA"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="级别" prop="status" />
|
<el-table-column label="级别" prop="status" />
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -546,12 +462,7 @@ const pickerOptions = {
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)">删除</el-button>
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeleteA(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -565,22 +476,10 @@ const pickerOptions = {
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleEditB('add')" class="my20px"
|
<el-button type="primary" @click="handleEditB('add')" class="my20px">运营守则新增</el-button>
|
||||||
>运营守则新增</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="getUser(2)" > 查看范围</el-button>
|
<el-button type="primary" @click="getUser(2)" > 查看范围</el-button>
|
||||||
<el-table
|
<el-table :data="dataB" style="width: 95%" :header-cell-style="{ background:'#2A7BF7',color:'#fff',height:'60px',textAlign: 'center','font-size':'24px'}" :cell-style="{ 'text-align': 'center'}">
|
||||||
:data="dataB"
|
|
||||||
style="width: 95%"
|
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!-- <el-table-column label="文件列表" prop="filePathList" >
|
<!-- <el-table-column label="文件列表" prop="filePathList" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -594,12 +493,7 @@ const pickerOptions = {
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditB('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditB('edit', scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button size="small" type="danger" @click="handleDeleteB(scope.$index, scope.row)">删除</el-button>
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeleteB(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -609,27 +503,17 @@ const pickerOptions = {
|
||||||
<el-tab-pane name="third">
|
<el-tab-pane name="third">
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="custom-tabs-label">
|
<span class="custom-tabs-label">
|
||||||
|
|
||||||
<span class="text-20px">供方SCM模块</span>
|
<span class="text-20px">供方SCM模块</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleEditC('add')" class="my20px"
|
<el-button type="primary" @click="handleEditC('add')" class="my20px">供方SCM新增</el-button>
|
||||||
>供方SCM新增</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="getUser(3)" > 查看范围</el-button>
|
<el-button type="primary" @click="getUser(3)" > 查看范围</el-button>
|
||||||
<el-table
|
<el-table :data="dataC" style="width: 95%"
|
||||||
:data="dataC"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!-- <el-table-column label="文件列表" prop="fileList">
|
<!-- <el-table-column label="文件列表" prop="fileList">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -643,12 +527,7 @@ const pickerOptions = {
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditC('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditC('edit', scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button size="small" type="danger" @click="handleDeleteC(scope.$index, scope.row)">删除</el-button>
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeleteC(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -662,22 +541,13 @@ const pickerOptions = {
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleEditD('add')" class="my20px"
|
<el-button type="primary" @click="handleEditD('add')" class="my20px">BCP情报新增</el-button>
|
||||||
>BCP情报新增</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="getUser(4)" > 查看范围</el-button>
|
<el-button type="primary" @click="getUser(4)" > 查看范围</el-button>
|
||||||
<el-table
|
<el-table :data="dataD" style="width: 95%"
|
||||||
:data="dataD"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!-- <el-table-column label="文件列表" prop="filePathList">
|
<!-- <el-table-column label="文件列表" prop="filePathList">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -691,12 +561,7 @@ const pickerOptions = {
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditD('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditD('edit', scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button size="small" type="danger" @click="handleDeleteD(scope.$index, scope.row)">删除</el-button>
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeleteD(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -710,22 +575,13 @@ const pickerOptions = {
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleEditE('add')" class="my20px"
|
<el-button type="primary" @click="handleEditE('add')" class="my20px">底部滚动新增</el-button>
|
||||||
>底部滚动新增</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="getUser(5)" > 查看范围</el-button>
|
<el-button type="primary" @click="getUser(5)" > 查看范围</el-button>
|
||||||
<el-table
|
<el-table :data="dataE" style="width: 95%"
|
||||||
:data="dataE"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!-- <el-table-column label="文件列表" prop="filePathList">
|
<!-- <el-table-column label="文件列表" prop="filePathList">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -739,19 +595,15 @@ const pickerOptions = {
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditE('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditE('edit', scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button size="small" type="danger" @click="handleDeleteE(scope.$index, scope.row)">删除</el-button>
|
||||||
size="small"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDeleteE(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-form-item> </el-form-item>
|
<el-form-item>
|
||||||
|
</el-form-item>
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
|
|
||||||
<n-modal v-model:show="shomkA">
|
<n-modal v-model:show="shomkA">
|
||||||
|
|
@ -764,26 +616,19 @@ const pickerOptions = {
|
||||||
<el-radio label="New" size="large">New</el-radio>
|
<el-radio label="New" size="large">New</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item v-if="editA.type !== 'add'" label="标题">
|
<el-form-item v-if="editA.type !== 'add'" label="标题">
|
||||||
<el-input v-model="editA.title" />
|
<el-input v-model="editA.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editA.fileList"
|
action="/test-api/common/upload" multiple :limit="editA.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editA.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -794,22 +639,15 @@ const pickerOptions = {
|
||||||
<el-form-item v-if="editB.type !== 'add'" label="标题">
|
<el-form-item v-if="editB.type !== 'add'" label="标题">
|
||||||
<el-input v-model="editB.title" />
|
<el-input v-model="editB.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editB.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editB.fileList"
|
action="/test-api/common/upload" multiple :limit="editB.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editB.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitB(editB)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitB(editB)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -820,22 +658,15 @@ const pickerOptions = {
|
||||||
<el-form-item v-if="editC.type !== 'add'" label="标题">
|
<el-form-item v-if="editC.type !== 'add'" label="标题">
|
||||||
<el-input v-model="editC.title" />
|
<el-input v-model="editC.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editC.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editC.fileList"
|
action="/test-api/common/upload" multiple :limit="editC.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editC.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitC(editC)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitC(editC)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -846,52 +677,16 @@ const pickerOptions = {
|
||||||
<el-form-item v-if="editD.type !== 'add'" label="标题">
|
<el-form-item v-if="editD.type !== 'add'" label="标题">
|
||||||
<el-input v-model="editD.title" />
|
<el-input v-model="editD.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editD.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editD.fileList"
|
action="/test-api/common/upload" multiple :limit="editD.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editD.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editD.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editD.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editD.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editD.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitD(editD)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitD(editD)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -902,53 +697,16 @@ const pickerOptions = {
|
||||||
<el-form-item v-if="editE.type !== 'add'" label="标题">
|
<el-form-item v-if="editE.type !== 'add'" label="标题">
|
||||||
<el-input v-model="editE.title" />
|
<el-input v-model="editE.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editE.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editE.fileList"
|
action="/test-api/common/upload" multiple :limit="editE.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editE.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editE.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editE.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editE.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editE.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:picker-options="pickerOptions"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitE(editE)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitE(editE)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,479 +0,0 @@
|
||||||
<!-- C/D数据 -->
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { hisYearData, curYearData, useChart3, defineCompont } from './CdData'
|
|
||||||
import { treeList } from '@/api/daikin/base'
|
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
|
||||||
import CDSide from './CDSide.vue'
|
|
||||||
import { NForm, NFormItem, useMessage, NSelect, NButton } from 'naive-ui'
|
|
||||||
import develop from '../develop.vue'
|
|
||||||
import type { FormInst } from 'naive-ui'
|
|
||||||
|
|
||||||
const { push } = useRouter()
|
|
||||||
const message = useMessage()
|
|
||||||
const radioss = ref(2020)
|
|
||||||
|
|
||||||
const { chartRef: chartRef1, option: chartOption1 } = curYearData()
|
|
||||||
const { chartRef: chartRef2, option: chartOption2, state } = hisYearData()
|
|
||||||
const { chartRef: chart1, option: chartOp1 } = useChart3()
|
|
||||||
const { clickData, toYearData, hisData } = defineCompont()
|
|
||||||
|
|
||||||
const treeData = ref<any>()
|
|
||||||
async function getData() {
|
|
||||||
const { data } = await treeList()
|
|
||||||
const dataList = transformData(data)
|
|
||||||
console.log(dataList)
|
|
||||||
treeData.value = dataList
|
|
||||||
}
|
|
||||||
|
|
||||||
function transformData(data, parentKey = '') {
|
|
||||||
let keyIndex = 1
|
|
||||||
|
|
||||||
return data.map((item) => {
|
|
||||||
const key = parentKey ? `${parentKey}-${keyIndex}` : `${item.id}`
|
|
||||||
keyIndex++
|
|
||||||
|
|
||||||
const transformedItem = {
|
|
||||||
label: item.name,
|
|
||||||
key: key,
|
|
||||||
level: parentKey ? parentKey.split('-').length + 1 : 1,
|
|
||||||
id: item.id
|
|
||||||
}
|
|
||||||
|
|
||||||
const treeList = transformTreeList(item.treeList, key)
|
|
||||||
if (treeList.length > 0) {
|
|
||||||
transformedItem.treeList = treeList
|
|
||||||
}
|
|
||||||
|
|
||||||
return transformedItem
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function transformTreeList(treeList, parentKey) {
|
|
||||||
if (!treeList || treeList.length === 0) {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
let keyIndex = 1
|
|
||||||
|
|
||||||
return treeList.map((item) => {
|
|
||||||
const key = `${parentKey.split('-').length + 1}-${keyIndex}`
|
|
||||||
keyIndex++
|
|
||||||
|
|
||||||
const transformedItem = {
|
|
||||||
label: item.name,
|
|
||||||
key: key,
|
|
||||||
level: parentKey.split('-').length + 1,
|
|
||||||
id: item.id
|
|
||||||
}
|
|
||||||
|
|
||||||
const childTreeList = transformTreeList(item.treeList, key)
|
|
||||||
if (childTreeList.length > 0) {
|
|
||||||
transformedItem.treeList = childTreeList
|
|
||||||
}
|
|
||||||
|
|
||||||
return transformedItem
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
let formValue = ref({
|
|
||||||
name: '',
|
|
||||||
age: '',
|
|
||||||
phone: '',
|
|
||||||
phone1: ''
|
|
||||||
})
|
|
||||||
const formRef = ref<FormInst | null>(null)
|
|
||||||
const handleValidateClick = (e: MouseEvent) => {
|
|
||||||
e.preventDefault()
|
|
||||||
formRef.value?.validate((errors) => {
|
|
||||||
if (!errors) {
|
|
||||||
// message.success('Valid')
|
|
||||||
} else {
|
|
||||||
console.log(errors)
|
|
||||||
// message.error('Invalid')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
let options = [
|
|
||||||
{
|
|
||||||
label: '据点总体',
|
|
||||||
value: 'song0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'DIS',
|
|
||||||
value: 'song1'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const checkedValueRef = ref<string | null>(null)
|
|
||||||
const handleChange = (e: Event) => {
|
|
||||||
state.cateId = 1
|
|
||||||
state.yearTime = e
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取子组件传过来的值
|
|
||||||
const handleChild = (id: any) => {
|
|
||||||
// console.log(data)
|
|
||||||
clickData.id = id
|
|
||||||
}
|
|
||||||
getData()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<!-- <develop/> -->
|
|
||||||
<HomeHead class="top"> </HomeHead>
|
|
||||||
<div class="h-full relative flex flex-col">
|
|
||||||
<div class="font-600 text-36px mt29px">C/D数据11</div>
|
|
||||||
<div class="q-wrapper flex-1 h957.9px mt30px text-#142142 flex flex-col gap-22px bg-#fff">
|
|
||||||
<div class="data1 flex gap-26px">
|
|
||||||
<div class="cd_plan flex-1 pl32px pr33px pt25px pb10px">
|
|
||||||
<div class="title ml19px font-bold text-24px">FY23 中国域各据点 C/D进度</div>
|
|
||||||
<div class="text-20px mt21px mb17px font-600">发注金额:</div>
|
|
||||||
<div class="">
|
|
||||||
<table
|
|
||||||
style="border: 1px solid #ededed"
|
|
||||||
class="w-full text-center h295px border-spacing-0 text-16px fazhu"
|
|
||||||
>
|
|
||||||
<thead style="background-color: #417bef; color: #fff">
|
|
||||||
<tr class="h41px">
|
|
||||||
<th rowspan="2" colspan="2">据点</th>
|
|
||||||
<th colspan="2">据点</th>
|
|
||||||
<th colspan="2">苏州</th>
|
|
||||||
<th colspan="2">惠州</th>
|
|
||||||
</tr>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th>FY23</th>
|
|
||||||
<th>FY22</th>
|
|
||||||
<th>FY23</th>
|
|
||||||
<th>FY22</th>
|
|
||||||
<th>FY23</th>
|
|
||||||
<th>FY22</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="text-#142142">合计</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td rowspan="2" class="text-#142142">C/D</td>
|
|
||||||
<td class="text-#142142">交涉</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="text-#142142">THEME</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="text-#142142">市况</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="text-#142142">汇率</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
<td>55.40%</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="flex h55px">
|
|
||||||
<n-form ref="formRef" inline :label-width="55" :model="formValue" class="!items-center">
|
|
||||||
<n-form-item path="name">
|
|
||||||
<n-select
|
|
||||||
style="width: 148px"
|
|
||||||
v-model:value="formValue.name"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item path="age">
|
|
||||||
<n-select
|
|
||||||
style="width: 148px"
|
|
||||||
v-model:value="formValue.age"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item path="phone">
|
|
||||||
<n-select
|
|
||||||
style="width: 148px"
|
|
||||||
v-model:value="formValue.phone"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item path="phone">
|
|
||||||
<n-select
|
|
||||||
style="width: 148px"
|
|
||||||
v-model:value="formValue.phone1"
|
|
||||||
placeholder="请选择"
|
|
||||||
:options="options"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item>
|
|
||||||
<n-button
|
|
||||||
style="background-color: #417bef; color: #fff"
|
|
||||||
attr-type="button"
|
|
||||||
@click="handleValidateClick"
|
|
||||||
>
|
|
||||||
检索
|
|
||||||
</n-button>
|
|
||||||
</n-form-item>
|
|
||||||
</n-form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="amount flex-1 pl32px pr33px pt27px pb0px">
|
|
||||||
<div class="flex gap-49px">
|
|
||||||
<div class="flex-1">
|
|
||||||
<div class="title ml19px font-bold text-24px">发注金额推移</div>
|
|
||||||
<div class="w330px h199px mt22px">
|
|
||||||
<img src="./images/fazhuje.png" alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1">
|
|
||||||
<div class="title ml19px font-bold text-24px">CD堆积</div>
|
|
||||||
<div class="w330px h199px mt22px">
|
|
||||||
<img src="./images/cddj.png" alt="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-1">
|
|
||||||
<div class="title ml19px font-bold text-24px">发注金额推移</div>
|
|
||||||
<div class="w100% h199px mt22px">
|
|
||||||
<VChart ref="chart1" :option="chartOp1" autoresize />
|
|
||||||
</div>
|
|
||||||
<div class="title ml19px font-bold text-24px !absolute top-0 left-50%">CD堆积</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="h152px mt20px" style="border: 1px solid #d3d3d3">
|
|
||||||
<div class="mt13px ml17px text-16px font-bold">年度重点</div>
|
|
||||||
<div class="h112px ml17px mt10px mr15px text-14px lh-22px overflow-y-auto">
|
|
||||||
年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点The
|
|
||||||
年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点The
|
|
||||||
年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点The
|
|
||||||
年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点The
|
|
||||||
年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重点Theme年度重
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="data2 flex flex-col">
|
|
||||||
<div class="flex min-h280px">
|
|
||||||
<div class="w148px">
|
|
||||||
<div class="title ml19px font-bold text-24px">按业绩</div>
|
|
||||||
<div class="max-h-236px overflow-y-auto mt100px">
|
|
||||||
<CDSide :treeData="treeData" @clickChliden="handleChild"></CDSide>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ml24px w485px">
|
|
||||||
<div class="ml19px font-bold text-24px">当年度</div>
|
|
||||||
<table
|
|
||||||
class="dangnian w485px text-center mt23px text-18px border-spacing-0 overflow-auto min-h-100px"
|
|
||||||
>
|
|
||||||
<thead style="background-color: #417bef; color: #fff; height: 42px">
|
|
||||||
<tr class="h41px">
|
|
||||||
<th colspan="4">FY2023</th>
|
|
||||||
</tr>
|
|
||||||
<tr class="h35px">
|
|
||||||
<th>供方</th>
|
|
||||||
<th>发注金额</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<th>Theme</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="i in toYearData" key="i" class="!h35px text-16px">
|
|
||||||
<td>{{ i.supplierName }}</td>
|
|
||||||
<td>{{ i.publishAmount }}</td>
|
|
||||||
<td>{{ i.negAmount }}</td>
|
|
||||||
<td>{{ i.themeRate }}%</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="ml89px flex-1">
|
|
||||||
<div class="title ml19px font-bold text-24px">历史数据</div>
|
|
||||||
|
|
||||||
<div class="flex">
|
|
||||||
<table
|
|
||||||
class="history w-full text-center mt23px text-18px border-spacing-0 overflow-auto"
|
|
||||||
>
|
|
||||||
<thead style="background-color: #417bef; color: #fff; height: 42px">
|
|
||||||
<tr class="h41px">
|
|
||||||
<th colspan="3">FY2023</th>
|
|
||||||
</tr>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th>发注</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<th>Theme</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="i in hisData['2023']" key="i" class="!h35px text-16px">
|
|
||||||
<td>{{ i.publishAmount }}</td>
|
|
||||||
<td>{{ i.negAmount }}</td>
|
|
||||||
<td>{{ i.themeRate }}%</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<table
|
|
||||||
class="history w-full text-center mt23px text-18px border-spacing-0 overflow-auto"
|
|
||||||
>
|
|
||||||
<thead style="background-color: #417bef; color: #fff; height: 42px">
|
|
||||||
<tr class="h41px">
|
|
||||||
<th colspan="3">FY2022</th>
|
|
||||||
</tr>
|
|
||||||
<tr class="h41px">
|
|
||||||
<th>发注</th>
|
|
||||||
<th>交涉</th>
|
|
||||||
<th>Theme</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="i in hisData['2022']" key="i" class="!h35px text-16px">
|
|
||||||
<td>{{ i.publishAmount }}</td>
|
|
||||||
<td>{{ i.negAmount }}</td>
|
|
||||||
<td>{{ i.themeRate }}%</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-101px mt29px">
|
|
||||||
<div class="w634px h243px">
|
|
||||||
<VChart ref="chartRef1" :option="chartOption1" autoresize />
|
|
||||||
</div>
|
|
||||||
<div class="w634px h243px">
|
|
||||||
<VChart ref="chartRef2" :option="chartOption2" autoresize />
|
|
||||||
<div class="w634px pl30px h30px">
|
|
||||||
<el-radio-group v-model="radioss" @change="handleChange">
|
|
||||||
<el-radio :label="2020">FY2020</el-radio>
|
|
||||||
<el-radio :label="2021"> FY2021</el-radio>
|
|
||||||
<el-radio :label="2022">FY2022</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="absolute flex flex-col w-full h-full z-200 top-0 left-0 text-center bg-red justify-center items-center"
|
|
||||||
style="background-color: rgba(255, 255, 255, 0.8)"
|
|
||||||
>
|
|
||||||
<img src="@/assets/images/chah.png" />
|
|
||||||
<br />
|
|
||||||
<div class="text-#5683DB text-36px">【做成中,敬请期待】</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -92px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fazhu {
|
|
||||||
td {
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
color: #808696;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.dangnian {
|
|
||||||
td {
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
color: #808696;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.history {
|
|
||||||
td {
|
|
||||||
border: 1px solid #e0e0e0;
|
|
||||||
color: #808696;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
position: absolute;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu li {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fade-enter-active,
|
|
||||||
.fade-leave-active {
|
|
||||||
transition: opacity 0.5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fade-enter,
|
|
||||||
.fade-leave-to {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.q-wrapper {
|
|
||||||
overflow-y: scroll;
|
|
||||||
border-radius: 20px;
|
|
||||||
|
|
||||||
.cd_plan,
|
|
||||||
.amount,
|
|
||||||
.data2 {
|
|
||||||
border: 1px solid #e7ebf5;
|
|
||||||
border-radius: 18px;
|
|
||||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
|
||||||
}
|
|
||||||
|
|
||||||
.data2 {
|
|
||||||
// height: 600.9px;
|
|
||||||
padding: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
width: 8px;
|
|
||||||
height: 30px;
|
|
||||||
background-color: #003ab5;
|
|
||||||
position: absolute;
|
|
||||||
left: -15px;
|
|
||||||
top: -3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,300 +0,0 @@
|
||||||
import { color, type EChartsOption } from 'echarts'
|
|
||||||
|
|
||||||
//数字转千分位
|
|
||||||
export function formatNum(num: any) {
|
|
||||||
const n = String(num.toFixed(0)).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
|
|
||||||
return n
|
|
||||||
}
|
|
||||||
|
|
||||||
export function totalPieCharData(arr: any = [], colorList: any = {}) {
|
|
||||||
// const color: any = []
|
|
||||||
// const data = arr.map((item: any) => {
|
|
||||||
// color.push(colorList[item.moduleCode])
|
|
||||||
// return {
|
|
||||||
// name: item.moduleName,
|
|
||||||
// value: item.visitCount,
|
|
||||||
// _code: item.moduleCode
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
const option: EChartsOption = {
|
|
||||||
tooltip: {
|
|
||||||
// formatter: '{b} : {c}百万 ({d}%)',
|
|
||||||
// formatter: '{b} : {c} ({d}%)',
|
|
||||||
formatter: function (params: any) {
|
|
||||||
return (
|
|
||||||
params.data.name +
|
|
||||||
' : ' +
|
|
||||||
formatNum(params.data.value) +
|
|
||||||
'\n' +
|
|
||||||
'(' +
|
|
||||||
params.percent.toFixed(0) +
|
|
||||||
'%' +
|
|
||||||
')'
|
|
||||||
)
|
|
||||||
},
|
|
||||||
trigger: 'item'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
show: false,
|
|
||||||
// top: '5%',
|
|
||||||
left: 'center',
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
graphic: {
|
|
||||||
type: 'text',
|
|
||||||
left: 'center',
|
|
||||||
top: 'center',
|
|
||||||
style: {
|
|
||||||
text:
|
|
||||||
'总计' + //圆饼中心显示数据,这里是显示得总数
|
|
||||||
'\n',
|
|
||||||
fill: '#fff',
|
|
||||||
fontSize: 14,
|
|
||||||
lineHeight: 20,
|
|
||||||
width: 30,
|
|
||||||
height: 30,
|
|
||||||
textAlign: 'center'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
// name: 'Access',
|
|
||||||
type: 'pie',
|
|
||||||
radius: ['40%', '70%'],
|
|
||||||
avoidLabelOverlap: false,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color: '#fff',
|
|
||||||
fontSize: 12,
|
|
||||||
// formatter: '{b} ({d}%)'
|
|
||||||
formatter: function (params: any) {
|
|
||||||
return params.data.name + ': ' + params.percent.toFixed(0) + '%'
|
|
||||||
}
|
|
||||||
// position: 'center'
|
|
||||||
},
|
|
||||||
// emphasis: {
|
|
||||||
// label: {
|
|
||||||
// show: true,
|
|
||||||
// fontSize: 40,
|
|
||||||
// fontWeight: 'bold',
|
|
||||||
// color: '#fff'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// labelLine: {
|
|
||||||
// show: true
|
|
||||||
// },
|
|
||||||
data: []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
return option
|
|
||||||
}
|
|
||||||
|
|
||||||
export function totalBarCharData(params: any = {}) {
|
|
||||||
const option = {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
// axisPointer: {
|
|
||||||
// type: 'cross',
|
|
||||||
// crossStyle: {
|
|
||||||
// color: '#999'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
// type: 'scroll',
|
|
||||||
data: ['Evaporation', 'Precipitation', 'Temperature'],
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '7%',
|
|
||||||
right: '4%',
|
|
||||||
bottom: '3%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
||||||
data: [],
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
// graphic: {
|
|
||||||
// type: 'text',
|
|
||||||
// left: '0',
|
|
||||||
// top: 'center',
|
|
||||||
// rotation: 90,
|
|
||||||
// style: {
|
|
||||||
// text: '千元',
|
|
||||||
// fill: '#fff',
|
|
||||||
// fontSize: 14,
|
|
||||||
// textAlign: 'center'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '千元',
|
|
||||||
// min: 0,
|
|
||||||
// max: 250,
|
|
||||||
// interval: 50,
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}',
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#fff',
|
|
||||||
align: 'right',
|
|
||||||
padding: [0, 8, 0, 0]
|
|
||||||
},
|
|
||||||
// nameRotate: 90,
|
|
||||||
// nameTruncate: {
|
|
||||||
// maxWidth: 80,
|
|
||||||
// ellipsis: '...'
|
|
||||||
// },
|
|
||||||
// nameLocation: 'left',
|
|
||||||
// nameGap: 50,
|
|
||||||
axisLine: {
|
|
||||||
show: false,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#1f78af',
|
|
||||||
width: 2 //y轴宽度,这里是为了突出显示加上的
|
|
||||||
},
|
|
||||||
onZero: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
// name: 'Temperature',
|
|
||||||
// min: 0,
|
|
||||||
// max: 25,
|
|
||||||
// interval: 5,
|
|
||||||
axisLabel: {
|
|
||||||
formatter: '{value}',
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: []
|
|
||||||
}
|
|
||||||
|
|
||||||
return option
|
|
||||||
}
|
|
||||||
|
|
||||||
export function disBarCharData(params: any = {}) {
|
|
||||||
const option = {
|
|
||||||
minBusSeeds: '',
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
// Use axis to trigger tooltip
|
|
||||||
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
|
|
||||||
}
|
|
||||||
// position: function (pos, params, el, elRect, size) {
|
|
||||||
// const obj: any = {
|
|
||||||
// top: -10
|
|
||||||
// }
|
|
||||||
// obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 30
|
|
||||||
// return obj
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
left: 'center',
|
|
||||||
right: 'center',
|
|
||||||
type: 'scroll',
|
|
||||||
pageIconInactiveColor: '#aaa',
|
|
||||||
pageIconColor: '#fff',
|
|
||||||
selector: [
|
|
||||||
// {
|
|
||||||
// // 全选
|
|
||||||
// type: 'all',
|
|
||||||
// // 可以是任意你喜欢的标题
|
|
||||||
// title: '全选'
|
|
||||||
// }
|
|
||||||
// {
|
|
||||||
// // 反选
|
|
||||||
// type: 'inverse',
|
|
||||||
// // 可以是任意你喜欢的标题
|
|
||||||
// title: '反选'
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
selectorLabel: {
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
color: '#000'
|
|
||||||
},
|
|
||||||
pageTextStyle: {
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
data: [],
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 12,
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '6%',
|
|
||||||
right: '4%',
|
|
||||||
bottom: '3%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
name: '千元',
|
|
||||||
axisLabel: {
|
|
||||||
color: '#fff'
|
|
||||||
},
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#fff',
|
|
||||||
align: 'right',
|
|
||||||
padding: [0, 8, 0, 0]
|
|
||||||
}
|
|
||||||
// nameRotate: 90,
|
|
||||||
// nameTruncate: {
|
|
||||||
// maxWidth: 80,
|
|
||||||
// ellipsis: '...'
|
|
||||||
// },
|
|
||||||
// nameLocation: 'end'
|
|
||||||
// nameGap: 50
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
||||||
data: [],
|
|
||||||
axisLabel: {
|
|
||||||
color: '#fff'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
series: []
|
|
||||||
// series: [
|
|
||||||
// {
|
|
||||||
// name: 'Direct',
|
|
||||||
// type: 'bar',
|
|
||||||
// stack: 'total',
|
|
||||||
// label: {
|
|
||||||
// show: true
|
|
||||||
// },
|
|
||||||
// emphasis: {
|
|
||||||
// focus: 'series'
|
|
||||||
// },
|
|
||||||
// data: [320, 302, 301, 334, 390, 330, 320]
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
}
|
|
||||||
|
|
||||||
return option
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 520 KiB |
|
Before Width: | Height: | Size: 620 KiB |
|
Before Width: | Height: | Size: 123 KiB |
|
Before Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 886 KiB |
|
Before Width: | Height: | Size: 938 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
|
@ -104,17 +104,9 @@ const codePath: any = {
|
||||||
modulePath: '/DataBase'
|
modulePath: '/DataBase'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const toDetail2 = (n: any, flag: boolean = false) => {
|
const toDetail2 = (n: any) => {
|
||||||
console.log(n)
|
console.log(n)
|
||||||
if (n.id === 0) return
|
if (n.id === 0) return
|
||||||
if (flag) {
|
|
||||||
if (n.isSelect === 1) {
|
|
||||||
push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
|
|
||||||
} else {
|
|
||||||
message.info('您没有权限查看!')
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// if (n.isSelect === 1) {
|
// if (n.isSelect === 1) {
|
||||||
if (n.moduleCode === 'App_Database') {
|
if (n.moduleCode === 'App_Database') {
|
||||||
return push('/DataBase?id=' + n.cateId)
|
return push('/DataBase?id=' + n.cateId)
|
||||||
|
|
@ -195,11 +187,11 @@ fetchNewDataList()
|
||||||
<div
|
<div
|
||||||
class="text-black p-20px text-28px w-1/3 transition-all"
|
class="text-black p-20px text-28px w-1/3 transition-all"
|
||||||
:class="[{ 'text-#fff': curTab == 1 }]"
|
:class="[{ 'text-#fff': curTab == 1 }]"
|
||||||
@mouseenter="curTab = 0"
|
@click="curTab = 0"
|
||||||
>
|
>
|
||||||
最近更新
|
最近更新
|
||||||
</div>
|
</div>
|
||||||
<div class="card_title !pt-10px !pl-30px flex-1 !pb-10px" @mouseenter="curTab = 1">
|
<div class="card_title !pt-10px !pl-30px flex-1 !pb-10px" @click="curTab = 1">
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<p
|
<p
|
||||||
class="text-22px cursor-pointer hover:underline transition-all"
|
class="text-22px cursor-pointer hover:underline transition-all"
|
||||||
|
|
@ -385,7 +377,7 @@ fetchNewDataList()
|
||||||
<div class="mt-10px">
|
<div class="mt-10px">
|
||||||
<div class="text-#142142 truncate text-16px">
|
<div class="text-#142142 truncate text-16px">
|
||||||
<a
|
<a
|
||||||
@click="toDetail2(i, true)"
|
@click="toDetail2(i)"
|
||||||
:href="i.url"
|
:href="i.url"
|
||||||
class="no-underline text-#142142 cursor-pointer hover:underline"
|
class="no-underline text-#142142 cursor-pointer hover:underline"
|
||||||
>{{ i.title }}</a
|
>{{ i.title }}</a
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,7 @@ const store = useUserStore()
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const Navs = [
|
const Navs = [
|
||||||
{ name: '集团*部门方针' },
|
{ name: '集团*部门方针' },
|
||||||
{ name: '年度活动日程表' },
|
{ name: '年度活动日程表' },
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,7 @@ import ModifyB from './modifyB.vue'
|
||||||
import { message } from '@/utils/message';
|
import { message } from '@/utils/message';
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin','csr_dandang','tech_service'].some((item) =>
|
const userCode = ['admin','csr_dandang','tech_service'].includes(store.user.roleCode)
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
|
|
||||||
const { chartRef, option } = charData()
|
const { chartRef, option } = charData()
|
||||||
const { chartRef: chartRefP1, option: optionP1 } = pieData1()
|
const { chartRef: chartRefP1, option: optionP1 } = pieData1()
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ const store = useUserStore()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
const swipeRef = ref<any>(null)
|
const swipeRef = ref<any>(null)
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
|
|
@ -85,7 +85,9 @@ const openUrl = async (url) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(url)
|
srcType.value = getLastSubstring(url)
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
if (
|
||||||
|
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||||
|
) {
|
||||||
// src.value = filePath
|
// src.value = filePath
|
||||||
// pdfShow.value = true
|
// pdfShow.value = true
|
||||||
url = 'https://view.xdocin.com/view?src=' + url
|
url = 'https://view.xdocin.com/view?src=' + url
|
||||||
|
|
@ -94,10 +96,19 @@ const openUrl = async (url) => {
|
||||||
window.open(
|
window.open(
|
||||||
url,
|
url,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
|
|
@ -115,7 +126,9 @@ const toDetail = (obj) => {
|
||||||
message.info('没有访问权限')
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
obj.filePath?.[0]?.url ? openUrl(obj.filePath[0].url) : message.info('没有可预览文件!')
|
obj.filePath?.[0]?.url
|
||||||
|
? openUrl(obj.filePath[0].url)
|
||||||
|
: message.info('没有可预览文件!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function down(data: {
|
async function down(data: {
|
||||||
|
|
@ -172,7 +185,8 @@ const handleVisitsScoll = () => {
|
||||||
// if(pageNum >= 1) return
|
// if(pageNum >= 1) return
|
||||||
const container = msgScoll.value
|
const container = msgScoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
const isAtBottom =
|
||||||
|
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (pageNum < maxMsgLingth) {
|
if (pageNum < maxMsgLingth) {
|
||||||
++pageNum
|
++pageNum
|
||||||
|
|
@ -204,7 +218,9 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
>
|
>
|
||||||
PLUS活动相关
|
PLUS活动相关
|
||||||
</div>
|
</div>
|
||||||
<el-button v-if="userCode" type="primary" class="button" @click="shomks">管理</el-button>
|
<el-button v-if="userCode" type="primary" class="button" @click="shomks"
|
||||||
|
>管理</el-button
|
||||||
|
>
|
||||||
<div class="text-#142142 text-20px font-extrabold flex p20px">
|
<div class="text-#142142 text-20px font-extrabold flex p20px">
|
||||||
<!-- <div class=""></div> -->
|
<!-- <div class=""></div> -->
|
||||||
<div class="w-70% text-24px font-bold p20px pb-0px">
|
<div class="w-70% text-24px font-bold p20px pb-0px">
|
||||||
|
|
@ -217,7 +233,10 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
@click="push({ name: 'modifyCsrList' })"
|
@click="push({ name: 'modifyCsrList' })"
|
||||||
class="w-145px px15px text-#fff !rd-22px !bg-gradient-to-r !from-#34a6d9/90 !to-#23d1c6/70 p10px"
|
class="w-145px px15px text-#fff !rd-22px !bg-gradient-to-r !from-#34a6d9/90 !to-#23d1c6/70 p10px"
|
||||||
>
|
>
|
||||||
查看更多<img src="../../../assets/images/ckgduo@2x.png" class="w25px ml-10px mt--5px" />
|
查看更多<img
|
||||||
|
src="../../../assets/images/ckgduo@2x.png"
|
||||||
|
class="w25px ml-10px mt--5px"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -323,10 +342,16 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
>
|
>
|
||||||
<div class="max-w500px text-16px flex flex-col">
|
<div class="max-w500px text-16px flex flex-col">
|
||||||
<div class="flex items-center max-w-[84%]">
|
<div class="flex items-center max-w-[84%]">
|
||||||
<img src="../../../assets/images/lvbiao@2x.png" class="mr-5px" />
|
<img
|
||||||
|
src="../../../assets/images/lvbiao@2x.png"
|
||||||
|
class="mr-5px"
|
||||||
|
/>
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<span class="truncate text-18px !min-w-[auto]" @click="toDetail(i)">
|
<span
|
||||||
|
class="truncate text-18px !min-w-[auto]"
|
||||||
|
@click="toDetail(i)"
|
||||||
|
>
|
||||||
{{ i.filePath[0]?.originalFileName }}
|
{{ i.filePath[0]?.originalFileName }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -340,7 +365,11 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
title="查看更多"
|
title="查看更多"
|
||||||
@click="toDetail(i)"
|
@click="toDetail(i)"
|
||||||
class="absolute cursor-pointer right--14px top-0px w60px pt-3px flex items-center ml-auto text-right"
|
class="absolute cursor-pointer right--14px top-0px w60px pt-3px flex items-center ml-auto text-right"
|
||||||
style="color: #4d7ee8; text-align: center; font-size: 16px"
|
style="
|
||||||
|
color: #4d7ee8;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
更多<el-icon>
|
更多<el-icon>
|
||||||
<DArrowRight class="" />
|
<DArrowRight class="" />
|
||||||
|
|
@ -392,7 +421,12 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div> -->
|
</div> -->
|
||||||
<span
|
<span
|
||||||
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
|
style="
|
||||||
|
border: #417bef 1px solid;
|
||||||
|
color: #417bef;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 30px;
|
||||||
|
"
|
||||||
class="absolute right-25px top-16px w80px h50px flex justify-center items-center cursor-pointer"
|
class="absolute right-25px top-16px w80px h50px flex justify-center items-center cursor-pointer"
|
||||||
@click="push({ name: 'CSRList' })"
|
@click="push({ name: 'CSRList' })"
|
||||||
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
||||||
|
|
@ -402,7 +436,13 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
ref="msgScoll"
|
ref="msgScoll"
|
||||||
class="px20px h280px cent_box overflow-y-scroll"
|
class="px20px h280px cent_box overflow-y-scroll"
|
||||||
> -->
|
> -->
|
||||||
<el-scrollbar class="px20px" ref="" height="280px" always @scroll="scroll">
|
<el-scrollbar
|
||||||
|
class="px20px"
|
||||||
|
ref=""
|
||||||
|
height="280px"
|
||||||
|
always
|
||||||
|
@scroll="scroll"
|
||||||
|
>
|
||||||
<!-- <div class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px" v-for="(i, key) in dataList" :key="i"> -->
|
<!-- <div class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px" v-for="(i, key) in dataList" :key="i"> -->
|
||||||
<div
|
<div
|
||||||
class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px"
|
class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px"
|
||||||
|
|
@ -410,9 +450,10 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
:key="i"
|
:key="i"
|
||||||
>
|
>
|
||||||
<div class="truncate2 flex items-center" @click="toDetail(i)">
|
<div class="truncate2 flex items-center" @click="toDetail(i)">
|
||||||
<span class="text-#fff bg-#407DF1 px5px text-18px rounded-20px mr-5px inlineFlex">{{
|
<span
|
||||||
++key
|
class="text-#fff bg-#407DF1 px5px text-18px rounded-20px mr-5px inlineFlex"
|
||||||
}}</span>
|
>{{ ++key }}</span
|
||||||
|
>
|
||||||
<span class="text-18px mr-2">{{ i.title }}</span>
|
<span class="text-18px mr-2">{{ i.title }}</span>
|
||||||
<img
|
<img
|
||||||
v-if="isNotOneWeekAgo(i.createTime)"
|
v-if="isNotOneWeekAgo(i.createTime)"
|
||||||
|
|
@ -421,7 +462,9 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="absolute right-10px top-24px text-18px">{{ i.createTime }}</span>
|
<span class="absolute right-10px top-24px text-18px">{{
|
||||||
|
i.createTime
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const query = ref<any>({
|
||||||
})
|
})
|
||||||
const year = new Date().getFullYear()
|
const year = new Date().getFullYear()
|
||||||
const month = new Date().getMonth()
|
const month = new Date().getMonth()
|
||||||
const jpMonth = (month < 4 ? year - 1 : year) + ''
|
const jpMonth = (month < 3 ? year - 1 : year) + ''
|
||||||
query.value.year = jpMonth
|
query.value.year = jpMonth
|
||||||
const calendar = [4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3]
|
const calendar = [4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3]
|
||||||
const calendarShow = new Date().getMonth() + 1
|
const calendarShow = new Date().getMonth() + 1
|
||||||
|
|
@ -43,11 +43,8 @@ const getCsrSupplier = () => {
|
||||||
try {
|
try {
|
||||||
csrSupplier.value = resData.length
|
csrSupplier.value = resData.length
|
||||||
? resData.map((key) => {
|
? resData.map((key) => {
|
||||||
const arr = String(key).split('-')
|
const obj = data[key] || {}
|
||||||
const month = arr?.[1] || ''
|
const month = String(key).split('-')?.[1] || ''
|
||||||
// const year = arr?.[0] || ''
|
|
||||||
const obj =
|
|
||||||
data[+month < 4 ? +req.year + 1 + '-' + month : req.year + '-' + month] || {}
|
|
||||||
Object.assign(csrSupplierObj.value[month], obj)
|
Object.assign(csrSupplierObj.value[month], obj)
|
||||||
return {
|
return {
|
||||||
key,
|
key,
|
||||||
|
|
@ -69,26 +66,20 @@ const getCsrSupplier = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const csrSupplierList = ref<any>([])
|
const csrSupplierList = ref<any>([])
|
||||||
// const selMonth = ref((new Date().getMonth() + 1).toString())
|
|
||||||
const selMonth = ref('')
|
const selMonth = ref('')
|
||||||
const getCsrSupplierList = (index?: any) => {
|
const getCsrSupplierList = (index?: any) => {
|
||||||
const _m = +months[index]
|
const month = index || index === 0 ? query.value.year + '-' + months[index] : ''
|
||||||
const month =
|
|
||||||
index || index === 0
|
|
||||||
? (_m < 4 ? +query.value.year + 1 : query.value.year) + '-' + months[index]
|
|
||||||
: ''
|
|
||||||
csrSupplierList.value = []
|
csrSupplierList.value = []
|
||||||
selMonth.value = ''
|
selMonth.value = ''
|
||||||
const req = { pageNum: 1, pageSize: 10, ...query.value, month }
|
const req = { pageNum: 1, pageSize: 10, ...query.value, month }
|
||||||
req.year = _m < 4 ? +req.year + 1 : req.year
|
|
||||||
req.supplierName
|
req.supplierName
|
||||||
? fetchCsrSupplierList(req).then((res: any) => {
|
? fetchCsrSupplierList(req).then((res: any) => {
|
||||||
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
|
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
|
||||||
})
|
})
|
||||||
: fetchCsrSupplierTopList({ ...req }).then((res: any) => {
|
: fetchCsrSupplierTopList(req).then((res: any) => {
|
||||||
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
|
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
|
||||||
})
|
})
|
||||||
selMonth.value = month ? months[index] : ''
|
selMonth.value = month ? +months[index] + '月' : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const getCsrSupplierTaskInfo = () => {
|
const getCsrSupplierTaskInfo = () => {
|
||||||
|
|
@ -182,17 +173,19 @@ getCsrSupplierTaskInfo()
|
||||||
<el-col :span="8" v-for="(it, i) in months" :key="i">
|
<el-col :span="8" v-for="(it, i) in months" :key="i">
|
||||||
<div
|
<div
|
||||||
v-show="!loading"
|
v-show="!loading"
|
||||||
:class="csrSupplierObj[it]?.submitedCount !== undefined ? 'times' : 'time'"
|
:class="i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'"
|
||||||
@click="handleMonth(i)"
|
@click="handleMonth(i)"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="csrSupplierObj[it]?.submitedCount === undefined"
|
v-if="i > nowIndexMonth || query.year != jpMonth"
|
||||||
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
||||||
>
|
>
|
||||||
<span class="text-60px">{{ +it }}</span
|
<span class="text-60px">{{ +it }}</span
|
||||||
>月
|
>月
|
||||||
</div>
|
</div>
|
||||||
<template v-if="csrSupplierObj[it]?.submitedCount !== undefined">
|
<template
|
||||||
|
v-if="i <= nowIndexMonth && (query.year == jpMonth || !!csrSupplierObj[it])"
|
||||||
|
>
|
||||||
<div class="text-#fff text-18px font-bold absolute left-40% top-24px">
|
<div class="text-#fff text-18px font-bold absolute left-40% top-24px">
|
||||||
<span class="text-24px">{{ +it }}</span
|
<span class="text-24px">{{ +it }}</span
|
||||||
>月
|
>月
|
||||||
|
|
@ -332,11 +325,7 @@ getCsrSupplierTaskInfo()
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<div class="cards_title relative">
|
<div class="cards_title relative">未提交供应商明细({{ query.year }}年{{ selMonth }})</div>
|
||||||
未提交供应商明细({{ selMonth && +selMonth < 4 ? +query.year + 1 : query.year }}年{{
|
|
||||||
selMonth
|
|
||||||
}}{{ selMonth ? '月' : '' }})
|
|
||||||
</div>
|
|
||||||
<div class="absolute top-24px !text-18px right-20px pt30px text-#4E7EE8">
|
<div class="absolute top-24px !text-18px right-20px pt30px text-#4E7EE8">
|
||||||
<span class="text-#ababab">更新时间:{{ updateTime }}</span>
|
<span class="text-#ababab">更新时间:{{ updateTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
<el-icon class="text-red"><ArrowLeftBold size="18" /></el-icon> 返回
|
<el-icon class="text-red"><ArrowLeftBold size="18" /></el-icon> 返回
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-tab-pane label="banner管理" name="first">
|
<el-tab-pane label="banner管理" name="first">
|
||||||
<el-button type="primary" @click="editClickA('add')" class="mb-20px"> 新增 </el-button>
|
<el-button type="primary" @click="editClickA('add')" class="mb-20px">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
class="button mt--20px"
|
class="button mt--20px"
|
||||||
|
|
@ -70,11 +72,19 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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
|
||||||
|
type="primary"
|
||||||
|
@click="editClickA('edit', scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
编辑</el-button
|
编辑</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button type="danger" @click="deleteClickA(scope.row)" class="mb-20px">
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickA(scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
删除</el-button
|
删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -83,7 +93,9 @@
|
||||||
</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 type="primary" @click="editClickB('add')" class="mb-20px">
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
class="button mt--20px"
|
class="button mt--20px"
|
||||||
|
|
@ -118,7 +130,11 @@
|
||||||
|
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column prop="title" label="标题" align="center" />
|
<el-table-column prop="title" label="标题" align="center" />
|
||||||
<el-table-column prop="createTime" label="上传时间" align="center" />
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="上传时间"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
<el-table-column prop="filePath" label="文件列表" align="center">
|
<el-table-column prop="filePath" label="文件列表" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.filePath" v-for="i in scope.row.filePath"
|
<span v-if="scope.row.filePath" v-for="i in scope.row.filePath"
|
||||||
|
|
@ -128,11 +144,19 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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="editClickB('edit', scope.row)" class="mb-20px">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="editClickB('edit', scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
编辑</el-button
|
编辑</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button type="danger" @click="deleteClickB(scope.row)" class="mb-20px">
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickB(scope.row)"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
删除</el-button
|
删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -185,14 +209,20 @@
|
||||||
</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>
|
||||||
|
|
||||||
<NModal v-model:show="dialogVisible" :z-index="999999">
|
<NModal v-model:show="dialogVisible" :z-index="999999">
|
||||||
<img class="object-contain max-w-65%" :src="dialogImageUrl" alt="选择图片" />
|
<img
|
||||||
|
class="object-contain max-w-65%"
|
||||||
|
:src="dialogImageUrl"
|
||||||
|
alt="选择图片"
|
||||||
|
/>
|
||||||
</NModal>
|
</NModal>
|
||||||
|
|
||||||
<NModal v-model:show="shomkB">
|
<NModal v-model:show="shomkB">
|
||||||
|
|
@ -216,49 +246,21 @@
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editB.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editB.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editB.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -274,7 +276,6 @@ import {
|
||||||
} from '@/api/daikin/base'
|
} from '@/api/daikin/base'
|
||||||
import { NModal, useMessage, NSelect } from 'naive-ui'
|
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 { pickerOptions } from '@/utils/date'
|
|
||||||
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
@ -525,7 +526,7 @@ const deleteClickB = async (row: any) => {
|
||||||
async function addClickB(row: any) {
|
async function addClickB(row: any) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if (!row) return
|
if (!row) return
|
||||||
const { id, moduleId, title, fileList, imgFile, isPublish, publishTime, isTop } = row
|
const { id, moduleId, title, fileList, imgFile } = row
|
||||||
let filePath: any[] = []
|
let filePath: any[] = []
|
||||||
let url: any[] = []
|
let url: any[] = []
|
||||||
if (fileList && fileList.length > 0) {
|
if (fileList && fileList.length > 0) {
|
||||||
|
|
@ -547,10 +548,7 @@ async function addClickB(row: any) {
|
||||||
id,
|
id,
|
||||||
moduleId,
|
moduleId,
|
||||||
title,
|
title,
|
||||||
filePath,
|
filePath
|
||||||
isPublish,
|
|
||||||
publishTime,
|
|
||||||
isTop
|
|
||||||
})
|
})
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('新增成功')
|
message.success('新增成功')
|
||||||
|
|
@ -560,10 +558,7 @@ async function addClickB(row: any) {
|
||||||
id,
|
id,
|
||||||
moduleId,
|
moduleId,
|
||||||
title,
|
title,
|
||||||
filePath,
|
filePath
|
||||||
isPublish,
|
|
||||||
publishTime,
|
|
||||||
isTop
|
|
||||||
})
|
})
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
|
|
@ -584,7 +579,10 @@ const handleChange = (e: string | any[]) => {
|
||||||
}
|
}
|
||||||
// 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'] = (
|
||||||
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
message.warning('最多只能上传5张图片!')
|
message.warning('最多只能上传5张图片!')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ const listData = ref<any>([])
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const activeName = ref(1)
|
const activeName = ref(1)
|
||||||
const flg = ref(false)
|
const flg = ref(false)
|
||||||
const userCode = ['admin', 'database_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'database_dandang', 'tech_service'].includes(
|
||||||
store2.user.roleCode?.includes(item)
|
store2.user.roleCode
|
||||||
)
|
)
|
||||||
const isDbReview = computed(() => !!user?.isDbReview)
|
const isDbReview = computed(() => !!user?.isDbReview)
|
||||||
const isDbUpload = computed(() => !!user?.isDbUpload)
|
const isDbUpload = computed(() => !!user?.isDbUpload)
|
||||||
|
|
@ -60,7 +60,9 @@ const handleDialogConfirm = async () => {
|
||||||
}
|
}
|
||||||
const handleCommand = (command: number, row: any) => {
|
const handleCommand = (command: number, row: any) => {
|
||||||
selCommand.value = command
|
selCommand.value = command
|
||||||
dialogText.value = `确认${command === 2 ? '通过' : '驳回'}标题为 ${row.title} 的文件发布吗?`
|
dialogText.value = `确认${command === 2 ? '通过' : '驳回'}标题为 ${
|
||||||
|
row.title
|
||||||
|
} 的文件发布吗?`
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
selItemId.value = row.id
|
selItemId.value = row.id
|
||||||
}
|
}
|
||||||
|
|
@ -201,10 +203,19 @@ const openUrl = async (it: any) => {
|
||||||
window.open(
|
window.open(
|
||||||
filePath,
|
filePath,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
|
|
@ -422,13 +433,25 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
hasChildren: 'hasChildren'
|
hasChildren: 'hasChildren'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
prop="cateName"
|
||||||
|
label="所属分类"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</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 prop="parentDeptName" label="上传部门" />
|
<el-table-column prop="parentDeptName" label="上传部门" />
|
||||||
<el-table-column prop="createTime" label="上传日期" />
|
<el-table-column prop="createTime" 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">
|
<el-table-column label="查看范围" prop="userIdList">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -444,7 +467,9 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
<div class="descStyle max-w-60vw !h-46px">
|
<div class="descStyle max-w-60vw !h-46px">
|
||||||
<p
|
<p
|
||||||
v-for="(it, e) in scope.row.userList"
|
v-for="(it, e) in scope.row.userList"
|
||||||
:class="scope.row.userList.length < 2 ? '!leading-46px' : ''"
|
:class="
|
||||||
|
scope.row.userList.length < 2 ? '!leading-46px' : ''
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ it.nickName }}
|
{{ it.nickName }}
|
||||||
<span v-if="e == 1 && scope.row.userList.length > 2"
|
<span v-if="e == 1 && scope.row.userList.length > 2"
|
||||||
|
|
@ -468,11 +493,21 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
v-if="(row.fileCommon?.fileSize || 0) > 25 * 1024 * 1024"
|
v-if="(row.fileCommon?.fileSize || 0) > 25 * 1024 * 1024"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button style="color: #000" @click="downloads(row)">查看</el-button>
|
<el-button style="color: #000" @click="downloads(row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
<span>该文件超过25MB,无法进行预览,请点击 查看 进行下载!</span>
|
<span
|
||||||
|
>该文件超过25MB,无法进行预览,请点击 查看
|
||||||
|
进行下载!</span
|
||||||
|
>
|
||||||
</n-popover>
|
</n-popover>
|
||||||
<el-button v-else style="color: #000" @click="downloads(row)">查看</el-button>
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="color: #000"
|
||||||
|
@click="downloads(row)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
v-if="activeName === 1 && isDbReview"
|
v-if="activeName === 1 && isDbReview"
|
||||||
|
|
@ -489,8 +524,13 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
</el-button>
|
</el-button>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item :command="2" :icon="Check">同意</el-dropdown-item>
|
<el-dropdown-item :command="2" :icon="Check"
|
||||||
<el-dropdown-item :command="3" :icon="Close" type="danger"
|
>同意</el-dropdown-item
|
||||||
|
>
|
||||||
|
<el-dropdown-item
|
||||||
|
:command="3"
|
||||||
|
:icon="Close"
|
||||||
|
type="danger"
|
||||||
>驳回</el-dropdown-item
|
>驳回</el-dropdown-item
|
||||||
>
|
>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
|
@ -504,10 +544,17 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
>
|
>
|
||||||
编辑</el-button
|
编辑</el-button
|
||||||
>
|
>
|
||||||
<template v-if="(activeName === 1 || activeName === 3) && isDbUpload">
|
<template
|
||||||
<el-popconfirm title="确认撤回该文件?" @confirm="handleWithdraw(row)">
|
v-if="(activeName === 1 || activeName === 3) && isDbUpload"
|
||||||
|
>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确认撤回该文件?"
|
||||||
|
@confirm="handleWithdraw(row)"
|
||||||
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button class="ml-16px" type="danger"> 撤回</el-button>
|
<el-button class="ml-16px" type="danger">
|
||||||
|
撤回</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -559,20 +606,30 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="i.firstReviewName">
|
<el-dropdown-item v-if="i.firstReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
<span class="min-w120px"
|
||||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
>初审人:{{ i.firstReviewName }}</span
|
||||||
|
>
|
||||||
|
<span class="ml20px"
|
||||||
|
>初审时间:{{ i.firstReviewTime }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
<span class="min-w120px"
|
||||||
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
>终审人:{{ i.ultimateReviewName }}</span
|
||||||
|
>
|
||||||
|
<span class="ml20px"
|
||||||
|
>终审时间:{{ i.ultimateReviewTime }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
||||||
|
i.createTime
|
||||||
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-if="store2.user.isReview > 0 && i.publishName"
|
v-if="store2.user.isReview > 0 && i.publishName"
|
||||||
class="ml20px text-#808696 text-16px flex-1"
|
class="ml20px text-#808696 text-16px flex-1"
|
||||||
|
|
@ -585,7 +642,11 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
<NModal v-model:show="shomk" :z-index="99999">
|
<NModal v-model:show="shomk" :z-index="99999">
|
||||||
<div class="bg-#FFF p30px">
|
<div class="bg-#FFF p30px">
|
||||||
|
|
@ -634,19 +695,34 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<el-button type="primary" @click="handleEditClick" class="mb-20px"> 确认</el-button>
|
<el-button type="primary" @click="handleEditClick" class="mb-20px">
|
||||||
|
确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</NModal>
|
</NModal>
|
||||||
<el-dialog v-model="dialogVisible" title="提示" width="30%" top="40vh" center>
|
<el-dialog
|
||||||
|
v-model="dialogVisible"
|
||||||
|
title="提示"
|
||||||
|
width="30%"
|
||||||
|
top="40vh"
|
||||||
|
center
|
||||||
|
>
|
||||||
<span class="text-18px">
|
<span class="text-18px">
|
||||||
{{ dialogText }}
|
{{ dialogText }}
|
||||||
</span>
|
</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button size="large" @click="dialogVisible = false">取消</el-button>
|
<el-button size="large" @click="dialogVisible = false"
|
||||||
<el-button class="!ml-50px" size="large" type="primary" @click="handleDialogConfirm">
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="!ml-50px"
|
||||||
|
size="large"
|
||||||
|
type="primary"
|
||||||
|
@click="handleDialogConfirm"
|
||||||
|
>
|
||||||
确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import { isNotOneWeekAgo } from '@/utils'
|
||||||
|
|
||||||
const store: any = useUserStore()
|
const store: any = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = ['admin', 'database_dandang'].some((item) => store.user.roleCode?.includes(item))
|
const userCode = ['admin', 'database_dandang'].includes(store.user.roleCode)
|
||||||
const isDbReview = store.user?.isDbReview === 1
|
const isDbReview = store.user?.isDbReview === 1
|
||||||
const isDbUpload = store.user?.isDbUpload === 1
|
const isDbUpload = store.user?.isDbUpload === 1
|
||||||
const user: any = store.user
|
const user: any = store.user
|
||||||
|
|
@ -132,7 +132,9 @@ const openUrl = async (it) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(filePath)
|
srcType.value = getLastSubstring(filePath)
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
if (
|
||||||
|
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||||
|
) {
|
||||||
// src.value = filePath
|
// src.value = filePath
|
||||||
// pdfShow.value = true
|
// pdfShow.value = true
|
||||||
filePath = 'https://view.xdocin.com/view?src=' + filePath
|
filePath = 'https://view.xdocin.com/view?src=' + filePath
|
||||||
|
|
@ -141,10 +143,19 @@ const openUrl = async (it) => {
|
||||||
window.open(
|
window.open(
|
||||||
filePath,
|
filePath,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
|
|
@ -222,9 +233,17 @@ async function getAuth() {
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="bg-#fff rd-15px px30px pt30px w-full h930px">
|
<div class="bg-#fff rd-15px px30px pt30px w-full h930px">
|
||||||
<div class="rd-15px w-full h870px" style="box-shadow: 1px 2px 26px -3px #cdcccc">
|
<div
|
||||||
<div class="h80px rd-t-15px bg-#4877FB leading-80px text-#fff text-20px">
|
class="rd-15px w-full h870px"
|
||||||
<img src="@/assets/images/Shape7@2x.png" class="w50px ml-30px mr10px mt--20px" />
|
style="box-shadow: 1px 2px 26px -3px #cdcccc"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="h80px rd-t-15px bg-#4877FB leading-80px text-#fff text-20px"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="@/assets/images/Shape7@2x.png"
|
||||||
|
class="w50px ml-30px mr10px mt--20px"
|
||||||
|
/>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
<div class="float-right top-0 right-30px">
|
<div class="float-right top-0 right-30px">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -258,16 +277,28 @@ async function getAuth() {
|
||||||
>
|
>
|
||||||
<tr class="text-20px leading-50px">
|
<tr class="text-20px leading-50px">
|
||||||
<th width="20%">
|
<th width="20%">
|
||||||
<img src="@/assets/images/baiot@2x.png" class="w35px mt--7px mr-5px" />标题
|
<img
|
||||||
|
src="@/assets/images/baiot@2x.png"
|
||||||
|
class="w35px mt--7px mr-5px"
|
||||||
|
/>标题
|
||||||
</th>
|
</th>
|
||||||
<th width="20%">
|
<th width="20%">
|
||||||
<img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传科室
|
<img
|
||||||
|
src="@/assets/images/scbmm@2x.png"
|
||||||
|
class="w35px mt--7px mr-5px"
|
||||||
|
/>上传科室
|
||||||
</th>
|
</th>
|
||||||
<th width="20%">
|
<th width="20%">
|
||||||
<img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传部门
|
<img
|
||||||
|
src="@/assets/images/scbmm@2x.png"
|
||||||
|
class="w35px mt--7px mr-5px"
|
||||||
|
/>上传部门
|
||||||
</th>
|
</th>
|
||||||
<th width="20%">
|
<th width="20%">
|
||||||
<img src="@/assets/images/riqii@2x.png" class="w35px mt--7px mr-5px" />上传日期
|
<img
|
||||||
|
src="@/assets/images/riqii@2x.png"
|
||||||
|
class="w35px mt--7px mr-5px"
|
||||||
|
/>上传日期
|
||||||
</th>
|
</th>
|
||||||
<th width="20% text-center">操作</th>
|
<th width="20% text-center">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -296,14 +327,24 @@ async function getAuth() {
|
||||||
<n-popover
|
<n-popover
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
v-if="arr.includes(it.id) || (it.fileCommon?.fileSize || 0) > 25 * 1024 * 1024"
|
v-if="
|
||||||
|
arr.includes(it.id) ||
|
||||||
|
(it.fileCommon?.fileSize || 0) > 25 * 1024 * 1024
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button style="color: #000" @click="downloads(it)">查看</el-button>
|
<el-button style="color: #000" @click="downloads(it)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
<span>该文件超过25MB,无法进行预览,请点击 查看 进行下载!</span>
|
<span
|
||||||
|
>该文件超过25MB,无法进行预览,请点击 查看
|
||||||
|
进行下载!</span
|
||||||
|
>
|
||||||
</n-popover>
|
</n-popover>
|
||||||
<el-button v-else style="color: #000" @click="downloads(it)">查看</el-button>
|
<el-button v-else style="color: #000" @click="downloads(it)"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -324,7 +365,11 @@ async function getAuth() {
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="pdfShow">
|
<n-modal v-model:show="pdfShow">
|
||||||
<div class="w100% h100%">
|
<div class="w100% h100%">
|
||||||
<el-icon color="#fff" size="26px" @click="pdfShow = false" class="absolute left-92% bg-#F43"
|
<el-icon
|
||||||
|
color="#fff"
|
||||||
|
size="26px"
|
||||||
|
@click="pdfShow = false"
|
||||||
|
class="absolute left-92% bg-#F43"
|
||||||
><Close
|
><Close
|
||||||
/></el-icon>
|
/></el-icon>
|
||||||
<Amtion :data="src" :datas="srcType" />
|
<Amtion :data="src" :datas="srcType" />
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,12 @@
|
||||||
</div>
|
</div>
|
||||||
<el-tab-pane v-if="userCode" label="分类管理" name="first">
|
<el-tab-pane v-if="userCode" label="分类管理" name="first">
|
||||||
<div class="h-52px">
|
<div class="h-52px">
|
||||||
<el-button v-if="userCode" type="primary" @click="editClickA('add')" class="mb-20px">
|
<el-button
|
||||||
|
v-if="userCode"
|
||||||
|
type="primary"
|
||||||
|
@click="editClickA('add')"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -51,20 +56,36 @@
|
||||||
<!-- <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="my-10px">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="editClickA('edit', scope.row)"
|
||||||
|
class="my-10px"
|
||||||
|
>
|
||||||
编辑</el-button
|
编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
v-if="scope.row.level === 1 || scope.row.level === 2 || scope.row.level === 3"
|
v-if="
|
||||||
|
scope.row.level === 1 ||
|
||||||
|
scope.row.level === 2 ||
|
||||||
|
scope.row.level === 3
|
||||||
|
"
|
||||||
@click="editClickA('add', scope.row)"
|
@click="editClickA('add', scope.row)"
|
||||||
class="my-10px"
|
class="my-10px"
|
||||||
>
|
>
|
||||||
新增{{
|
新增{{
|
||||||
scope.row.level === 1 ? '二' : scope.row.level === 2 ? '三' : '四'
|
scope.row.level === 1
|
||||||
|
? '二'
|
||||||
|
: scope.row.level === 2
|
||||||
|
? '三'
|
||||||
|
: '四'
|
||||||
}}级</el-button
|
}}级</el-button
|
||||||
>
|
>
|
||||||
<el-button type="danger" @click="deleteClickA(scope.row)" class="my-10px">
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickA(scope.row)"
|
||||||
|
class="my-10px"
|
||||||
|
>
|
||||||
删除</el-button
|
删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -82,7 +103,12 @@
|
||||||
>
|
>
|
||||||
新增</el-button
|
新增</el-button
|
||||||
>
|
>
|
||||||
<el-button v-if="userCode" type="primary" @click="getAll" class="mb-20px">
|
<el-button
|
||||||
|
v-if="userCode"
|
||||||
|
type="primary"
|
||||||
|
@click="getAll"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
查看所有</el-button
|
查看所有</el-button
|
||||||
>
|
>
|
||||||
<template v-if="false">
|
<template v-if="false">
|
||||||
|
|
@ -129,14 +155,26 @@
|
||||||
hasChildren: 'hasChildren'
|
hasChildren: 'hasChildren'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
<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">
|
<el-table-column label="查看范围" prop="userIdList">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -145,12 +183,19 @@
|
||||||
<!-- <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> -->
|
||||||
<p v-if="scope.row.userList.length">
|
<p v-if="scope.row.userList.length">
|
||||||
<el-tooltip :content="handTooltip(scope.row.userList)" placement="top">
|
<el-tooltip
|
||||||
|
:content="handTooltip(scope.row.userList)"
|
||||||
|
placement="top"
|
||||||
|
>
|
||||||
<div class="!h-50px descStyle">
|
<div class="!h-50px descStyle">
|
||||||
<div class="descStyle max-w-60vw !h-46px">
|
<div class="descStyle max-w-60vw !h-46px">
|
||||||
<p
|
<p
|
||||||
v-for="(it, e) in scope.row.userList"
|
v-for="(it, e) in scope.row.userList"
|
||||||
:class="scope.row.userList.length < 2 ? '!leading-46px' : 'xx'"
|
:class="
|
||||||
|
scope.row.userList.length < 2
|
||||||
|
? '!leading-46px'
|
||||||
|
: 'xx'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ it.nickName || undefined }}
|
{{ it.nickName || undefined }}
|
||||||
<span v-if="e == 1 && scope.row.userList.length > 2"
|
<span v-if="e == 1 && scope.row.userList.length > 2"
|
||||||
|
|
@ -164,7 +209,11 @@
|
||||||
<span v-else></span>
|
<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 v-if="userCode || hasUpload || hasReview">
|
<div v-if="userCode || hasUpload || hasReview">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -174,12 +223,19 @@
|
||||||
>
|
>
|
||||||
编辑</el-button
|
编辑</el-button
|
||||||
>
|
>
|
||||||
<el-button type="danger" @click="deleteClickB(scope.row)" class="w45px my-10px">
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click="deleteClickB(scope.row)"
|
||||||
|
class="w45px my-10px"
|
||||||
|
>
|
||||||
删除</el-button
|
删除</el-button
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style="float: right; margin: 10px 0"
|
style="float: right; margin: 10px 0"
|
||||||
v-if="scope.$index !== 0 && scope.$index !== infoData.length - 1"
|
v-if="
|
||||||
|
scope.$index !== 0 &&
|
||||||
|
scope.$index !== infoData.length - 1
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
style="color: #000; width: 45px; height: 33px"
|
style="color: #000; width: 45px; height: 33px"
|
||||||
|
|
@ -200,7 +256,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="float-right absolute bottom-0px right-30px z-2000 bg-#fff">
|
<div
|
||||||
|
class="float-right absolute bottom-0px right-30px z-2000 bg-#fff"
|
||||||
|
>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="pageInfo.currentPage"
|
v-model:current-page="pageInfo.currentPage"
|
||||||
v-model:page-size="pageInfo.pageSize"
|
v-model:page-size="pageInfo.pageSize"
|
||||||
|
|
@ -213,7 +271,11 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="权限管理" name="three" v-if="userCode">
|
<el-tab-pane label="权限管理" name="three" v-if="userCode">
|
||||||
<div class="h-52px">
|
<div class="h-52px">
|
||||||
<el-button type="primary" @click="handleAuthClick('add')" class="mb-20px">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleAuthClick('add')"
|
||||||
|
class="mb-20px"
|
||||||
|
>
|
||||||
新增审批关系</el-button
|
新增审批关系</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -236,12 +298,27 @@
|
||||||
}"
|
}"
|
||||||
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
||||||
>
|
>
|
||||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
prop="cateName"
|
||||||
|
label="所属分类"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上传人员" prop="userIdList" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
label="上传人员"
|
||||||
|
prop="userIdList"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<p v-if="scope.row.uploadList.length" class="truncate text-ellipsis">
|
<p
|
||||||
{{ scope.row.uploadList.map((item: any) => item.nickName).join('、') }}
|
v-if="scope.row.uploadList.length"
|
||||||
|
class="truncate text-ellipsis"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
scope.row.uploadList
|
||||||
|
.map((item: any) => item.nickName)
|
||||||
|
.join('、')
|
||||||
|
}}
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="false"
|
v-if="false"
|
||||||
:content="handTooltip(scope.row.uploadList)"
|
:content="handTooltip(scope.row.uploadList)"
|
||||||
|
|
@ -252,10 +329,15 @@
|
||||||
<p
|
<p
|
||||||
v-for="(it, e) in scope.row.uploadList"
|
v-for="(it, e) in scope.row.uploadList"
|
||||||
:key="e"
|
:key="e"
|
||||||
:class="scope.row.uploadList.length < 2 ? '!leading-46px' : 'xx'"
|
:class="
|
||||||
|
scope.row.uploadList.length < 2
|
||||||
|
? '!leading-46px'
|
||||||
|
: 'xx'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ it.nickName || undefined }}
|
{{ it.nickName || undefined }}
|
||||||
<span v-if="e == 1 && scope.row.uploadList.length > 2"
|
<span
|
||||||
|
v-if="e == 1 && scope.row.uploadList.length > 2"
|
||||||
>...共{{ scope.row.uploadList.length }}人</span
|
>...共{{ scope.row.uploadList.length }}人</span
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -266,10 +348,21 @@
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批人员" prop="userIdList" show-overflow-tooltip>
|
<el-table-column
|
||||||
|
label="审批人员"
|
||||||
|
prop="userIdList"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<p v-if="scope.row.reviewList.length" class="truncate text-ellipsis">
|
<p
|
||||||
{{ scope.row.reviewList.map((item: any) => item.nickName).join('、') }}
|
v-if="scope.row.reviewList.length"
|
||||||
|
class="truncate text-ellipsis"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
scope.row.reviewList
|
||||||
|
.map((item: any) => item.nickName)
|
||||||
|
.join('、')
|
||||||
|
}}
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="false"
|
v-if="false"
|
||||||
:content="handTooltip(scope.row.reviewList)"
|
:content="handTooltip(scope.row.reviewList)"
|
||||||
|
|
@ -280,10 +373,15 @@
|
||||||
<p
|
<p
|
||||||
v-for="(it, e) in scope.row.reviewList"
|
v-for="(it, e) in scope.row.reviewList"
|
||||||
:key="e"
|
:key="e"
|
||||||
:class="scope.row.reviewList.length < 2 ? '!leading-46px' : 'xx'"
|
:class="
|
||||||
|
scope.row.reviewList.length < 2
|
||||||
|
? '!leading-46px'
|
||||||
|
: 'xx'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ it.nickName || undefined }}
|
{{ it.nickName || undefined }}
|
||||||
<span v-if="e == 1 && scope.row.reviewList.length > 2"
|
<span
|
||||||
|
v-if="e == 1 && scope.row.reviewList.length > 2"
|
||||||
>...共{{ scope.row.reviewList.length }}人</span
|
>...共{{ scope.row.reviewList.length }}人</span
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -294,7 +392,12 @@
|
||||||
<span v-else></span>
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="address" label="操作" show-overflow-tooltip width="180px">
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="操作"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="180px"
|
||||||
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -309,7 +412,13 @@
|
||||||
@confirm="handleAuthClick('del', scope.row)"
|
@confirm="handleAuthClick('del', scope.row)"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" @click="" class="w45px my-10px"> 删除</el-button>
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
@click=""
|
||||||
|
class="w45px my-10px"
|
||||||
|
>
|
||||||
|
删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -318,7 +427,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="float-right absolute bottom-0px right-30px z-2000 bg-#fff">
|
<div
|
||||||
|
class="float-right absolute bottom-0px right-30px z-2000 bg-#fff"
|
||||||
|
>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
v-model:current-page="pageInfo.currentPage"
|
v-model:current-page="pageInfo.currentPage"
|
||||||
v-model:page-size="pageInfo.pageSize"
|
v-model:page-size="pageInfo.pageSize"
|
||||||
|
|
@ -343,7 +454,9 @@
|
||||||
</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>
|
||||||
|
|
@ -393,42 +506,10 @@
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br />
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editB.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editB.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editB.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<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>
|
||||||
|
|
@ -467,13 +548,19 @@
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<el-button type="primary" @click="handleSetAuth" class="mb-20px"> 确认</el-button>
|
<el-button type="primary" @click="handleSetAuth" class="mb-20px">
|
||||||
|
确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</NModal>
|
</NModal>
|
||||||
<n-modal v-model:show="showModal" :z-index="99999">
|
<n-modal v-model:show="showModal" :z-index="99999">
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
<UserList
|
||||||
|
:userDataList="setUserList"
|
||||||
|
@clickChild="handleChild"
|
||||||
|
@CloseThis="CloseThiss"
|
||||||
|
/>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -499,14 +586,13 @@ import {
|
||||||
import { NModal, useMessage, NSelect } from 'naive-ui'
|
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'
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const database = databaseld()
|
const database = databaseld()
|
||||||
const store: any = useUserStore()
|
const store: any = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = computed(() =>
|
const userCode = computed(() =>
|
||||||
['admin', 'database_dandang', 'tech_service'].some((item) => store.user.roleCode?.includes(item))
|
['admin', 'database_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||||
)
|
)
|
||||||
// 'tech_service'
|
// 'tech_service'
|
||||||
const isDbReview = store.user?.isDbReview === 1
|
const isDbReview = store.user?.isDbReview === 1
|
||||||
|
|
@ -792,7 +878,10 @@ const handleChange = (e: string | any[]) => {
|
||||||
}
|
}
|
||||||
// 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'] = (
|
||||||
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
message.warning('最多只能上传一个文件!')
|
message.warning('最多只能上传一个文件!')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -806,7 +895,12 @@ const flg = ref()
|
||||||
const setUserList = ref()
|
const setUserList = ref()
|
||||||
const dbAuthType = ref()
|
const dbAuthType = ref()
|
||||||
const selSetAuthKey = ref('')
|
const selSetAuthKey = ref('')
|
||||||
async function getUser(row: { id?: any; userList?: any; type?: number; key?: string }) {
|
async function getUser(row: {
|
||||||
|
id?: any
|
||||||
|
userList?: any
|
||||||
|
type?: number
|
||||||
|
key?: string
|
||||||
|
}) {
|
||||||
showModal.value = !showModal.value
|
showModal.value = !showModal.value
|
||||||
flg.value = row
|
flg.value = row
|
||||||
if (showAuthModal.value) {
|
if (showAuthModal.value) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
<!-- 差别化云空间 -->
|
<!-- 差别化云空间 -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { NIcon, NModal, useMessage, NPopover, NCarousel, NCarouselItem } from 'naive-ui'
|
import {
|
||||||
|
NIcon,
|
||||||
|
NModal,
|
||||||
|
useMessage,
|
||||||
|
NPopover,
|
||||||
|
NCarousel,
|
||||||
|
NCarouselItem
|
||||||
|
} from 'naive-ui'
|
||||||
import { ChevronBack, ChevronForward } from '@vicons/ionicons5'
|
import { ChevronBack, ChevronForward } from '@vicons/ionicons5'
|
||||||
import AppBlock from '@/components/AppBlock.vue'
|
import AppBlock from '@/components/AppBlock.vue'
|
||||||
import AppAlert from '@/components/AppAlert.vue'
|
import AppAlert from '@/components/AppAlert.vue'
|
||||||
|
|
@ -19,8 +26,8 @@ import { isNotOneWeekAgo } from '@/utils'
|
||||||
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const myStore = useMyStore()
|
const myStore = useMyStore()
|
||||||
const userCode = ['admin', 'theme_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
@ -192,7 +199,9 @@ const openUrl = async (url) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(url)
|
srcType.value = getLastSubstring(url)
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
if (
|
||||||
|
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||||
|
) {
|
||||||
// src.value = filePath
|
// src.value = filePath
|
||||||
// pdfShow.value = true
|
// pdfShow.value = true
|
||||||
url = 'https://view.xdocin.com/view?src=' + url
|
url = 'https://view.xdocin.com/view?src=' + url
|
||||||
|
|
@ -201,10 +210,19 @@ const openUrl = async (url) => {
|
||||||
window.open(
|
window.open(
|
||||||
url,
|
url,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
|
|
@ -260,7 +278,9 @@ const handleSelect = (data: { id: any }) => {
|
||||||
message.info('没有访问权限')
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
form.value.lable1 = dataLeft.value.find((it: { id: any }) => it.id === data.id)
|
form.value.lable1 = dataLeft.value.find(
|
||||||
|
(it: { id: any }) => it.id === data.id
|
||||||
|
)
|
||||||
}
|
}
|
||||||
const handleClick = () => {
|
const handleClick = () => {
|
||||||
if (leftContentIsSelects.value === 2) {
|
if (leftContentIsSelects.value === 2) {
|
||||||
|
|
@ -275,7 +295,9 @@ const handleSelect2 = (data: { id: any }) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(dataRight.value)
|
console.log(dataRight.value)
|
||||||
form.value.lable2 = dataRight.value.find((it: { id: any }) => it.id === data.id)
|
form.value.lable2 = dataRight.value.find(
|
||||||
|
(it: { id: any }) => it.id === data.id
|
||||||
|
)
|
||||||
}
|
}
|
||||||
const handleClick2 = () => {
|
const handleClick2 = () => {
|
||||||
// console.log(dataBlist.value)
|
// console.log(dataBlist.value)
|
||||||
|
|
@ -374,7 +396,9 @@ async function downs() {
|
||||||
originalFilename = dataBlist.value.originalFilename
|
originalFilename = dataBlist.value.originalFilename
|
||||||
} else {
|
} else {
|
||||||
url = dataBlist.value.map((ite) => ite.response.url)
|
url = dataBlist.value.map((ite) => ite.response.url)
|
||||||
originalFilename = dataBlist.value.map((ite) => ite.response.originalFilename)
|
originalFilename = dataBlist.value.map(
|
||||||
|
(ite) => ite.response.originalFilename
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -413,7 +437,9 @@ const title = (tit) => {
|
||||||
<img src="./images/logo.svg" class="h56px mr21px" />
|
<img src="./images/logo.svg" class="h56px mr21px" />
|
||||||
<div class="text-36px">差别化研究</div>
|
<div class="text-36px">差别化研究</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full flex-1 flex flex-col mt17px text-#142142 gap-30px h-896px">
|
<div
|
||||||
|
class="w-full flex-1 flex flex-col mt17px text-#142142 gap-30px h-896px"
|
||||||
|
>
|
||||||
<AppBlock class="w-full h241px box !b-0">
|
<AppBlock class="w-full h241px box !b-0">
|
||||||
<!-- @click="swipeRef && swipeRef.slideNext()" -->
|
<!-- @click="swipeRef && swipeRef.slideNext()" -->
|
||||||
<div class="w1500px px68px relative" v-if="showSwiper">
|
<div class="w1500px px68px relative" v-if="showSwiper">
|
||||||
|
|
@ -473,16 +499,19 @@ const title = (tit) => {
|
||||||
<!-- <div class="text-16px mt6px">{{ i.time }}</div> -->
|
<!-- <div class="text-16px mt6px">{{ i.time }}</div> -->
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div class="text-20px truncate leading-40px flex items-center">
|
<div
|
||||||
|
class="text-20px truncate leading-40px flex items-center"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
v-if="isNotOneWeekAgo(i.createTime)"
|
v-if="isNotOneWeekAgo(i.createTime)"
|
||||||
src="@/assets/images/NEW.gif"
|
src="@/assets/images/NEW.gif"
|
||||||
class="!h-20px !w-auto mr-2"
|
class="!h-20px !w-auto mr-2"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<span class="overflow-hidden text-ellipsis truncate flex flex-1">{{
|
<span
|
||||||
title(i) + '' + i.title
|
class="overflow-hidden text-ellipsis truncate flex flex-1"
|
||||||
}}</span>
|
>{{ title(i) + '' + i.title }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="max-w500px text-12px">{{ i.title }}</div>
|
<div class="max-w500px text-12px">{{ i.title }}</div>
|
||||||
|
|
@ -495,14 +524,25 @@ const title = (tit) => {
|
||||||
</div>
|
</div>
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
<div class="flex-1 flex gap-26px">
|
<div class="flex-1 flex gap-26px">
|
||||||
<AppBlock class="box w-379px h-full relative !overflow-initial" v-if="form">
|
<AppBlock
|
||||||
<img :src="form.lable1.url" class="w-full h-full absolute left-0 top-0 rounded-18px" />
|
class="box w-379px h-full relative !overflow-initial"
|
||||||
|
v-if="form"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
:src="form.lable1.url"
|
||||||
|
class="w-full h-full absolute left-0 top-0 rounded-18px"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
class="mt20px mx10px h60px flex items-center justify-center rd-30px text-24px text-#fff bg-#000/45"
|
class="mt20px mx10px h60px flex items-center justify-center rd-30px text-24px text-#fff bg-#000/45"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
:alt="form.lable1.title"
|
:alt="form.lable1.title"
|
||||||
style="width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
|
style="
|
||||||
|
width: 300px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
@ -523,7 +563,9 @@ const title = (tit) => {
|
||||||
<div
|
<div
|
||||||
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
|
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="text-#000 text-18px flex-1 font-600">{{ form.lable1.titles }}</span>
|
<span class="text-#000 text-18px flex-1 font-600">{{
|
||||||
|
form.lable1.titles
|
||||||
|
}}</span>
|
||||||
|
|
||||||
<el-icon
|
<el-icon
|
||||||
v-if="showDropdown1 === true"
|
v-if="showDropdown1 === true"
|
||||||
|
|
@ -545,9 +587,11 @@ const title = (tit) => {
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomclom" v-if="showDropdown1">
|
<div class="bottomclom" v-if="showDropdown1">
|
||||||
<div v-if="dataLeft" v-for="item in dataLeft[0].fileList">
|
<div v-if="dataLeft" v-for="item in dataLeft">
|
||||||
<span class="container" @click="down({ it: item })">{{ item.name }}</span>
|
<span class="container" @click="handleSelect(item)">{{
|
||||||
<!-- <el-dropdown max-height="100px" @command="down">
|
item.title
|
||||||
|
}}</span>
|
||||||
|
<el-dropdown max-height="100px" @command="down">
|
||||||
<el-icon size="25">
|
<el-icon size="25">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -562,7 +606,7 @@ const title = (tit) => {
|
||||||
>
|
>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown> -->
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
|
|
@ -575,8 +619,13 @@ const title = (tit) => {
|
||||||
class="mt20px mx10px h60px flex items-center justify-center rd-30px text-24px text-#fff bg-#000/45"
|
class="mt20px mx10px h60px flex items-center justify-center rd-30px text-24px text-#fff bg-#000/45"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
:alt="form.lable2.title"
|
:alt="form.lable1.title"
|
||||||
style="width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
|
style="
|
||||||
|
width: 300px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<n-popover trigger="hover" placement="top-start">
|
<n-popover trigger="hover" placement="top-start">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
|
|
@ -587,7 +636,7 @@ const title = (tit) => {
|
||||||
class="!h-20px !w-auto mr-2"
|
class="!h-20px !w-auto mr-2"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<span>{{ form.lable2.title }}</span>
|
<span>{{ form.lable1.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- {{ form.lable2.title }} -->
|
<!-- {{ form.lable2.title }} -->
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -598,7 +647,9 @@ const title = (tit) => {
|
||||||
<div
|
<div
|
||||||
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
|
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span class="text-#000 text-18px flex-1 font-600">{{ form.lable2.titles }}</span>
|
<span class="text-#000 text-18px flex-1 font-600">{{
|
||||||
|
form.lable2.titles
|
||||||
|
}}</span>
|
||||||
<el-icon
|
<el-icon
|
||||||
v-if="showDropdown2 === true"
|
v-if="showDropdown2 === true"
|
||||||
size="25"
|
size="25"
|
||||||
|
|
@ -619,14 +670,16 @@ const title = (tit) => {
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomclom" v-if="showDropdown2">
|
<div class="bottomclom" v-if="showDropdown2">
|
||||||
<div v-if="dataRight" v-for="ite in dataRight[0].fileList">
|
<div v-if="dataRight" v-for="item in dataRight">
|
||||||
<span class="container" @click="down({ it: ite })">{{ ite.name }}</span>
|
<span class="container" @click="handleSelect2(item)">{{
|
||||||
<!-- <el-dropdown max-height="100px" @command="down"> -->
|
item.title
|
||||||
<!-- <el-icon size="25">
|
}}</span>
|
||||||
|
<el-dropdown max-height="100px" @command="down">
|
||||||
|
<el-icon size="25">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
</el-icon> -->
|
</el-icon>
|
||||||
|
|
||||||
<!-- <template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="item.fileList"
|
v-if="item.fileList"
|
||||||
|
|
@ -635,8 +688,8 @@ const title = (tit) => {
|
||||||
>{{ it.name }}</el-dropdown-item
|
>{{ it.name }}</el-dropdown-item
|
||||||
>
|
>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template> -->
|
</template>
|
||||||
<!-- </el-dropdown> -->
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
|
|
@ -652,7 +705,14 @@ const title = (tit) => {
|
||||||
</AppAlert>
|
</AppAlert>
|
||||||
<div class="h95px w100% min-h-125px" v-if="shutList1">
|
<div class="h95px w100% min-h-125px" v-if="shutList1">
|
||||||
<swiper
|
<swiper
|
||||||
:autoplay="false"
|
:autoplay="
|
||||||
|
shutList1.length > 4
|
||||||
|
? {
|
||||||
|
delay: 1000,
|
||||||
|
disableOnInteraction: false
|
||||||
|
}
|
||||||
|
: false
|
||||||
|
"
|
||||||
:slides-per-view="3"
|
:slides-per-view="3"
|
||||||
:slides-per-group="1"
|
:slides-per-group="1"
|
||||||
:loopAdditionalSlides="3"
|
:loopAdditionalSlides="3"
|
||||||
|
|
@ -665,7 +725,9 @@ const title = (tit) => {
|
||||||
style="height: 120px; width: 100%"
|
style="height: 120px; width: 100%"
|
||||||
>
|
>
|
||||||
<swiper-slide v-for="i in shutList1" :key="i.id">
|
<swiper-slide v-for="i in shutList1" :key="i.id">
|
||||||
<div class="w-full px12px line flex h40px flex items-center justify-between">
|
<div
|
||||||
|
class="w-full px12px line flex h40px flex items-center justify-between"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
||||||
@click="downClicks1(i)"
|
@click="downClicks1(i)"
|
||||||
|
|
@ -678,7 +740,9 @@ const title = (tit) => {
|
||||||
class="!h-20px !w-auto"
|
class="!h-20px !w-auto"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div class="min-w23% max-w30% text-right leading-40px h40px">
|
<div
|
||||||
|
class="min-w23% max-w30% text-right leading-40px h40px"
|
||||||
|
>
|
||||||
{{ i.createTime }}
|
{{ i.createTime }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -695,11 +759,17 @@ const title = (tit) => {
|
||||||
|
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="h95px w100% min-h125px max-h125px overflow-y-auto" v-if="shutList2">
|
<div
|
||||||
|
class="h95px w100% min-h125px max-h125px overflow-y-auto"
|
||||||
|
v-if="shutList2"
|
||||||
|
>
|
||||||
<swiper
|
<swiper
|
||||||
id="swiperList2"
|
id="swiperList2"
|
||||||
:slides-per-view="3"
|
:slides-per-view="3"
|
||||||
:autoplay="false"
|
:autoplay="{
|
||||||
|
delay: 1000,
|
||||||
|
disableOnInteraction: false
|
||||||
|
}"
|
||||||
:speed="500"
|
:speed="500"
|
||||||
:space-between="1"
|
:space-between="1"
|
||||||
:direction="'vertical'"
|
:direction="'vertical'"
|
||||||
|
|
@ -709,7 +779,9 @@ const title = (tit) => {
|
||||||
style="height: 120px; width: 100%"
|
style="height: 120px; width: 100%"
|
||||||
>
|
>
|
||||||
<swiper-slide v-for="(i, index) in shutList2" :key="index">
|
<swiper-slide v-for="(i, index) in shutList2" :key="index">
|
||||||
<div class="w-full px12px line flex h40px flex items-center justify-between">
|
<div
|
||||||
|
class="w-full px12px line flex h40px flex items-center justify-between"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
||||||
@click="downClicks1(i)"
|
@click="downClicks1(i)"
|
||||||
|
|
@ -722,7 +794,9 @@ const title = (tit) => {
|
||||||
class="!h-20px !w-auto"
|
class="!h-20px !w-auto"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div class="min-w23% max-w30% text-right leading-40px h40px">
|
<div
|
||||||
|
class="min-w23% max-w30% text-right leading-40px h40px"
|
||||||
|
>
|
||||||
{{ i.createTime }}
|
{{ i.createTime }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -734,11 +808,17 @@ const title = (tit) => {
|
||||||
<span class="flex-shrink" @click="bottomClick(3)">❯</span>
|
<span class="flex-shrink" @click="bottomClick(3)">❯</span>
|
||||||
<!-- <span class="flex-shrink" >❯</span> -->
|
<!-- <span class="flex-shrink" >❯</span> -->
|
||||||
</AppAlert>
|
</AppAlert>
|
||||||
<div class="h145px w100% min-h135px max-h145px overflow-y-auto" v-if="shutList3">
|
<div
|
||||||
|
class="h145px w100% min-h135px max-h145px overflow-y-auto"
|
||||||
|
v-if="shutList3"
|
||||||
|
>
|
||||||
<swiper
|
<swiper
|
||||||
id="swiperList3"
|
id="swiperList3"
|
||||||
:slides-per-view="3"
|
:slides-per-view="3"
|
||||||
:autoplay="false"
|
:autoplay="{
|
||||||
|
delay: 1000,
|
||||||
|
disableOnInteraction: false
|
||||||
|
}"
|
||||||
:speed="500"
|
:speed="500"
|
||||||
:space-between="1"
|
:space-between="1"
|
||||||
:direction="'vertical'"
|
:direction="'vertical'"
|
||||||
|
|
@ -748,7 +828,9 @@ const title = (tit) => {
|
||||||
style="height: 120px; width: 100%"
|
style="height: 120px; width: 100%"
|
||||||
>
|
>
|
||||||
<swiper-slide v-for="(i, index) in shutList3" :key="index">
|
<swiper-slide v-for="(i, index) in shutList3" :key="index">
|
||||||
<div class="w-full px12px line flex h40px flex items-center justify-between">
|
<div
|
||||||
|
class="w-full px12px line flex h40px flex items-center justify-between"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
class="min-w67% max-w70% truncate text-left leading-40px h40px"
|
||||||
@click="downClicks1(i)"
|
@click="downClicks1(i)"
|
||||||
|
|
@ -761,7 +843,9 @@ const title = (tit) => {
|
||||||
class="!h-20px !w-auto"
|
class="!h-20px !w-auto"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div class="min-w23% max-w30% text-right leading-40px h40px">
|
<div
|
||||||
|
class="min-w23% max-w30% text-right leading-40px h40px"
|
||||||
|
>
|
||||||
{{ i.createTime }}
|
{{ i.createTime }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -779,7 +863,11 @@ const title = (tit) => {
|
||||||
class="my30px text-center text-12px text-#2c3e50"
|
class="my30px text-center text-12px text-#2c3e50"
|
||||||
v-for="item in dogList"
|
v-for="item in dogList"
|
||||||
>
|
>
|
||||||
<img :src="item.url" class="w100px !border-0 dog_log" @click="handleSelectPor" />
|
<img
|
||||||
|
:src="item.url"
|
||||||
|
class="w100px !border-0 dog_log"
|
||||||
|
@click="handleSelectPor"
|
||||||
|
/>
|
||||||
<div class="mt12px">姓名:{{ item.title }}</div>
|
<div class="mt12px">姓名:{{ item.title }}</div>
|
||||||
|
|
||||||
<div class="my8px">职位:{{ item.time }}</div>
|
<div class="my8px">职位:{{ item.time }}</div>
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,23 @@
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { NModal, useMessage } from 'naive-ui'
|
import { NModal, useMessage } from 'naive-ui'
|
||||||
import {
|
import { getCateList, editCateItem,getCateItemList,deleteCateItem ,getLabActList} from '@/api/daikin/base'
|
||||||
getCateList,
|
|
||||||
editCateItem,
|
|
||||||
getCateItemList,
|
|
||||||
deleteCateItem,
|
|
||||||
getLabActList
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import { useMyStore } from '@/stores/modules/mystor'
|
import { useMyStore } from '@/stores/modules/mystor'
|
||||||
|
|
||||||
const myStore = useMyStore()
|
const myStore = useMyStore();
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const header = { 'token': store.user.token }
|
const header = { 'token': store.user.token }
|
||||||
const userCode = ['admin', 'theme_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
||||||
const dataA = ref([])
|
const dataA = ref([])
|
||||||
|
|
||||||
|
|
||||||
const shomkA = ref(false)
|
const shomkA = ref(false)
|
||||||
|
|
||||||
const actMidIsSelects=ref()
|
const actMidIsSelects=ref()
|
||||||
|
|
@ -35,7 +28,7 @@ const cateIds = ref()
|
||||||
const starId = ref()
|
const starId = ref()
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
cateId: route.params.id !== ':id' ? route.params.id : starId.value
|
cateId:route.params.id!==':id'?route.params.id:starId.value,
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -48,11 +41,13 @@ onMounted(async () => {
|
||||||
tabsList.value = dataBot
|
tabsList.value = dataBot
|
||||||
if(dataBot.length>0){
|
if(dataBot.length>0){
|
||||||
starId.value = dataBot[0].id
|
starId.value = dataBot[0].id
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(starId.value)
|
console.log(starId.value)
|
||||||
cateIds.value = route.params.id
|
cateIds.value = route.params.id
|
||||||
activeName.value = route.params.id!==':id'?route.params.id:starId.value+''
|
activeName.value = route.params.id!==':id'?route.params.id:starId.value+''
|
||||||
|
|
||||||
})
|
})
|
||||||
async function getItemList() {
|
async function getItemList() {
|
||||||
const {rows} =await getCateItemList(state)
|
const {rows} =await getCateItemList(state)
|
||||||
|
|
@ -60,12 +55,11 @@ async function getItemList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ss = computed(() => [state.pageNum, state.cateId])
|
const ss = computed(() => [state.pageNum, state.cateId])
|
||||||
watch(
|
watch(() => unref(ss),
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
async (v) => {
|
||||||
getItemList()
|
getItemList()
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true },
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
|
|
@ -82,15 +76,7 @@ const editA = ref({
|
||||||
fileList: []
|
fileList: []
|
||||||
})
|
})
|
||||||
|
|
||||||
async function onSubmit(row: {
|
async function onSubmit(row: { id: number; url: any; title: string; time: string; dowhat: string; files: never[]; fileList: never[] }) {
|
||||||
id: number
|
|
||||||
url: any
|
|
||||||
title: string
|
|
||||||
time: string
|
|
||||||
dowhat: string
|
|
||||||
files: never[]
|
|
||||||
fileList: never[]
|
|
||||||
}) {
|
|
||||||
console.log(row)
|
console.log(row)
|
||||||
|
|
||||||
const { id, title, fileList } = row
|
const { id, title, fileList } = row
|
||||||
|
|
@ -98,76 +84,81 @@ async function onSubmit(row: {
|
||||||
let filePath
|
let filePath
|
||||||
console.log(cateId)
|
console.log(cateId)
|
||||||
if (fileList && fileList.length > 0) {
|
if (fileList && fileList.length > 0) {
|
||||||
filePath = fileList
|
filePath = fileList.map(file => {
|
||||||
.map((file) => {
|
|
||||||
if(file.response){
|
if(file.response){
|
||||||
return file.response.url
|
return file.response.url
|
||||||
} else {
|
}
|
||||||
|
else{
|
||||||
return file.url
|
return file.url
|
||||||
}
|
}
|
||||||
})
|
}).join(',')
|
||||||
.join(',')
|
|
||||||
}
|
}
|
||||||
console.log({id,title,cateId,filePath})
|
console.log({id,title,cateId,filePath})
|
||||||
if(cateId&&cateId=='undefined'){
|
if(cateId&&cateId=='undefined'){
|
||||||
message.error('请先添加类别!')
|
message.error("请先添加类别!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { code, msg } = await editCateItem({ id, title, cateId, filePath })
|
const { code, msg } = await editCateItem({ id, title, cateId, filePath })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("添加成功!") }
|
||||||
message.success('添加成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.reload()
|
window.location.reload();
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (row: any) => {
|
const handleEdit = (row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
row.fileList = row.filePathList.map((item) =>
|
row.fileList = row.filePathList.map(item=>Object.assign(item,{
|
||||||
Object.assign(item, {
|
|
||||||
name:item.originalFileName
|
name:item.originalFileName
|
||||||
})
|
}))
|
||||||
)
|
|
||||||
shomkA.value = true
|
shomkA.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
editA.value = row
|
editA.value = row
|
||||||
|
|
||||||
}
|
}
|
||||||
async function handleDelete(obj) {
|
async function handleDelete(obj) {
|
||||||
const {id} = obj
|
const {id} = obj
|
||||||
const { code,msg} =await deleteCateItem({id})
|
const { code,msg} =await deleteCateItem({id})
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
window.location.reload();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
window.location.reload()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function downloadFile(data) {
|
async function downloadFile(data) {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
if(actMidIsSelects.value===2){
|
if(actMidIsSelects.value===2){
|
||||||
message.info('没有访问权限')
|
message.info("没有访问权限")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const url = data.it.url
|
const url = data.it.url
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url)
|
const response = await fetch(url);
|
||||||
const blob = await response.blob()
|
const blob = await response.blob();
|
||||||
|
|
||||||
const downloadUrl = URL.createObjectURL(blob)
|
const downloadUrl = URL.createObjectURL(blob);
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a');
|
||||||
link.href = downloadUrl
|
link.href = downloadUrl;
|
||||||
link.download = data.it.originalFileName // 替换为你要保存的文件名
|
link.download = data.it.originalFileName; // 替换为你要保存的文件名
|
||||||
link.click()
|
link.click();
|
||||||
URL.revokeObjectURL(downloadUrl)
|
URL.revokeObjectURL(downloadUrl);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('下载文件出错:', error)
|
message.error('下载文件出错:', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top">
|
<HomeHead class="top">
|
||||||
|
|
@ -185,12 +176,7 @@ async function downloadFile(data) {
|
||||||
</div>
|
</div>
|
||||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px rounded-20px">
|
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px rounded-20px">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane v-for="(item,ind) in tabsList" :label="item.id" :name="item.id+''" :index="item.id">
|
||||||
v-for="(item, ind) in tabsList"
|
|
||||||
:label="item.id"
|
|
||||||
:name="item.id + ''"
|
|
||||||
:index="item.id"
|
|
||||||
>
|
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="custom-tabs-label">
|
<span class="custom-tabs-label">
|
||||||
<span class="text-20px">{{ item.cateName }}</span>
|
<span class="text-20px">{{ item.cateName }}</span>
|
||||||
|
|
@ -202,23 +188,15 @@ async function downloadFile(data) {
|
||||||
<div>
|
<div>
|
||||||
<div v-if="dataA" v-for="iet in dataA" class="py25px px10px text-18px ">
|
<div v-if="dataA" v-for="iet in dataA" class="py25px px10px text-18px ">
|
||||||
<span class="content">{{iet.title}}</span>
|
<span class="content">{{iet.title}}</span>
|
||||||
<el-dropdown
|
<el-dropdown max-height="100px" @command="downloadFile" class="top--5px w50px block float-left">
|
||||||
max-height="100px"
|
|
||||||
@command="downloadFile"
|
|
||||||
class="top--5px w50px block float-left"
|
|
||||||
>
|
|
||||||
<el-icon size="25" color="#0054E4">
|
<el-icon size="25" color="#0054E4">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item v-if="iet.filePathList" v-for="it in iet.filePathList"
|
||||||
v-if="iet.filePathList"
|
:command="{ it }">{{ it.originalFileName }}</el-dropdown-item>
|
||||||
v-for="it in iet.filePathList"
|
|
||||||
:command="{ it }"
|
|
||||||
>{{ it.originalFileName }}</el-dropdown-item
|
|
||||||
>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
@ -227,32 +205,35 @@ async function downloadFile(data) {
|
||||||
<el-button size="small" @click="handleEdit(iet)">编辑</el-button>
|
<el-button size="small" @click="handleEdit(iet)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleDelete(iet)">删除</el-button>
|
<el-button size="small" type="danger" @click="handleDelete(iet)">删除</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-button v-if="userCode" type="primary" class="" @click="shomkA = !shomkA">新增内容</el-button> -->
|
<!-- <el-button v-if="userCode" type="primary" class="" @click="shomkA = !shomkA">新增内容</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="shomkA">
|
<n-modal v-model:show="shomkA">
|
||||||
<div class="bg-#FFF p30px">
|
<div class="bg-#FFF p30px">
|
||||||
<el-form :model="editA" label-width="120px" :inline="true">
|
<el-form :model="editA" label-width="120px" :inline="true">
|
||||||
<br />
|
|
||||||
|
|
||||||
|
<br>
|
||||||
<el-form-item label="标题">
|
<el-form-item label="标题">
|
||||||
<el-input v-model="editA.title" />
|
<el-input v-model="editA.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editA.fileList"
|
action="/test-api/common/upload">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit(editA)">确认</el-button>
|
<el-button type="primary" @click="onSubmit(editA)">确认</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -26,23 +26,41 @@
|
||||||
>
|
>
|
||||||
<img :src="item.url" class="max-w250px max-h350px min-w250px" />
|
<img :src="item.url" class="max-w250px max-h350px min-w250px" />
|
||||||
<span class="ml40px text-20px min-w845px max-w845px">
|
<span class="ml40px text-20px min-w845px max-w845px">
|
||||||
<span>标 题: {{ item.title }}</span
|
<span
|
||||||
|
>标 题:
|
||||||
|
{{ item.title }}</span
|
||||||
><br /><br /><br />
|
><br /><br /><br />
|
||||||
<span
|
<span
|
||||||
>相关文件:
|
>相关文件:
|
||||||
<span v-if="item.fileList?.[0]">{{ item.fileList[0].name }}</span></span
|
<span v-if="item.fileList?.[0]">{{
|
||||||
|
item.fileList[0].name
|
||||||
|
}}</span></span
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="w200px ml30px">
|
<div class="w200px ml30px">
|
||||||
<el-button size="small" type="primary" @click="handleEditC(item)">编辑</el-button>
|
<el-button
|
||||||
<el-button size="small" type="danger" @click="handleDeleteC(item)">删除</el-button>
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleEditC(item)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDeleteC(item)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
||||||
<el-button type="primary" @click="handleEditC({})">新增列表内容</el-button>
|
<el-button type="primary" @click="handleEditC({})"
|
||||||
<el-button type="primary" @click="getUser(1)"> 查看范围</el-button>
|
>新增列表内容</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="getUser(1)">
|
||||||
|
查看范围</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
@ -53,12 +71,17 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div class="p30px cont relative w100% h800px overflow-y-auto">
|
<div class="p30px cont relative w100% h800px overflow-y-auto">
|
||||||
<div v-for="item in dataA" class="my20px bg-#f5f5f5 rounded-15px flex w-full">
|
<div
|
||||||
|
v-for="item in dataA"
|
||||||
|
class="my20px bg-#f5f5f5 rounded-15px flex w-full"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.url" class="max-w180px max-h350px min-w180px" />
|
<img :src="item.url" class="max-w180px max-h350px min-w180px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="min-w600px mt50px text-18px">
|
<div class="min-w600px mt50px text-18px">
|
||||||
<span class="ml40px text-20px">底部大标题: {{ item.titles }}</span>
|
<span class="ml40px text-20px"
|
||||||
|
>底部大标题: {{ item.titles }}</span
|
||||||
|
>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
|
|
@ -85,15 +108,31 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w160px ml30px mt120px">
|
<div class="w160px ml30px mt120px">
|
||||||
<el-button size="small" type="primary" @click="handleEditA(item)">编辑</el-button>
|
<el-button
|
||||||
<el-button size="small" type="danger" @click="handleDeleteA(item)">删除</el-button>
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleEditA(item)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDeleteA(item)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <el-button type="primary" @click="handleEditA(editA)" class="my20px fixed bottom-30px left-20% z-2000">新增年度内容</el-button> -->
|
<!-- <el-button type="primary" @click="handleEditA(editA)" class="my20px fixed bottom-30px left-20% z-2000">新增年度内容</el-button> -->
|
||||||
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
||||||
<el-button type="primary" @click="handleEditA({})">新增列表内容</el-button>
|
<el-button type="primary" @click="handleEditA({})"
|
||||||
<el-button type="primary" @click="getUser(2)" @CloseThis="CloseThiss">
|
>新增列表内容</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="getUser(2)"
|
||||||
|
@CloseThis="CloseThiss"
|
||||||
|
>
|
||||||
查看范围</el-button
|
查看范围</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -106,12 +145,17 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<div class="p30px cont relative w100% h800px overflow-y-auto">
|
<div class="p30px cont relative w100% h800px overflow-y-auto">
|
||||||
<div v-for="item in dataB" class="my20px bg-#f5f5f5 rounded-15px flex w-full">
|
<div
|
||||||
|
v-for="item in dataB"
|
||||||
|
class="my20px bg-#f5f5f5 rounded-15px flex w-full"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.url" class="max-w180px max-h350px min-w180px" />
|
<img :src="item.url" class="max-w180px max-h350px min-w180px" />
|
||||||
</div>
|
</div>
|
||||||
<div class="min-w600px mt50px">
|
<div class="min-w600px mt50px">
|
||||||
<span class="ml40px text-20px">底部大标题: {{ item.titles }}</span>
|
<span class="ml40px text-20px"
|
||||||
|
>底部大标题: {{ item.titles }}</span
|
||||||
|
>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
|
|
@ -131,21 +175,35 @@
|
||||||
<span class="text-20px">文件列表:</span>
|
<span class="text-20px">文件列表:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w250px min-w250px mt20px flex items-center">
|
<div class="max-w250px min-w250px mt20px flex items-center">
|
||||||
<span v-if="item.fileList" v-for="i in item.fileList"
|
<sapn v-if="item.fileList" v-for="i in item.fileList"
|
||||||
><span class="mt5px">{{ i.name }}</span
|
><span class="mt5px">{{ i.name }}</span
|
||||||
><br /><br
|
><br /><br
|
||||||
/></span>
|
/></sapn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w120px ml30px mt120px">
|
<div class="w120px ml30px mt120px">
|
||||||
<el-button size="small" type="primary" @click="handleEditB(item)">编辑</el-button>
|
<el-button
|
||||||
<el-button size="small" type="danger" @click="handleDeleteB(item)">删除</el-button>
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleEditB(item)"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDeleteB(item)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-full">
|
||||||
<el-button type="primary" @click="handleEditB({})">新增列表内容</el-button>
|
<el-button type="primary" @click="handleEditB({})"
|
||||||
<el-button type="primary" @click="getUser(3)"> 查看范围</el-button>
|
>新增列表内容</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="getUser(3)">
|
||||||
|
查看范围</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
@ -225,40 +283,6 @@
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editC.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editC.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editC.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editC.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editC.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1" />
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -376,44 +400,13 @@
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editA.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editA.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editA.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1" />
|
||||||
<el-form-item class="">
|
<el-form-item class="">
|
||||||
<el-button type="primary" class="w88px justify-center" @click="onSubmitA(editA)"
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="w88px justify-center"
|
||||||
|
@click="onSubmitA(editA)"
|
||||||
>确认</el-button
|
>确认</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -462,40 +455,6 @@
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editB.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editB.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editB.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editB.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1" />
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -504,7 +463,11 @@
|
||||||
</div>
|
</div>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -515,14 +478,18 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { getLabActList, getLabCsrActList, addLab, getCateList } from '@/api/daikin/base'
|
import {
|
||||||
|
getLabActList,
|
||||||
|
getLabCsrActList,
|
||||||
|
addLab,
|
||||||
|
getCateList
|
||||||
|
} from '@/api/daikin/base'
|
||||||
import Modify from './modifys.vue'
|
import Modify from './modifys.vue'
|
||||||
import ModifyPor from './modify.vue'
|
import ModifyPor from './modify.vue'
|
||||||
import ModifyList from './component/modify.vue'
|
import ModifyList from './component/modify.vue'
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
const ids = ref('')
|
const ids = ref('')
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
@ -735,9 +702,6 @@ async function onSubmitB(row: {
|
||||||
time: string
|
time: string
|
||||||
files: never[]
|
files: never[]
|
||||||
fileList: never[]
|
fileList: never[]
|
||||||
isTop?: any
|
|
||||||
isPublish?: any
|
|
||||||
publishTime?: any
|
|
||||||
}) {
|
}) {
|
||||||
// console.log(dataB.value, row.id)
|
// console.log(dataB.value, row.id)
|
||||||
dataB.value.map((obj) => {
|
dataB.value.map((obj) => {
|
||||||
|
|
@ -921,10 +885,16 @@ const handleDeleteC = (row: any) => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRemove: UploadProps['onRemove'] = (uploadFile: any, uploadFiles: any) => {
|
const handleRemove: UploadProps['onRemove'] = (
|
||||||
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
// console.log(uploadFile, uploadFiles)
|
// console.log(uploadFile, uploadFiles)
|
||||||
}
|
}
|
||||||
const handOnExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
const handOnExceed: UploadProps['onExceed'] = (
|
||||||
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
message.warning('最多只能上传一张图片!')
|
message.warning('最多只能上传一张图片!')
|
||||||
}
|
}
|
||||||
const handlePreview: UploadProps['onSuccess'] = (uploadFile: any) => {
|
const handlePreview: UploadProps['onSuccess'] = (uploadFile: any) => {
|
||||||
|
|
@ -988,7 +958,7 @@ const getUser = (id: any) => {
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const handleChild = (data: any) => {
|
const handleChild = (data: any) => {
|
||||||
const { showModal: show, multipleSelection } = data
|
const { showModal: show, multipleSelection } = data
|
||||||
showModal.value = unref(Boolean(show))
|
showModal.value = unref(show)
|
||||||
// userList.value = multipleSelection
|
// userList.value = multipleSelection
|
||||||
let userIdList: any[] = []
|
let userIdList: any[] = []
|
||||||
multipleSelection.value.forEach((i: { userId: any }) => {
|
multipleSelection.value.forEach((i: { userId: any }) => {
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useMessage, NModal, NSelect } from 'naive-ui'
|
import { useMessage, NModal, NSelect } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import {
|
import { getLabCsrActList, updateLab, getCateList, addLab, getLabActList,actLABDel,updateActOne,deleteCateItem ,editCateItem} from '@/api/daikin/base'
|
||||||
getLabCsrActList,
|
import { time } from 'echarts';
|
||||||
updateLab,
|
|
||||||
getCateList,
|
|
||||||
addLab,
|
|
||||||
getLabActList,
|
|
||||||
actLABDel,
|
|
||||||
updateActOne,
|
|
||||||
deleteCateItem,
|
|
||||||
editCateItem
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import { time } from 'echarts'
|
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
|
|
||||||
const ids = ref('')
|
const ids = ref('')
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
@ -30,7 +19,7 @@ onBeforeMount(async () => {
|
||||||
const { data: dataBot1 } = await getCateList({ indexId: 1 })
|
const { data: dataBot1 } = await getCateList({ indexId: 1 })
|
||||||
const { data: dataBot3 } = await getCateList({ indexId: 3 })
|
const { data: dataBot3 } = await getCateList({ indexId: 3 })
|
||||||
options.value = dataBot
|
options.value = dataBot
|
||||||
list.value.map((item) => {
|
list.value.map(item => {
|
||||||
if (item.id === 2) {
|
if (item.id === 2) {
|
||||||
item.options = dataBot
|
item.options = dataBot
|
||||||
}
|
}
|
||||||
|
|
@ -64,9 +53,11 @@ onBeforeMount(async () => {
|
||||||
// console.log( swiperList.value )
|
// console.log( swiperList.value )
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
|
|
||||||
async function onSubmitAdd() {
|
async function onSubmitAdd() {
|
||||||
console.log(swiperList.value)
|
console.log(swiperList.value)
|
||||||
let newData = swiperList.value.map((item) => {
|
let newData = swiperList.value.map((item) => {
|
||||||
|
|
@ -74,36 +65,37 @@ async function onSubmitAdd() {
|
||||||
const urls = item.fileList.map((file) => {
|
const urls = item.fileList.map((file) => {
|
||||||
if (file.response) {
|
if (file.response) {
|
||||||
return file.response.url
|
return file.response.url
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return file.url
|
return file.url
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
return { ...item, filePath: urls.join(',') }
|
return { ...item, filePath: urls.join(",") };
|
||||||
})
|
});
|
||||||
|
|
||||||
newData.forEach((item) => {
|
newData.forEach((item) => {
|
||||||
delete item.fileList
|
delete item.fileList;
|
||||||
})
|
});
|
||||||
// const data = JSON.stringify(newData)
|
// const data = JSON.stringify(newData)
|
||||||
console.log(newData)
|
console.log(newData)
|
||||||
|
|
||||||
const { code, msg } = await updateLab(newData)
|
const { code, msg } = await updateLab(newData)
|
||||||
// const { code, msg } = await editCateItem(newData)
|
// const { code, msg } = await editCateItem(newData)
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功") }
|
||||||
message.success('修改成功')
|
else message.warning(msg)
|
||||||
} else message.warning(msg)
|
|
||||||
// getSwiperList()
|
// getSwiperList()
|
||||||
// push({name:'Diffspace'})
|
// push({name:'Diffspace'})
|
||||||
|
|
||||||
}
|
}
|
||||||
async function onSubmit(row) {
|
async function onSubmit(row) {
|
||||||
// swiperList.value.push(row)
|
// swiperList.value.push(row)
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if (row.indexId === '') {
|
if (row.indexId === '') {
|
||||||
message.info('请选择分类选项!')
|
message.info("请选择分类选项!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!row.catId || row.catId === '') {
|
if (!row.catId || row.catId === '') {
|
||||||
message.info('请选择所属模块!')
|
message.info("请选择所属模块!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,13 +104,14 @@ async function onSubmit(row) {
|
||||||
if(row.fileList&&row.fileList.length>0){
|
if(row.fileList&&row.fileList.length>0){
|
||||||
if (row.fileList[0].response) {
|
if (row.fileList[0].response) {
|
||||||
row.filePath = row.fileList[0].response.url
|
row.filePath = row.fileList[0].response.url
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
row.filePath = row.fileList[0].url
|
row.filePath = row.fileList[0].url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const {msg,code} = await updateActOne(row)
|
const {msg,code} = await updateActOne(row)
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('操作成功')
|
message.success("操作成功")
|
||||||
getSwiperList()
|
getSwiperList()
|
||||||
}
|
}
|
||||||
// else message.warning(msg)
|
// else message.warning(msg)
|
||||||
|
|
@ -137,41 +130,19 @@ async function onSubmit(row) {
|
||||||
// }
|
// }
|
||||||
shomkB.value = false
|
shomkB.value = false
|
||||||
|
|
||||||
|
|
||||||
console.log(swiperList.value)
|
console.log(swiperList.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitAdds() {
|
async function onSubmitAdds() {
|
||||||
|
|
||||||
const actTopUserList = unref(actTopUserLists.value)
|
const actTopUserList = unref(actTopUserLists.value)
|
||||||
const actMidUserList = unref(actMidUserLists.value)
|
const actMidUserList = unref(actMidUserLists.value)
|
||||||
const actDownUserList = unref(actDownUserLists.value)
|
const actDownUserList = unref(actDownUserLists.value)
|
||||||
const {
|
const { id, bannerUserList, leftUserList, rightUserList, memberUserList, bannerContent, leftContent, rightContent, memberContent } = Data.value
|
||||||
id,
|
const { code, msg } = await addLab({ id, bannerUserList, leftUserList, rightUserList, memberUserList, bannerContent, leftContent, rightContent, memberContent, actTopUserList, actMidUserList, actDownUserList })
|
||||||
bannerUserList,
|
if (code === 200) { message.success("修改成功") }
|
||||||
leftUserList,
|
else message.warning(msg)
|
||||||
rightUserList,
|
|
||||||
memberUserList,
|
|
||||||
bannerContent,
|
|
||||||
leftContent,
|
|
||||||
rightContent,
|
|
||||||
memberContent
|
|
||||||
} = Data.value
|
|
||||||
const { code, msg } = await addLab({
|
|
||||||
id,
|
|
||||||
bannerUserList,
|
|
||||||
leftUserList,
|
|
||||||
rightUserList,
|
|
||||||
memberUserList,
|
|
||||||
bannerContent,
|
|
||||||
leftContent,
|
|
||||||
rightContent,
|
|
||||||
memberContent,
|
|
||||||
actTopUserList,
|
|
||||||
actMidUserList,
|
|
||||||
actDownUserList
|
|
||||||
})
|
|
||||||
if (code === 200) {
|
|
||||||
message.success('修改成功')
|
|
||||||
} else message.warning(msg)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const shomkB = ref(false)
|
const shomkB = ref(false)
|
||||||
|
|
@ -180,16 +151,20 @@ const shomksB = () => {
|
||||||
console.log(shomkB.value)
|
console.log(shomkB.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
let swiperList = ref([])
|
|
||||||
|
let swiperList = ref([
|
||||||
|
|
||||||
|
])
|
||||||
const editList = ref()
|
const editList = ref()
|
||||||
const handleEdit = (index: number, row: any) => {
|
const handleEdit = (index: number, row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if (row && row.url) {
|
if (row && row.url) {
|
||||||
console.log(row.files.length)
|
console.log(row.files.length)
|
||||||
if (row.files.length <= 0) {
|
if (row.files.length <= 0) {
|
||||||
row.files.push({ url: row.url })
|
row.files.push({ url: row.url });
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
editList.value = {
|
editList.value = {
|
||||||
id: '',
|
id: '',
|
||||||
indexId: '1',
|
indexId: '1',
|
||||||
|
|
@ -205,53 +180,43 @@ const handleEdit = (index: number, row: any) => {
|
||||||
|
|
||||||
console.log(row)
|
console.log(row)
|
||||||
}
|
}
|
||||||
const list = ref([
|
const list = ref([{
|
||||||
{
|
|
||||||
id: 1,
|
id: 1,
|
||||||
title: '部品业种',
|
title: '部品业种',
|
||||||
options: [
|
options: [{ id: '1', cateName: 'DEVICE' }, { id: '2', cateName: '加工品' }, { id: '3', cateName: '原材料' }]
|
||||||
{ id: '1', cateName: 'DEVICE' },
|
|
||||||
{ id: '2', cateName: '加工品' },
|
|
||||||
{ id: '3', cateName: '原材料' }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
title: '走访类型',
|
title: '走访类型',
|
||||||
options: [
|
options: [{ id: '1', cateName: '供方走访' }, { id: '2', cateName: '展会走访' }, { id: '3', cateName: '企业走访' }]
|
||||||
{ id: '1', cateName: '供方走访' },
|
|
||||||
{ id: '2', cateName: '展会走访' },
|
|
||||||
{ id: '3', cateName: '企业走访' }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
title: '探索方向',
|
title: '探索方向',
|
||||||
options: []
|
options: []
|
||||||
}
|
},
|
||||||
])
|
])
|
||||||
const opt = ref()
|
const opt = ref()
|
||||||
const radioClick = (e) => {
|
const radioClick = (e) => {
|
||||||
opt.value = list.value.find((item) => item.id == e)
|
opt.value = list.value.find(item => item.id == e)
|
||||||
// console.log(ll)
|
// console.log(ll)
|
||||||
}
|
}
|
||||||
const handleDelete = async (index: number, row: any) => {
|
const handleDelete = async (index: number, row: any) => {
|
||||||
swiperList.value = swiperList.value.filter((item) => item.id !== row.id)
|
swiperList.value = swiperList.value.filter(item => item.id !== row.id);
|
||||||
const id = row.id
|
const id = row.id
|
||||||
|
|
||||||
if(!id) return
|
if(!id) return
|
||||||
|
|
||||||
const {code,msg} =await actLABDel({id})
|
const {code,msg} =await actLABDel({id})
|
||||||
if (code === 200) {
|
if(code===200){message.info("操作成功!")}
|
||||||
message.info('操作成功!')
|
else{
|
||||||
} else {
|
|
||||||
message.error(msg)
|
message.error(msg)
|
||||||
}
|
}
|
||||||
getSwiperList()
|
getSwiperList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handOnExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
const handOnExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
||||||
message.warning('最多只能上传一个文件!')
|
message.warning("最多只能上传一个文件!")
|
||||||
}
|
}
|
||||||
|
|
||||||
const header = { 'token': store.user.token }
|
const header = { 'token': store.user.token }
|
||||||
|
|
@ -267,6 +232,7 @@ const getUser = (id: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const handleChild = (data: any) => {
|
const handleChild = (data: any) => {
|
||||||
const { showModal: show, multipleSelection } = data
|
const { showModal: show, multipleSelection } = data
|
||||||
|
|
@ -274,31 +240,32 @@ const handleChild = (data: any) => {
|
||||||
// userList.value = multipleSelection
|
// userList.value = multipleSelection
|
||||||
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 (flg.value === 1) {
|
if (flg.value === 1) {
|
||||||
actTopUserLists.value = userIdList
|
actTopUserLists.value = userIdList
|
||||||
// actDownUserLists.value = userIdList
|
// actDownUserLists.value = userIdList
|
||||||
// actMidUserLists.value = userIdList
|
// actMidUserLists.value = userIdList
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
actMidUserLists.value = userIdList
|
actMidUserLists.value = userIdList
|
||||||
}
|
}
|
||||||
console.log(userIdList)
|
console.log(userIdList)
|
||||||
onSubmitAdds()
|
onSubmitAdds()
|
||||||
|
|
||||||
}
|
}
|
||||||
const CloseThiss = (data: boolean) => {
|
const CloseThiss = (data: boolean) => {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
}
|
}
|
||||||
const value = ref()
|
const value = ref()
|
||||||
const optt = [
|
const optt = [{ id: '1', cateName: '核心部品强化' }, { id: '2', cateName: '新领域部材探索' }, { id: '3', cateName: '外部调研报告' }]
|
||||||
{ id: '1', cateName: '核心部品强化' },
|
|
||||||
{ id: '2', cateName: '新领域部材探索' },
|
|
||||||
{ id: '3', cateName: '外部调研报告' }
|
|
||||||
]
|
|
||||||
const listData = ref()
|
const listData = ref()
|
||||||
const thisSelect = (e) => {
|
const thisSelect = (e) => {
|
||||||
|
|
||||||
pageInfo.index = e
|
pageInfo.index = e
|
||||||
|
|
||||||
}
|
}
|
||||||
const thisSelects = () => {
|
const thisSelects = () => {
|
||||||
pageInfo.index = ''
|
pageInfo.index = ''
|
||||||
|
|
@ -311,36 +278,29 @@ const pageInfo = reactive({
|
||||||
index:''
|
index:''
|
||||||
})
|
})
|
||||||
const ss = computed(() => [pageInfo.index,pageInfo.currentPage])
|
const ss = computed(() => [pageInfo.index,pageInfo.currentPage])
|
||||||
watch(
|
watch(() => unref(ss),
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
async (v) => {
|
||||||
|
|
||||||
getSwiperList()
|
getSwiperList()
|
||||||
|
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true },
|
||||||
)
|
)
|
||||||
|
|
||||||
async function getSwiperList() {
|
async function getSwiperList() {
|
||||||
const indexId = pageInfo.index
|
const indexId = pageInfo.index
|
||||||
const { rows, total } = await getLabCsrActList({
|
const { rows,total } = await getLabCsrActList({ indexId,pageNum:pageInfo.currentPage,pageSize:pageInfo.pageSize })
|
||||||
indexId,
|
|
||||||
pageNum: pageInfo.currentPage,
|
|
||||||
pageSize: pageInfo.pageSize
|
|
||||||
})
|
|
||||||
pageInfo.total = total
|
pageInfo.total = total
|
||||||
if (!rows) return
|
if (!rows) return
|
||||||
const datas = rows.map((item: any) =>
|
const datas = rows.map((item: any) => Object.assign(item, {
|
||||||
Object.assign(item, {
|
indexId: item.indexId + '',
|
||||||
indexId: item.indexId + ''
|
}))
|
||||||
})
|
|
||||||
)
|
|
||||||
swiperList.value = datas
|
swiperList.value = datas
|
||||||
swiperList.value = datas.map((item: { filePathList: any[] }) => {
|
swiperList.value = datas.map((item: { filePathList: any[] }) => {
|
||||||
const fileList = item.filePathList.map((itt: any) =>
|
const fileList = item.filePathList.map((itt: any) => Object.assign(itt, {
|
||||||
Object.assign(itt, {
|
|
||||||
name: itt.originalFileName,
|
name: itt.originalFileName,
|
||||||
url: itt.url
|
url: itt.url
|
||||||
})
|
}))
|
||||||
)
|
|
||||||
return { ...item, fileList }
|
return { ...item, fileList }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -351,40 +311,24 @@ const handleSizeChange = (e) => {
|
||||||
const handleCurrentChange=(e)=>{
|
const handleCurrentChange=(e)=>{
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="relative w-full h-full">
|
<div class="relative w-full h-full">
|
||||||
<div class="flex my20px">
|
<div class="flex my20px">
|
||||||
|
|
||||||
<el-button type="primary" @click="handleEdit" class="mr-20px">新增研究方向内容</el-button>
|
<el-button type="primary" @click="handleEdit" class="mr-20px">新增研究方向内容</el-button>
|
||||||
<div class="leading-30px w125px h50px ml20px">请选择类别:</div>
|
<div class="leading-30px w125px h50px ml20px">请选择类别:</div>
|
||||||
<n-select
|
<n-select class="w250px" size="large" v-if="optt" :show-arrow="false" :show-checkmark="false" v-model:value="value" :options="optt" label-field="cateName"
|
||||||
class="w250px"
|
value-field="id" @update:value="thisSelect" />
|
||||||
size="large"
|
|
||||||
v-if="optt"
|
|
||||||
:show-arrow="false"
|
|
||||||
:show-checkmark="false"
|
|
||||||
v-model:value="value"
|
|
||||||
:options="optt"
|
|
||||||
label-field="cateName"
|
|
||||||
value-field="id"
|
|
||||||
@update:value="thisSelect"
|
|
||||||
/>
|
|
||||||
<el-button type="primary" @click="thisSelects" class="ml-20px mt5px">重置</el-button>
|
<el-button type="primary" @click="thisSelects" class="ml-20px mt5px">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="swiperList" style="width: 100%,height: 600px;overflow-y: auto;"
|
||||||
:data="swiperList"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 100%,height: 600px;overflow-y: auto;"
|
:cell-style="{ 'text-align': 'center','overflow-y':'auto' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
|
||||||
>
|
|
||||||
<el-table-column label="标题" prop="title" />
|
<el-table-column label="标题" prop="title" />
|
||||||
<el-table-column label="分类选项" width="280">
|
<el-table-column label="分类选项" width="280">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -401,6 +345,7 @@ const handleCurrentChange = (e) => {
|
||||||
{{ it.name }}
|
{{ it.name }}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="通知范围" prop="fileList" >
|
<!-- <el-table-column label="通知范围" prop="fileList" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -413,14 +358,14 @@ const handleCurrentChange = (e) => {
|
||||||
<el-table-column label="操作" :header-style="{ background: 'red' }">
|
<el-table-column label="操作" :header-style="{ background: 'red' }">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)"
|
<el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-200px">
|
<div class="my20px fixed bottom-25px left-20% z-2000 h50px w-200px">
|
||||||
<!-- <el-button type="primary" @click="onSubmitAdd">提交数据</el-button> -->
|
<!-- <el-button type="primary" @click="onSubmitAdd">提交数据</el-button> -->
|
||||||
|
|
@ -430,17 +375,16 @@ const handleCurrentChange = (e) => {
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class=" fixed bottom-65px right-100px ">
|
<div class=" fixed bottom-65px right-100px ">
|
||||||
<el-pagination
|
<el-pagination v-model:current-page="pageInfo.currentPage" v-model:page-size="pageInfo.pageSize"
|
||||||
v-model:current-page="pageInfo.currentPage"
|
layout="prev, pager, next, jumper" :total="pageInfo.total"
|
||||||
v-model:page-size="pageInfo.pageSize"
|
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||||
layout="prev, pager, next, jumper"
|
|
||||||
:total="pageInfo.total"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="shomkB">
|
<n-modal v-model:show="shomkB">
|
||||||
|
|
||||||
<div class="bg-#FFF p30px">
|
<div class="bg-#FFF p30px">
|
||||||
<el-form :model="editList" label-width="120px" :inline="true">
|
<el-form :model="editList" label-width="120px" :inline="true">
|
||||||
<el-form-item label="分类选项">
|
<el-form-item label="分类选项">
|
||||||
|
|
@ -450,72 +394,26 @@ const handleCurrentChange = (e) => {
|
||||||
<el-radio label="3" size="large">外部调研报告</el-radio>
|
<el-radio label="3" size="large">外部调研报告</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item :label="opt.title">
|
<el-form-item :label="opt.title">
|
||||||
<n-select
|
<n-select class="min-w220px" size="large" v-if="opt.options" v-model:value="editList.catId"
|
||||||
class="min-w220px"
|
:options="opt.options" label-field="cateName" value-field="cateName" />
|
||||||
v-if="opt.options"
|
|
||||||
v-model:value="editList.catId"
|
|
||||||
:options="opt.options"
|
|
||||||
label-field="cateName"
|
|
||||||
value-field="cateName"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="标题">
|
<el-form-item label="标题">
|
||||||
<el-input v-model="editList.title" />
|
<el-input v-model="editList.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editList.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editList.fileList"
|
action="/test-api/common/upload" :on-change="handleChange" :on-exceed="handOnExceed" :limit="1">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
:on-change="handleChange"
|
|
||||||
:on-exceed="handOnExceed"
|
|
||||||
:limit="1"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editList.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editList.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editList.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editList.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editList.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit(editList)">确认</el-button>
|
<el-button type="primary" @click="onSubmit(editList)">确认</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 621 KiB |
|
|
@ -30,17 +30,8 @@ const props = defineProps({
|
||||||
<div class="containers" v-html="content"></div>
|
<div class="containers" v-html="content"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
|
||||||
.containers a {
|
|
||||||
line-break: anywhere;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::deep(.containers) {
|
|
||||||
a {
|
|
||||||
line-break: anywhere;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.news-wrapper {
|
.news-wrapper {
|
||||||
.title {
|
.title {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
<!-- 外部情报 -->
|
<!-- 外部情报 -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// import Vue3Tinymce from '@jsdawn/vue3-tinymce';
|
// import Vue3Tinymce from '@jsdawn/vue3-tinymce';
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from "@/views/home/components/HomeHead.vue";
|
||||||
import UserPage from '../../../home/intelligence/process/UserPages.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from "@/views/home/hooks/useDate";
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NForm,
|
NForm,
|
||||||
|
|
@ -15,38 +14,37 @@ import {
|
||||||
NSelect,
|
NSelect,
|
||||||
NSpace,
|
NSpace,
|
||||||
NRadioGroup,
|
NRadioGroup,
|
||||||
useMessage
|
useMessage,
|
||||||
// FormInst,
|
// FormInst,
|
||||||
} from 'naive-ui'
|
} from "naive-ui";
|
||||||
import { saveArticle, trendsDetail } from '@/api/daikin/base'
|
import { saveArticle, trendsDetail } from "@/api/daikin/base";
|
||||||
import Editor from '../components/TinyECE.vue'
|
import Editor from "../components/TinyECE.vue";
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
import { pickerOptions } from '@/utils/date'
|
import { useRoute } from "vue-router";
|
||||||
import { useRoute } from 'vue-router'
|
const { day, week } = useDate();
|
||||||
const { day, week } = useDate()
|
const { push } = useRouter();
|
||||||
const { push } = useRouter()
|
const store = useUserStore();
|
||||||
const store = useUserStore()
|
let route = useRoute();
|
||||||
let route = useRoute()
|
let cate = ref(1);
|
||||||
let cate = ref(1)
|
const fileList = ref<[]>();
|
||||||
const fileList = ref<[]>()
|
const editorContent = ref("");
|
||||||
const editorContent = ref('')
|
const formRef = ref<any | null>(null);
|
||||||
const formRef = ref<any | null>(null)
|
const message = useMessage();
|
||||||
const message = useMessage()
|
|
||||||
|
|
||||||
const formValue: any = ref({
|
const formValue: any = ref({
|
||||||
type: '1',
|
type: "1",
|
||||||
cate: '1',
|
cate: "1",
|
||||||
title: '',
|
title: "",
|
||||||
tag: '',
|
tag: "",
|
||||||
source: '',
|
source: "",
|
||||||
content: '',
|
content: "",
|
||||||
reviewSource: '2'
|
reviewSource: "2",
|
||||||
})
|
});
|
||||||
|
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
trendsDetail(route.query.id).then((res) => {
|
trendsDetail(route.query.id).then((res) => {
|
||||||
let data = res.data
|
let data = res.data;
|
||||||
console.log(res)
|
console.log(res);
|
||||||
formValue.value = {
|
formValue.value = {
|
||||||
type: data.type,
|
type: data.type,
|
||||||
cate: data.cate,
|
cate: data.cate,
|
||||||
|
|
@ -54,34 +52,34 @@ if (route.query.id) {
|
||||||
tag: data.tag,
|
tag: data.tag,
|
||||||
source: data.source,
|
source: data.source,
|
||||||
content: unescapeHTML(data.content),
|
content: unescapeHTML(data.content),
|
||||||
reviewSource: data.reviewSource
|
reviewSource: data.reviewSource,
|
||||||
}
|
};
|
||||||
editorContent.value = unescapeHTML(data.content)
|
editorContent.value = unescapeHTML(data.content);
|
||||||
|
|
||||||
if (data.type === 2) {
|
if (data.type === 2) {
|
||||||
cate.value = 3
|
cate.value = 3;
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
console.log(cate.value, data.cate)
|
console.log(cate.value, data.cate);
|
||||||
rules = {
|
rules = {
|
||||||
title: {
|
title: {
|
||||||
required: false,
|
required: false,
|
||||||
message: '请输入标题',
|
message: "请输入标题",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
tag: {
|
tag: {
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入标题',
|
message: "请输入标题",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
|
|
||||||
content: {
|
content: {
|
||||||
required: false,
|
required: false,
|
||||||
message: '请输入内容',
|
message: "请输入内容",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
let rules: any = {
|
let rules: any = {
|
||||||
// cate: {
|
// cate: {
|
||||||
|
|
@ -91,146 +89,123 @@ let rules: any = {
|
||||||
// },
|
// },
|
||||||
title: {
|
title: {
|
||||||
required: false,
|
required: false,
|
||||||
message: '请输入标题',
|
message: "请输入标题",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
tag: {
|
tag: {
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入标题',
|
message: "请输入标题",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
|
|
||||||
content: {
|
content: {
|
||||||
required: false,
|
required: false,
|
||||||
message: '请输入内容',
|
message: "请输入内容",
|
||||||
trigger: 'blur'
|
trigger: "blur",
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
function change(i: any) {
|
function change(i: any) {
|
||||||
// console.log(i)
|
// console.log(i)
|
||||||
cate.value = i
|
cate.value = i;
|
||||||
// console.log(formValue.cate)
|
// console.log(formValue.cate)
|
||||||
formValue.cate = i
|
formValue.cate = i;
|
||||||
// console.log(formValue.cate)
|
// console.log(formValue.cate)
|
||||||
}
|
}
|
||||||
function sure(e: MouseEvent) {
|
function sure(e: MouseEvent) {
|
||||||
e.preventDefault()
|
e.preventDefault();
|
||||||
formRef.value?.validate((errors) => {
|
formRef.value?.validate((errors) => {
|
||||||
if (!errors) {
|
if (!errors) {
|
||||||
formValue.value.cate = cate.value
|
formValue.value.cate = cate.value;
|
||||||
if (!formValue.value.type) {
|
if (!formValue.value.type) {
|
||||||
message.success('请选择类型')
|
message.success("请选择类型");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// console.log('我草555555', editorContent.value);
|
// console.log('我草555555', editorContent.value);
|
||||||
save()
|
save();
|
||||||
} else {
|
} else {
|
||||||
console.log(errors)
|
console.log(errors);
|
||||||
message.error('请输入完整')
|
message.error("请输入完整");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapeHTML(html: string): string {
|
function escapeHTML(html: string): string {
|
||||||
const tempElement = document.createElement('div')
|
const tempElement = document.createElement("div");
|
||||||
tempElement.textContent = html
|
tempElement.textContent = html;
|
||||||
return tempElement.innerHTML
|
return tempElement.innerHTML;
|
||||||
}
|
}
|
||||||
function unescapeHTML(html: string) {
|
function unescapeHTML(html: string) {
|
||||||
const doc = new DOMParser().parseFromString(html, 'text/html')
|
const doc = new DOMParser().parseFromString(html, "text/html");
|
||||||
return doc.documentElement.textContent
|
return doc.documentElement.textContent;
|
||||||
}
|
}
|
||||||
const header = { token: store.user.token }
|
const header = { token: store.user.token };
|
||||||
// console.log(store.user.token)
|
// console.log(store.user.token)
|
||||||
|
|
||||||
const dialogImageUrl = ref('')
|
const dialogImageUrl = ref("");
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
const handleRemove: UploadProps['onRemove'] = (uploadFile: any, uploadFiles: any) => {
|
const handleRemove: UploadProps["onRemove"] = (
|
||||||
|
uploadFile: any,
|
||||||
|
uploadFiles: any
|
||||||
|
) => {
|
||||||
// console.log(dialogImageUrl,dialogVisible)
|
// console.log(dialogImageUrl,dialogVisible)
|
||||||
}
|
};
|
||||||
|
|
||||||
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile: { url: string }) => {
|
const handlePictureCardPreview: UploadProps["onPreview"] = (uploadFile: {
|
||||||
dialogImageUrl.value = uploadFile.url!
|
url: string;
|
||||||
dialogVisible.value = true
|
}) => {
|
||||||
|
dialogImageUrl.value = uploadFile.url!;
|
||||||
|
dialogVisible.value = true;
|
||||||
// console.log(dialogImageUrl.value)
|
// console.log(dialogImageUrl.value)
|
||||||
}
|
};
|
||||||
async function save() {
|
async function save() {
|
||||||
const cont = editorContent.value
|
const cont = editorContent.value;
|
||||||
const content = escapeHTML(cont)
|
const content = escapeHTML(cont);
|
||||||
const reviewSource = 2
|
const reviewSource = 2;
|
||||||
// console.log(fileList.value)
|
// console.log(fileList.value)
|
||||||
let bannerImg
|
let bannerImg;
|
||||||
if (fileList.value && fileList.value.length > 0) {
|
if (fileList.value && fileList.value.length > 0) {
|
||||||
bannerImg = fileList.value.map((item) => item.response.url).join('')
|
bannerImg = fileList.value.map((item) => item.response.url).join("");
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
let userIdList: any[] = []
|
console.log(formValue.value);
|
||||||
if (dataList.value?.length > 0) {
|
|
||||||
dataList.value.forEach((i: { userId: any }) => {
|
|
||||||
userIdList.push(i.userId)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const { title, tag, source, cate, type, isTop, isPublish, publishTime } = formValue.value
|
const { title, tag, source, cate, type } = formValue.value;
|
||||||
console.log(cate)
|
console.log(cate);
|
||||||
const { msg, code } = await saveArticle({
|
const { msg, code } = await saveArticle({
|
||||||
title,
|
title,
|
||||||
tag: '',
|
tag: "",
|
||||||
reviewSource,
|
reviewSource,
|
||||||
source,
|
source,
|
||||||
cate: formValue.cate || formValue.value.cate,
|
cate: formValue.cate || formValue.value.cate,
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
bannerImg,
|
bannerImg,
|
||||||
userIdList,
|
});
|
||||||
isTop,
|
|
||||||
isPublish,
|
|
||||||
publishTime
|
|
||||||
})
|
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('新增成功')
|
message.success("新增成功");
|
||||||
// window.location.reload();
|
// window.location.reload();
|
||||||
history.back()
|
history.back();
|
||||||
} else {
|
} else {
|
||||||
message.success(msg)
|
message.success(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const handleChild = (data: string) => {
|
const handleChild = (data: string) => {
|
||||||
editorContent.value = data
|
editorContent.value = data;
|
||||||
}
|
};
|
||||||
|
|
||||||
const radios = (e: any) => {
|
const radios = (e: any) => {
|
||||||
console.log(e.srcElement.value)
|
console.log(e.srcElement.value);
|
||||||
if (e.srcElement.value === '1') {
|
if (e.srcElement.value === "1") {
|
||||||
cate.value = 1
|
cate.value = 1;
|
||||||
} else {
|
} else {
|
||||||
cate.value = 4
|
cate.value = 4;
|
||||||
}
|
|
||||||
}
|
|
||||||
const showModal = ref(false)
|
|
||||||
const showModal1 = ref(false)
|
|
||||||
|
|
||||||
const setUserList = ref()
|
|
||||||
const dataList = ref()
|
|
||||||
const thisClick = () => {
|
|
||||||
showModal1.value = true
|
|
||||||
setUserList.value = dataList.value || []
|
|
||||||
}
|
|
||||||
const CloseThis = (data: boolean) => {
|
|
||||||
showModal1.value = data
|
|
||||||
}
|
|
||||||
const handleChild1 = (data: any) => {
|
|
||||||
const { showModal: show, multipleSelection } = data
|
|
||||||
showModal1.value = unref(show)
|
|
||||||
dataList.value = unref(multipleSelection)
|
|
||||||
}
|
|
||||||
const handleClose = (tag: any) => {
|
|
||||||
dataList.value.splice(dataList.value.indexOf(tag), 1)
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
const showModal = ref(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -357,64 +332,16 @@ const handleClose = (tag: any) => {
|
||||||
<n-input v-model:value="formValue.source" placeholder="" />
|
<n-input v-model:value="formValue.source" placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="情报内容" path="content">
|
<n-form-item label="情报内容" path="content">
|
||||||
<Editor @getChildData="handleChild" v-model="formValue.content"></Editor>
|
<Editor
|
||||||
</n-form-item>
|
@getChildData="handleChild"
|
||||||
<n-button @click="thisClick"> 情报公开范围 </n-button>
|
v-model="formValue.content"
|
||||||
<div class="mt15px h150px overflow-y-auto">
|
></Editor>
|
||||||
<el-tag
|
|
||||||
v-for="i in dataList"
|
|
||||||
:key="i"
|
|
||||||
class="mx-1 my5px"
|
|
||||||
closable
|
|
||||||
:disable-transitions="false"
|
|
||||||
@close="handleClose(i)"
|
|
||||||
type="info"
|
|
||||||
size="large"
|
|
||||||
>
|
|
||||||
{{ i.nickName }}
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
|
||||||
<n-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
inactive-value="N"
|
|
||||||
active-value="Y"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (formValue.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item label="发布时间" v-if="formValue.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formValue.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
<div>
|
<div>
|
||||||
<n-button @click="showModal = true"> 文本内容预览</n-button>
|
<n-button @click="showModal = true"> 文本内容预览</n-button>
|
||||||
</div>
|
</div>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<!-- <n-form-item>
|
|
||||||
<div>
|
|
||||||
<el-button type="primary" @click="thisClick"> {{'查看范围'}}</el-button>
|
|
||||||
</div>
|
|
||||||
</n-form-item> -->
|
|
||||||
</n-form>
|
</n-form>
|
||||||
<n-button
|
<n-button
|
||||||
attr-type="button"
|
attr-type="button"
|
||||||
|
|
@ -427,19 +354,12 @@ const handleClose = (tag: any) => {
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="showModal">
|
<n-modal v-model:show="showModal">
|
||||||
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
||||||
<div class="overflow-y-auto h800px container" v-html="editorContent"></div>
|
<div
|
||||||
|
class="overflow-y-auto h800px container"
|
||||||
|
v-html="editorContent"
|
||||||
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<n-modal v-model:show="showModal1">
|
|
||||||
<!-- <n-card style="width:1100px; height: 800px;" title="调达中心" :bordered="false" size="huge" role="dialog"
|
|
||||||
aria-modal="true"> -->
|
|
||||||
<UserPage
|
|
||||||
:userDataList="setUserList"
|
|
||||||
@clickChild="handleChild1"
|
|
||||||
@CloseThis="CloseThis"
|
|
||||||
></UserPage>
|
|
||||||
<!-- </n-card> -->
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import Editor from './TinyECE.vue'
|
import Editor from './TinyECE.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
|
||||||
import type { FormInst } from 'naive-ui'
|
import type { FormInst } from 'naive-ui'
|
||||||
import { useMessage } from 'naive-ui'
|
import { useMessage } from 'naive-ui'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
@ -26,19 +25,6 @@ import { useUserStore } from '@/stores/modules/user'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const not = noticeld()
|
|
||||||
|
|
||||||
const toDetail2 = (id: any) => {
|
|
||||||
not.article.cate = id
|
|
||||||
console.log(not.article.cate)
|
|
||||||
// push(`${route.path.replace('/external','')}/info/${n.id}`)
|
|
||||||
push('/external/Board')
|
|
||||||
}
|
|
||||||
|
|
||||||
const userCode = ref(false)
|
|
||||||
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -52,34 +38,9 @@ userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item)
|
||||||
<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>
|
||||||
<el-dropdown>
|
|
||||||
<div class="text-#fff" style="margin-right: 8px" v-if="userCode">
|
|
||||||
<div class="add text-18px px13px py11px cursor-pointer">外部审批流程</div>
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
|
||||||
<el-dropdown-menu>
|
|
||||||
<el-dropdown-item @click="push({ path: '/external/Process' })">News</el-dropdown-item>
|
|
||||||
<el-dropdown-item @click="push({ path: '/external/Process', query: { cate: '8' } })"
|
|
||||||
>重要通知</el-dropdown-item
|
|
||||||
>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</template>
|
|
||||||
</el-dropdown>
|
|
||||||
<el-dropdown>
|
|
||||||
<div class="text-#fff" style="margin-right: 28px" v-if="userCode">
|
|
||||||
<div class="add text-18px px13px py11px cursor-pointer">外部新增 +</div>
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
|
||||||
<el-dropdown-menu>
|
|
||||||
<el-dropdown-item @click="toDetail2(7)">News</el-dropdown-item>
|
|
||||||
<el-dropdown-item @click="toDetail2(8)">重要通知</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</template>
|
|
||||||
</el-dropdown>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
v-if="store.user.isPublish === 1 || store.user.roleCode?.includes('zhuxi')"
|
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="add text-18px px13px py11px cursor-pointer"
|
class="add text-18px px13px py11px cursor-pointer"
|
||||||
|
|
@ -90,7 +51,7 @@ userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item)
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
v-if="store.user.isPublish === 1 || store.user.roleCode?.includes('zhuxi')"
|
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="add text-18px px13px py11px cursor-pointer"
|
class="add text-18px px13px py11px cursor-pointer"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@ import { useUserStore } from '@/stores/modules/user'
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import { getNoticeList, deleteWithdraw, getManagerList } from '@/api/daikin/base'
|
import {
|
||||||
|
getNoticeList,
|
||||||
|
deleteWithdraw,
|
||||||
|
getManagerList
|
||||||
|
} from '@/api/daikin/base'
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
import { noticeld } from '@/stores/modules/noticeId'
|
||||||
import { getImg } from '../images'
|
import { getImg } from '../images'
|
||||||
import { NTag } from 'naive-ui'
|
import { NTag } from 'naive-ui'
|
||||||
|
|
@ -79,7 +83,7 @@ const clickTo = (data: any) => {
|
||||||
store.article.noticeld = noticeId
|
store.article.noticeld = noticeId
|
||||||
if (
|
if (
|
||||||
[1, 2].includes(reviewStatus) &&
|
[1, 2].includes(reviewStatus) &&
|
||||||
['review_person', 'zhuxi', 'tech_service'].some((item) => store2.user.roleCode?.includes(item))
|
['review_person', 'zhuxi', 'tech_service'].includes(store2.user.roleCode)
|
||||||
) {
|
) {
|
||||||
push(`/Home/Process/ProcessInfo/${id}`)
|
push(`/Home/Process/ProcessInfo/${id}`)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -204,7 +208,9 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="text-18px">{{ week }}</div>
|
<div class="text-18px">{{ week }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
|
<div
|
||||||
|
class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
||||||
<el-tab-pane name="2">
|
<el-tab-pane name="2">
|
||||||
|
|
@ -215,8 +221,8 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
name="3"
|
name="3"
|
||||||
v-if="
|
v-if="
|
||||||
['review_person', 'zhuxi', 'tech_service'].some((item) =>
|
['review_person', 'zhuxi', 'tech_service'].includes(
|
||||||
store2.user.roleCode?.includes(item)
|
store2.user.roleCode
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
@ -342,20 +348,28 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="i.firstReviewName">
|
<el-dropdown-item v-if="i.firstReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
<span class="min-w120px"
|
||||||
|
>初审人:{{ i.firstReviewName }}</span
|
||||||
|
>
|
||||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
<span class="min-w120px"
|
||||||
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
>终审人:{{ i.ultimateReviewName }}</span
|
||||||
|
>
|
||||||
|
<span class="ml20px"
|
||||||
|
>终审时间:{{ i.ultimateReviewTime }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
||||||
|
i.createTime
|
||||||
|
}}</span>
|
||||||
<span
|
<span
|
||||||
v-if="store2.user.isReview > 0 && i.publishName"
|
v-if="store2.user.isReview > 0 && i.publishName"
|
||||||
class="ml20px text-#808696 text-16px flex-1"
|
class="ml20px text-#808696 text-16px flex-1"
|
||||||
|
|
@ -363,7 +377,7 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
['publish', 'tech_service'].some((item) => store2.user.roleCode?.includes(item)) &&
|
['publish', 'tech_service'].includes(store2.user.roleCode) &&
|
||||||
Status.reviewStatus === 1
|
Status.reviewStatus === 1
|
||||||
"
|
"
|
||||||
class="absolute right-10px top-18px"
|
class="absolute right-10px top-18px"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import UserPage from './UserPages.vue'
|
import UserPage from './UserPages.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import { getArticleDetail, review } from '@/api/daikin/base'
|
import { getArticleDetail, review } from '@/api/daikin/base'
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NCard,
|
NCard,
|
||||||
|
|
@ -60,8 +59,6 @@ let formValue: any = ref({
|
||||||
source: '',
|
source: '',
|
||||||
content: '',
|
content: '',
|
||||||
isTop: 'N',
|
isTop: 'N',
|
||||||
isPublish: 0,
|
|
||||||
publishTime: '',
|
|
||||||
bannerImg: ''
|
bannerImg: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -425,37 +422,6 @@ const showModalRefs = ref(false)
|
||||||
{{ i.nickName }}
|
{{ i.nickName }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<!-- <n-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item> -->
|
|
||||||
<n-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="formValue.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (formValue.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</n-form-item>
|
|
||||||
<n-form-item label="发布时间" v-if="formValue.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="formValue.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</n-form-item>
|
|
||||||
<div class="text-end float-right block h50px pt10px">
|
<div class="text-end float-right block h50px pt10px">
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
<n-button attr-type="button" style="padding: 0 20px" @click="submitSave(2)">
|
<n-button attr-type="button" style="padding: 0 20px" @click="submitSave(2)">
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ async function getTree() {
|
||||||
if (data && data != 'null' && data.length > 0) {
|
if (data && data != 'null' && data.length > 0) {
|
||||||
treeData.value = data
|
treeData.value = data
|
||||||
}
|
}
|
||||||
|
console.log(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -66,13 +67,11 @@ async function getUserPage() {
|
||||||
}, 150)
|
}, 150)
|
||||||
}
|
}
|
||||||
|
|
||||||
function selection(list = uniqBy(props.userDataList, 'userId')) {
|
function selection(list = props.userDataList) {
|
||||||
console.log('🚀 ~ file: UserPages.vue:79 ~ list:', toRaw(list))
|
|
||||||
if (userData.value && list) {
|
if (userData.value && list) {
|
||||||
const commonItems = userData.value.filter((item1: { userId: any }) =>
|
const commonItems = userData.value.filter((item1: { userId: any }) =>
|
||||||
list.some((item2) => item2.userId === item1.userId)
|
list.some((item2) => item2.userId === item1.userId)
|
||||||
)
|
)
|
||||||
|
|
||||||
toggleSelection(commonItems)
|
toggleSelection(commonItems)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +108,7 @@ const multipleSelection = ref<[]>([])
|
||||||
const multipleSelectionObj: any = {}
|
const multipleSelectionObj: any = {}
|
||||||
|
|
||||||
const handleSelectionChange = (val) => {
|
const handleSelectionChange = (val) => {
|
||||||
// console.log(val, 'val-')
|
console.log(val)
|
||||||
multipleSelectionObj[da.deptId] = val
|
multipleSelectionObj[da.deptId] = val
|
||||||
multipleSelection.value = uniqBy(Object.values(multipleSelectionObj).flat(), 'userId')
|
multipleSelection.value = uniqBy(Object.values(multipleSelectionObj).flat(), 'userId')
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +210,7 @@ const addGroupList = () => {
|
||||||
showModal2.value = true
|
showModal2.value = true
|
||||||
}
|
}
|
||||||
const deleteGroupp = (i: any) => {
|
const deleteGroupp = (i: any) => {
|
||||||
// console.log(i)
|
console.log(i)
|
||||||
deleteGroups(i.id)
|
deleteGroups(i.id)
|
||||||
}
|
}
|
||||||
async function deleteGroups(id) {
|
async function deleteGroups(id) {
|
||||||
|
|
|
||||||
|
|
@ -1,556 +0,0 @@
|
||||||
<!-- 市况 -->
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { Chart1, Chart3, Chart4, Chart5, Chart6 } from './MarketData-bak'
|
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
|
||||||
import AppBlock from '@/components/AppBlock.vue'
|
|
||||||
import AppNewsBox from '@/components/AppNewsBox.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
import { getList ,marketPreADD,getMarketUser,saveMarketUser,MarketDownload,MarketPreview,getCurrencyList,getMetalList} from '@/api/daikin/base'
|
|
||||||
import { NModal,NCard } from 'naive-ui'
|
|
||||||
import {formatDate} from '@/utils/format'
|
|
||||||
import { message } from '@/utils/message'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
|
||||||
import Amtion from '@/components/amtion.vue'
|
|
||||||
import {noticeld} from '@/stores/modules/noticeId'
|
|
||||||
const store = useUserStore()
|
|
||||||
const stores = noticeld()
|
|
||||||
const userCode = ['admin','shikuang_dandang','tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const userCodes = ['admin','huilv_dandang','tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const { day, week } = useDate()
|
|
||||||
const { push } = useRouter()
|
|
||||||
const currentDate = new Date();
|
|
||||||
const currentDates = new Date();
|
|
||||||
const value1 = ref<[Date, Date]>([
|
|
||||||
currentDate.setMonth(currentDate.getMonth() - 11),
|
|
||||||
new Date()
|
|
||||||
])
|
|
||||||
const value2 = ref<[Date, Date]>([
|
|
||||||
currentDates.setMonth(currentDates.getMonth() - 11),
|
|
||||||
new Date()
|
|
||||||
])
|
|
||||||
const { chartRef: chartRef1, option: chartOption1,state } = Chart1()
|
|
||||||
const { chartRef: chartRef3, option: chartOption3 ,state2} = Chart3()
|
|
||||||
const { chartRef: chartRef4, option: chartOption4 ,state3} = Chart4()
|
|
||||||
const { chartRef: chartRef5, option: chartOption5,state4 } = Chart5()
|
|
||||||
const { chartRef: chartRef6, option: chartOption6 ,state5} = Chart6()
|
|
||||||
|
|
||||||
const listData = ref()
|
|
||||||
const listDatas = ref()
|
|
||||||
async function getData() {
|
|
||||||
const {data} = await getList({type:2})
|
|
||||||
const {data:ds} = await getList({type:1})
|
|
||||||
listData.value = data
|
|
||||||
listDatas.value = ds
|
|
||||||
}
|
|
||||||
const metal = ref()
|
|
||||||
const currency = ref()
|
|
||||||
onMounted(async ()=>{
|
|
||||||
getData()
|
|
||||||
const {data} =await getCurrencyList()
|
|
||||||
const {data:dat} =await getMetalList()
|
|
||||||
if(dat&&dat!='null'&&dat.length>0){
|
|
||||||
metal.value = dat
|
|
||||||
// .filter((item:any) => {
|
|
||||||
// if(["Fe","lengmei"].includes(item.value)){
|
|
||||||
// return false
|
|
||||||
// }else return item
|
|
||||||
// })
|
|
||||||
from.value.label.radio = dat[0].value
|
|
||||||
state4.number = dat[0].value
|
|
||||||
console.log("🚀 ~ file: Market.vue:56 ~ metal:", metal)
|
|
||||||
}
|
|
||||||
if(data&&data!='null'&&data.length>0){
|
|
||||||
currency.value = data
|
|
||||||
from.value.labe2.radio = data[0].value
|
|
||||||
const dat = data[0].value.split(',')
|
|
||||||
state5.currencyCodeFrom =dat[0]
|
|
||||||
state5.currencyCodeTo =dat[1]
|
|
||||||
state2.currencyCodeFrom =dat[0]
|
|
||||||
state2.currencyCodeTo =dat[1]
|
|
||||||
state3.currencyCodeFrom =dat[0]
|
|
||||||
state3.currencyCodeTo =dat[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const src = ref('');
|
|
||||||
const srcType = ref()
|
|
||||||
const showModalRef2 =ref(false)
|
|
||||||
const lokeFuck = async (n)=>{
|
|
||||||
const {id} =n
|
|
||||||
if(!id) return
|
|
||||||
let {data:{url}} = await MarketPreview({id})
|
|
||||||
if(!url) {
|
|
||||||
message.info("没有可预览文件!")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
srcType.value = getLastSubstring(url)
|
|
||||||
if(['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'].includes(srcType.value)){
|
|
||||||
// src.value = filePath
|
|
||||||
// pdfShow.value = true
|
|
||||||
url='https://view.xdocin.com/view?src='+url
|
|
||||||
const screenWidth = window.screen.width;
|
|
||||||
const screenHeight = window.screen.height;
|
|
||||||
window.open(url, '', 'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0)
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
function getLastSubstring(str: string): string {
|
|
||||||
const lastIndex = str.lastIndexOf('.');
|
|
||||||
if (lastIndex !== -1) {
|
|
||||||
return str.substring(lastIndex + 1);
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function downloadFile(data: { id: any; title: string }) {
|
|
||||||
console.log(data)
|
|
||||||
if(!data.id) return
|
|
||||||
try {
|
|
||||||
const response = await MarketDownload({ id: data.id })
|
|
||||||
console.log(response)
|
|
||||||
var blob = new Blob([response.data]);
|
|
||||||
|
|
||||||
const downloadUrl = URL.createObjectURL(blob);
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.href = downloadUrl;
|
|
||||||
link.download = response.fileName; // 替换为你要保存的文件名
|
|
||||||
link.click();
|
|
||||||
URL.revokeObjectURL(downloadUrl);
|
|
||||||
} catch (error) {
|
|
||||||
message.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const tab = ref(false)
|
|
||||||
const tab1 = ref(false)
|
|
||||||
const tab2 = ref(false)
|
|
||||||
const names =ref('Cu')
|
|
||||||
const names1 =ref('100USD-CNY')
|
|
||||||
const names2 =ref('100USD-CNY')
|
|
||||||
const tabClick1 = (e)=>{
|
|
||||||
|
|
||||||
console.log(e.target.getAttribute('data-id'))
|
|
||||||
tab1.value=false
|
|
||||||
const dat =e.target.getAttribute('data-id').split(',')
|
|
||||||
names1.value =e.target.innerText
|
|
||||||
state2.currencyCodeFrom =dat[0]
|
|
||||||
state2.currencyCodeTo =dat[1]
|
|
||||||
}
|
|
||||||
const tabClick2 = (e)=>{
|
|
||||||
|
|
||||||
console.log(e.target.getAttribute('data-id'))
|
|
||||||
tab2.value=false
|
|
||||||
const dat =e.target.getAttribute('data-id').split(',')
|
|
||||||
names2.value =e.target.innerText
|
|
||||||
state3.currencyCodeFrom =dat[0]
|
|
||||||
state3.currencyCodeTo =dat[1]
|
|
||||||
}
|
|
||||||
const tabClick= (e)=>{
|
|
||||||
|
|
||||||
console.log(e.target)
|
|
||||||
tab.value=false
|
|
||||||
state.type =e.target.getAttribute('data-id')
|
|
||||||
names.value =e.target.innerText
|
|
||||||
}
|
|
||||||
const tabShow = (num)=>{
|
|
||||||
|
|
||||||
// console.log(num)
|
|
||||||
switch (num) {
|
|
||||||
case 0:
|
|
||||||
tab.value = tab.value === false?true:false
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
tab1.value = tab1.value === false?true:false
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
tab2.value = tab2.value === false?true:false
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const from = ref({
|
|
||||||
label:{
|
|
||||||
radio:''
|
|
||||||
},
|
|
||||||
labe2:{
|
|
||||||
radio:''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const shomk = ref(false)
|
|
||||||
const sdubList = ref({
|
|
||||||
title:'',
|
|
||||||
fileList:[],
|
|
||||||
})
|
|
||||||
const shomks=(it)=>{
|
|
||||||
sdubList.value.type = it
|
|
||||||
// console.log(sdubList.value)
|
|
||||||
shomk.value =true
|
|
||||||
}
|
|
||||||
async function onSubmit(){
|
|
||||||
const {type,title ,fileList} = sdubList.value
|
|
||||||
|
|
||||||
let filePath
|
|
||||||
if(fileList.length>0){
|
|
||||||
// console.log(fileList)
|
|
||||||
filePath = fileList[0].response.url
|
|
||||||
}
|
|
||||||
|
|
||||||
const {msg,code} = await marketPreADD({type,title,filePath})
|
|
||||||
if (code === 200) { message.success("修改成功") }
|
|
||||||
else message.warning(msg)
|
|
||||||
window.location.reload();
|
|
||||||
// console.log(sdubList.value)
|
|
||||||
}
|
|
||||||
const handleExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
|
||||||
message.warning("当前只支持上传一个文件")
|
|
||||||
}
|
|
||||||
const thisCka = (e)=>{
|
|
||||||
if(value1.value){
|
|
||||||
state4.startTime = formatDate(value1.value[0]).substring(0,10)
|
|
||||||
state4.endTime = formatDate(value1.value[1]).substring(0,10)
|
|
||||||
}
|
|
||||||
state4.number =e
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
const thisCka2 = (e)=>{
|
|
||||||
const dat = e.split(',')
|
|
||||||
if(value2.value){
|
|
||||||
state5.startTime = formatDate(value2.value[0]).substring(0,10)
|
|
||||||
state5.endTime = formatDate(value2.value[1]).substring(0,10)
|
|
||||||
}
|
|
||||||
state5.currencyCodeFrom =dat[0]
|
|
||||||
state5.currencyCodeTo =dat[1]
|
|
||||||
}
|
|
||||||
const timenFirst=(e)=>{
|
|
||||||
// console.log(e)
|
|
||||||
state4.startTime = formatDate(value1.value[0]).substring(0,10)
|
|
||||||
state4.endTime = formatDate(value1.value[1]).substring(0,10)
|
|
||||||
}
|
|
||||||
const timenFirsts=(e)=>{
|
|
||||||
// console.log(e)
|
|
||||||
state5.startTime = formatDate(value2.value[0]).substring(0,10)
|
|
||||||
state5.endTime = formatDate(value2.value[1]).substring(0,10)
|
|
||||||
}
|
|
||||||
const header = { 'token': store.user.token }
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const flg = ref()
|
|
||||||
const setUserList =ref()
|
|
||||||
async function getUser(moduleId: any) {
|
|
||||||
showModal.value = !showModal.value
|
|
||||||
flg.value = moduleId
|
|
||||||
const {data: userArr} = await getMarketUser({moduleId})
|
|
||||||
stores.article.reviewSource = '2'
|
|
||||||
setUserList.value = userArr
|
|
||||||
|
|
||||||
}
|
|
||||||
// 获取子组件传过来的值
|
|
||||||
const handleChild = (data: any) => {
|
|
||||||
console.log(data, 444);
|
|
||||||
const { showModal: show, multipleSelection } = data
|
|
||||||
showModal.value = unref(show)
|
|
||||||
// userList.value = multipleSelection
|
|
||||||
let userIdList: any[] =[]
|
|
||||||
multipleSelection.value.forEach((i: { userId: any })=>{
|
|
||||||
// console.log(dataList.value)
|
|
||||||
userIdList.push(i.userId)
|
|
||||||
})
|
|
||||||
|
|
||||||
saveMarketUser({
|
|
||||||
moduleId: flg.value,
|
|
||||||
userIdList: userIdList
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const CloseThiss = (data: boolean)=>{
|
|
||||||
showModal.value = data
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<HomeHead class="top">
|
|
||||||
<template #content>
|
|
||||||
<!-- <HomeHeadSearch /> -->
|
|
||||||
</template>
|
|
||||||
</HomeHead>
|
|
||||||
<div class="h-full relative flex flex-col overflow-y-auto scrollbar-width-1px">
|
|
||||||
<div class="pl12px mt30px flex w-full h-full gap-30px">
|
|
||||||
<!-- <img src="./images/shukuang.png" alt="" class="w-full h-full"> -->
|
|
||||||
|
|
||||||
<AppBlock class="flex-1 box">
|
|
||||||
<div class="box-title">市况</div>
|
|
||||||
<el-button type="primary" v-if="userCode" class="button !mr-30px !mt-[-30px] z-100" @click="push({name:'MarketDataModify'})">数据管理</el-button>
|
|
||||||
<div class="bgStyle mt30px">
|
|
||||||
<div class="mr25px relative w100%">
|
|
||||||
|
|
||||||
<span @click="tabShow(0)" class="title bg-#FF603A p5px pl10px pr20px">{{names}}<el-icon><CaretBottom /></el-icon></span>
|
|
||||||
|
|
||||||
<div v-if="tab" class="tab absolute bg-#fff w100px top-50px z-50 text-#112144 text-center leading-28px text-18px ">
|
|
||||||
<div v-if="metal" v-for="im in metal.filter((item:any) => !['Fe','lengmei'].includes(item.value))" class="py5px !rounded-none" :data-id="im.value" @click="tabClick" >{{im.title}}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="Fe" @click="tabClick">Fe</div>
|
|
||||||
|
|
||||||
<div class="py5px !rounded-none" data-id="Cu" @click="tabClick">Cu</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="Re" @click="tabClick">稀土</div> -->
|
|
||||||
</div>
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef1" :option="chartOption1" autoresize />
|
|
||||||
</div>
|
|
||||||
<!-- <div>
|
|
||||||
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
|
||||||
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption2" autoresize />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h250px mt20px">
|
|
||||||
<div >
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef5" :option="chartOption5" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt20px ml10px">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<span class="text-#000">日期:</span>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-date-picker v-model="value1" type="daterange" range-separator="到"
|
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small" @change="timenFirst"/></el-config-provider>
|
|
||||||
</div>
|
|
||||||
<div class="mt10px">
|
|
||||||
<el-radio-group v-model="from.label.radio" class="ml-4" @change="thisCka">
|
|
||||||
<el-radio v-if="metal" v-for="im in metal" :label="im.value" size="large" >{{im.title}}</el-radio>
|
|
||||||
<!-- <el-radio label="Al" size="large" >Al</el-radio>
|
|
||||||
<el-radio label="Fe" size="large" >Fe</el-radio>
|
|
||||||
<el-radio label="Re" size="large" >稀土</el-radio> -->
|
|
||||||
</el-radio-group>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h165px mt15px mb10px">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px b">市况预测</span>
|
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(1)">查看范围</el-button> -->
|
|
||||||
<el-button type="primary" v-if="userCode" class="button" @click="push({name:'MarketModifys'})">管理</el-button>
|
|
||||||
<p class="mt40px p15px !border-none max-h120px overflow-auto">
|
|
||||||
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listDatas" :key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
|
||||||
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
<AppBlock class="flex-1 box">
|
|
||||||
<div class="box-title ">汇率</div>
|
|
||||||
<div class="bgStyle mt30px">
|
|
||||||
<div class="mr25px">
|
|
||||||
<span @click="tabShow(1)" class="title bg-#FF603A !text-16px pl13px pr20px ">{{names1}}<el-icon><CaretBottom /></el-icon></span>
|
|
||||||
<div v-if="tab1" class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value" @click="tabClick1">{{it.title}}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick1">人民币-美元</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick1">日元-美元</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef3" :option="chartOption3" autoresize />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span @click="tabShow(2)" class="title bg-#70BFCD !text-16px pl13px pr20px ">{{names2}}<el-icon><CaretBottom /></el-icon></span>
|
|
||||||
|
|
||||||
<div v-if="tab2" class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value" @click="tabClick2">{{it.title}}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick2">人民币-美元</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick2">日元-美元</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<VChart class="absolute z-22" ref="chartRef4" :option="chartOption4" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bgStyle !h250px mt20px">
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef6" :option="chartOption6" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt20px ml10px">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<span class="text-#000">日期:</span>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-date-picker v-model="value2" type="daterange" range-separator="到"
|
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small" @change="timenFirsts"/></el-config-provider>
|
|
||||||
</div>
|
|
||||||
<div class="mt10px">
|
|
||||||
<el-radio-group v-model="from.labe2.radio" class="ml-4" @change="thisCka2">
|
|
||||||
<el-radio v-if="currency" v-for="it in currency" :label="it.value" size="large" >{{it.title}}</el-radio>
|
|
||||||
<!-- <el-radio label="JPY,USD" size="large" >日元-美元</el-radio>
|
|
||||||
<el-radio label="CNA,USD" size="large" >人民币-美元</el-radio> -->
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h165px mt15px mb10px">
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">汇率预测</span>
|
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(2)">查看范围</el-button> -->
|
|
||||||
<el-button type="primary" v-if="userCodes" class="button" @click="push({name:'MarketModify'})">管理</el-button>
|
|
||||||
<p class="mt40px p15px !border-none max-h120px overflow-auto">
|
|
||||||
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listData" :key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
|
||||||
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div style="width: 1200px; height:800px ; position: fixed; z-index: 100; top:50px;;">
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<n-modal :mask-closable="true" v-model:show="showModalRef2">
|
|
||||||
<div class="w90% h90% ">
|
|
||||||
<Amtion :data="src" :datas="srcType"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</n-modal>
|
|
||||||
|
|
||||||
|
|
||||||
<n-modal v-model:show="shomk">
|
|
||||||
<div class="py40px px30px bg-#fff">
|
|
||||||
|
|
||||||
<el-form :model="sdubList" label-width="120px" :inline="true">
|
|
||||||
|
|
||||||
<el-form-item label="标题" >
|
|
||||||
<el-input v-model="sdubList.title"/>
|
|
||||||
</el-form-item>
|
|
||||||
<br>
|
|
||||||
<el-form-item label="文件">
|
|
||||||
<el-upload v-model:file-list="sdubList.fileList" class="upload-demo" :headers="header"
|
|
||||||
action="/test-api/common/upload" :on-change="handleChange">
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
|
||||||
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<el-form-item class="ml80px">
|
|
||||||
<el-button type="primary" @click="onSubmit">提交</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</n-modal>
|
|
||||||
<n-modal v-model:show="showModal">
|
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss"/>
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
|
|
||||||
.button{
|
|
||||||
display: block;
|
|
||||||
float: right;
|
|
||||||
margin-right:20px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::-webkit-scrollbar{
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -92px;
|
|
||||||
}
|
|
||||||
.date-wrapper[data-v-c5c4f420] {
|
|
||||||
line-height: 1.5;
|
|
||||||
position: relative;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
vertical-align: middle;
|
|
||||||
color: #142142;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.tab{
|
|
||||||
div:hover{
|
|
||||||
color: #0036BC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
padding: 23px 20px 0 20px;
|
|
||||||
|
|
||||||
.box-title {
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 600;
|
|
||||||
position: relative;
|
|
||||||
padding-left: 24px;
|
|
||||||
color: black;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: " ";
|
|
||||||
display: block;
|
|
||||||
width: 8px;
|
|
||||||
height: 30px;
|
|
||||||
background-color: #003ab5;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bgStyle {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
height: 270px;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 5px;
|
|
||||||
|
|
||||||
div {
|
|
||||||
flex: 1;
|
|
||||||
border: 1px solid rgb(236, 236, 236);
|
|
||||||
border-radius: 18px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
// width: 60px;
|
|
||||||
// height: 60px;
|
|
||||||
border-radius: 18px 0 50px 0;
|
|
||||||
color: aliceblue;
|
|
||||||
line-height: 40px;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 500;
|
|
||||||
z-index: 50;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -7,7 +7,7 @@ import AppNewsBox from '@/components/AppNewsBox.vue'
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
import { getList, marketPreADD, getMarketUser, saveMarketUser, MarketDownload, MarketPreview, getCurrencyList, getMetalList, fetchExchangeInfo,fetchTimeFuturecenterCu,fetchTimeFuturecenterAl } from '@/api/daikin/base'
|
import { getList ,marketPreADD,getMarketUser,saveMarketUser,MarketDownload,MarketPreview,getCurrencyList,getMetalList} from '@/api/daikin/base'
|
||||||
import { NModal,NCard } from 'naive-ui'
|
import { NModal,NCard } from 'naive-ui'
|
||||||
import {formatDate} from '@/utils/format'
|
import {formatDate} from '@/utils/format'
|
||||||
import { message } from '@/utils/message'
|
import { message } from '@/utils/message'
|
||||||
|
|
@ -17,12 +17,8 @@ import Amtion from '@/components/amtion.vue'
|
||||||
import {noticeld} from '@/stores/modules/noticeId'
|
import {noticeld} from '@/stores/modules/noticeId'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const stores = noticeld()
|
const stores = noticeld()
|
||||||
const userCode = ['admin', 'shikuang_dandang', 'tech_service'].some((item) =>
|
const userCode = ['admin','shikuang_dandang','tech_service'].includes(store.user.roleCode)
|
||||||
store.user.roleCode?.includes(item)
|
const userCodes = ['admin','huilv_dandang','tech_service'].includes(store.user.roleCode)
|
||||||
)
|
|
||||||
const userCodes = ['admin', 'huilv_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
|
|
@ -36,7 +32,6 @@ const value2 = ref<[Date, Date]>([
|
||||||
new Date()
|
new Date()
|
||||||
])
|
])
|
||||||
const { chartRef: chartRef1, option: chartOption1,state } = Chart1()
|
const { chartRef: chartRef1, option: chartOption1,state } = Chart1()
|
||||||
const { option: chartOption11 } = Chart1()
|
|
||||||
const { chartRef: chartRef3, option: chartOption3 ,state2} = Chart3()
|
const { chartRef: chartRef3, option: chartOption3 ,state2} = Chart3()
|
||||||
const { chartRef: chartRef4, option: chartOption4 ,state3} = Chart4()
|
const { chartRef: chartRef4, option: chartOption4 ,state3} = Chart4()
|
||||||
const { chartRef: chartRef5, option: chartOption5,state4 } = Chart5()
|
const { chartRef: chartRef5, option: chartOption5,state4 } = Chart5()
|
||||||
|
|
@ -55,7 +50,6 @@ const currency = ref()
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
getData()
|
getData()
|
||||||
const {data} =await getCurrencyList()
|
const {data} =await getCurrencyList()
|
||||||
console.log("🚀 ~ file: Market.vue:58 ~ data:", data)
|
|
||||||
const {data:dat} =await getMetalList()
|
const {data:dat} =await getMetalList()
|
||||||
if(dat&&dat!='null'&&dat.length>0){
|
if(dat&&dat!='null'&&dat.length>0){
|
||||||
metal.value = dat
|
metal.value = dat
|
||||||
|
|
@ -165,7 +159,7 @@ const tabClick = (e) => {
|
||||||
console.log(e.target)
|
console.log(e.target)
|
||||||
tab.value=false
|
tab.value=false
|
||||||
state.type =e.target.getAttribute('data-id')
|
state.type =e.target.getAttribute('data-id')
|
||||||
// names.value =e.target.innerText
|
names.value =e.target.innerText
|
||||||
}
|
}
|
||||||
const tabShow = (num)=>{
|
const tabShow = (num)=>{
|
||||||
|
|
||||||
|
|
@ -280,21 +274,6 @@ const handleChild = (data: any) => {
|
||||||
const CloseThiss = (data: boolean)=>{
|
const CloseThiss = (data: boolean)=>{
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
getHomeExInfo()
|
|
||||||
getTimeFuturecenter()
|
|
||||||
const homeExchangeInfo = ref<any>([])
|
|
||||||
async function getHomeExInfo() {
|
|
||||||
const { data } = await fetchExchangeInfo()
|
|
||||||
homeExchangeInfo.value = data
|
|
||||||
console.log('🚀 ~ file: Home.vue:252 ~ }):', data)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getTimeFuturecenter() {
|
|
||||||
const { data } = await fetchTimeFuturecenterCu()
|
|
||||||
console.log("🚀 ~ file: Market.vue:293 ~ data:", data)
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -309,100 +288,62 @@ async function getTimeFuturecenter() {
|
||||||
|
|
||||||
<AppBlock class="flex-1 box">
|
<AppBlock class="flex-1 box">
|
||||||
<div class="box-title">市况</div>
|
<div class="box-title">市况</div>
|
||||||
<el-button type="primary" v-if="userCode" class="button !mr-30px !mt-[-30px] z-100"
|
<el-button type="primary" v-if="userCode" class="button !mr-30px !mt-[-30px] z-100" @click="push({name:'MarketDataModify'})">数据管理</el-button>
|
||||||
@click="push({ name: 'MarketDataModify' })">数据管理</el-button>
|
<div class="bgStyle mt30px">
|
||||||
<div class="bgStyle !h250px mt20px">
|
<div class="mr25px relative w100%">
|
||||||
<div class=" relative w100%">
|
|
||||||
|
|
||||||
<span @click="tabShow(0)" class="title bg-#70BFCD pl18px pr24px">{{ names }}
|
<span @click="tabShow(0)" class="title bg-#FF603A p5px pl10px pr20px">{{names}}<el-icon><CaretBottom /></el-icon></span>
|
||||||
<!-- <el-icon><CaretBottom /></el-icon> -->
|
|
||||||
</span>
|
|
||||||
<span class="absolute right-160px top-14px z-30 text-#000">最近7天数据</span>
|
|
||||||
|
|
||||||
<div v-if="false && tab"
|
<div v-if="tab" class="tab absolute bg-#fff w100px top-50px z-50 text-#112144 text-center leading-28px text-18px ">
|
||||||
class="tab absolute bg-#fff w100px top-50px z-50 text-#112144 text-center leading-28px text-18px ">
|
<div v-if="metal" v-for="im in metal.filter((item:any) => !['Fe','lengmei'].includes(item.value))" class="py5px !rounded-none" :data-id="im.value" @click="tabClick" >{{im.title}}</div>
|
||||||
<div v-if="metal"
|
|
||||||
v-for="im in metal.filter((item: any) => !['Fe', 'lengmei'].includes(item.value))"
|
|
||||||
class="py5px !rounded-none" :data-id="im.value" @click="tabClick">{{ im.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="Fe" @click="tabClick">Fe</div>
|
<!-- <div class="py5px !rounded-none" data-id="Fe" @click="tabClick">Fe</div>
|
||||||
|
|
||||||
<div class="py5px !rounded-none" data-id="Cu" @click="tabClick">Cu</div>
|
<div class="py5px !rounded-none" data-id="Cu" @click="tabClick">Cu</div>
|
||||||
<div class="py5px !rounded-none" data-id="Re" @click="tabClick">稀土</div> -->
|
<div class="py5px !rounded-none" data-id="Re" @click="tabClick">稀土</div> -->
|
||||||
</div>
|
</div>
|
||||||
<VChart class="absolute z-22 left-0 right-0 !w-full" ref="chartRef1" :option="chartOption1"
|
<VChart class=" absolute z-22" ref="chartRef1" :option="chartOption1" autoresize />
|
||||||
autoresize />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
||||||
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption2" autoresize />
|
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption2" autoresize />
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="bgStyle !h250px mt10px">
|
<div class="bgStyle !h250px mt20px">
|
||||||
<div class=" relative w100%">
|
|
||||||
|
|
||||||
<span class="title bg-#FF960F pl18px pr28px">{{ 'AI' }}
|
|
||||||
<!-- <el-icon><CaretBottom /></el-icon> -->
|
|
||||||
</span>
|
|
||||||
<span class="absolute right-160px top-14px z-30 text-#000">最近7天数据</span>
|
|
||||||
<VChart class="absolute z-22 left-0 right-0 !w-full" ref="chartRef1" :option="chartOption11"
|
|
||||||
autoresize />
|
|
||||||
</div>
|
|
||||||
<!-- <div>
|
|
||||||
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
|
||||||
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption2" autoresize />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h240px mt10px">
|
|
||||||
<div >
|
<div >
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
||||||
<VChart class=" absolute z-22" ref="chartRef5" :option="chartOption5" autoresize />
|
<VChart class=" absolute z-22" ref="chartRef5" :option="chartOption5" autoresize />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt8px ml10px">
|
<div class="mt20px ml10px">
|
||||||
<div class="flex items-center w-45%">
|
<div>
|
||||||
|
|
||||||
<span class="text-#000 whitespace-nowrap">日期:</span>
|
<span class="text-#000">日期:</span>
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-date-picker v-model="value1" type="daterange" range-separator="到"
|
<el-date-picker v-model="value1" type="daterange" range-separator="到"
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small"
|
start-placeholder="开始时间" end-placeholder="结束时间" size="small" @change="timenFirst"/></el-config-provider>
|
||||||
@change="timenFirst" /></el-config-provider>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-between items-center">
|
<div class="mt10px">
|
||||||
<el-radio-group v-model="from.label.radio" class="ml-4" @change="thisCka">
|
<el-radio-group v-model="from.label.radio" class="ml-4" @change="thisCka">
|
||||||
<el-radio v-if="metal" v-for="im in metal" :label="im.value"
|
<el-radio v-if="metal" v-for="im in metal" :label="im.value" size="large" >{{im.title}}</el-radio>
|
||||||
size="large">{{ im.title }}</el-radio>
|
|
||||||
<!-- <el-radio label="Al" size="large" >Al</el-radio>
|
<!-- <el-radio label="Al" size="large" >Al</el-radio>
|
||||||
<el-radio label="Fe" size="large" >Fe</el-radio>
|
<el-radio label="Fe" size="large" >Fe</el-radio>
|
||||||
<el-radio label="Re" size="large" >稀土</el-radio> -->
|
<el-radio label="Re" size="large" >稀土</el-radio> -->
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-popover placement="top-end" trigger="click" :popper-style="{ width: '590px',borderRadius:'10px' }"
|
|
||||||
:teleported="true">
|
</div>
|
||||||
<template #reference>
|
|
||||||
<div
|
</div>
|
||||||
class="bg-gr h-42px w115px flex justify-center items-center text-#fff rounded-10px text-18px cursor-pointer font-bold">
|
<div class="bgStyle !h165px mt15px mb10px">
|
||||||
市况预测 <el-icon class="rotate-270deg">
|
|
||||||
<CaretBottom />
|
<div>
|
||||||
</el-icon></div>
|
|
||||||
</template>
|
|
||||||
<!-- <Teleport to="v-screen-box"> -->
|
|
||||||
<!-- <VScaleScreen
|
|
||||||
ref="fitscreenRef"
|
|
||||||
:width="1920"
|
|
||||||
:height="1080"
|
|
||||||
mode="fit"
|
|
||||||
> -->
|
|
||||||
<div class="bgStyle h-250px w-690px mt15px mb10px">
|
|
||||||
<div class="w-full">
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px b">市况预测</span>
|
<span class="title bg-#003BB7 !text-16px pl13px pr20px b">市况预测</span>
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(1)">查看范围</el-button> -->
|
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(1)">查看范围</el-button> -->
|
||||||
<el-button type="primary" size="small" v-if="userCode" class="button !mr-2%"
|
<el-button type="primary" v-if="userCode" class="button" @click="push({name:'MarketModifys'})">管理</el-button>
|
||||||
@click="push({ name: 'MarketModifys' })">管理</el-button>
|
<p class="mt40px p15px !border-none max-h120px overflow-auto">
|
||||||
<p class="mt40px p15px !border-none max-h250px overflow-auto">
|
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listDatas" :key="n">
|
||||||
<p class="!border-none w-98% !flex items-center pb10px news-item !pr30rpx"
|
|
||||||
v-for="n in listDatas" :key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
<p class="flex-shrink flex !border-none w35px ml20px">
|
||||||
<el-button size="small" type="primary" @click="lokeFuck(n)">预览</el-button>
|
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -410,25 +351,14 @@ async function getTimeFuturecenter() {
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </VScaleScreen> -->
|
|
||||||
<!-- </Teleport> -->
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
<AppBlock class="flex-1 box">
|
<AppBlock class="flex-1 box">
|
||||||
<div class="box-title ">汇率</div>
|
<div class="box-title ">汇率</div>
|
||||||
<div class="bgStyle !h250px mt20px">
|
<div class="bgStyle mt30px">
|
||||||
<div class="mr25px">
|
<div class="mr25px">
|
||||||
<span @click="tabShow(1)"
|
<span @click="tabShow(1)" class="title bg-#FF603A !text-16px pl13px pr20px ">{{names1}}<el-icon><CaretBottom /></el-icon></span>
|
||||||
class="title bg-#FF603A !text-16px pl13px pr20px ">{{ names1 }}<el-icon>
|
<div v-if="tab1" class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
||||||
<CaretBottom />
|
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value" @click="tabClick1">{{it.title}}</div>
|
||||||
</el-icon></span>
|
|
||||||
<div v-if="tab1"
|
|
||||||
class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value"
|
|
||||||
@click="tabClick1">{{ it.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick1">人民币-美元</div>
|
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick1">人民币-美元</div>
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick1">日元-美元</div> -->
|
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick1">日元-美元</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -437,15 +367,10 @@ async function getTimeFuturecenter() {
|
||||||
<VChart class=" absolute z-22" ref="chartRef3" :option="chartOption3" autoresize />
|
<VChart class=" absolute z-22" ref="chartRef3" :option="chartOption3" autoresize />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span @click="tabShow(2)"
|
<span @click="tabShow(2)" class="title bg-#70BFCD !text-16px pl13px pr20px ">{{names2}}<el-icon><CaretBottom /></el-icon></span>
|
||||||
class="title bg-#70BFCD !text-16px pl13px pr20px ">{{ names2 }}<el-icon>
|
|
||||||
<CaretBottom />
|
|
||||||
</el-icon></span>
|
|
||||||
|
|
||||||
<div v-if="tab2"
|
<div v-if="tab2" class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
||||||
class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value" @click="tabClick2">{{it.title}}</div>
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value"
|
|
||||||
@click="tabClick2">{{ it.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick2">人民币-美元</div>
|
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick2">人民币-美元</div>
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick2">日元-美元</div> -->
|
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick2">日元-美元</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -454,40 +379,36 @@ async function getTimeFuturecenter() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bgStyle !h250px mt10px">
|
<div class="bgStyle !h250px mt20px">
|
||||||
<div>
|
<div>
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
||||||
<VChart class=" absolute z-22" ref="chartRef6" :option="chartOption6" autoresize />
|
<VChart class=" absolute z-22" ref="chartRef6" :option="chartOption6" autoresize />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10px ml10px">
|
<div class="mt20px ml10px">
|
||||||
<div class="flex items-center w-45%">
|
<div>
|
||||||
|
|
||||||
<span class="text-#000 whitespace-nowrap">日期:</span>
|
<span class="text-#000">日期:</span>
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<el-date-picker v-model="value2" type="daterange" range-separator="到"
|
<el-date-picker v-model="value2" type="daterange" range-separator="到"
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small"
|
start-placeholder="开始时间" end-placeholder="结束时间" size="small" @change="timenFirsts"/></el-config-provider>
|
||||||
@change="timenFirsts" /></el-config-provider>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="h-30px">
|
<div class="mt10px">
|
||||||
<el-radio-group v-model="from.labe2.radio" class="ml-4" @change="thisCka2">
|
<el-radio-group v-model="from.labe2.radio" class="ml-4" @change="thisCka2">
|
||||||
<el-radio v-if="currency" v-for="it in currency" :label="it.value"
|
<el-radio v-if="currency" v-for="it in currency" :label="it.value" size="large" >{{it.title}}</el-radio>
|
||||||
size="large">{{ it.title }}</el-radio>
|
|
||||||
<!-- <el-radio label="JPY,USD" size="large" >日元-美元</el-radio>
|
<!-- <el-radio label="JPY,USD" size="large" >日元-美元</el-radio>
|
||||||
<el-radio label="CNA,USD" size="large" >人民币-美元</el-radio> -->
|
<el-radio label="CNA,USD" size="large" >人民币-美元</el-radio> -->
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bgStyle !h230px mt15px mb10px">
|
<div class="bgStyle !h165px mt15px mb10px">
|
||||||
<div>
|
<div>
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">汇率预测</span>
|
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">汇率预测</span>
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(2)">查看范围</el-button> -->
|
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(2)">查看范围</el-button> -->
|
||||||
<el-button type="primary" v-if="userCodes" class="button"
|
<el-button type="primary" v-if="userCodes" class="button" @click="push({name:'MarketModify'})">管理</el-button>
|
||||||
@click="push({ name: 'MarketModify' })">管理</el-button>
|
<p class="mt40px p15px !border-none max-h120px overflow-auto">
|
||||||
<p class="mt40px p15px !border-none max-h-full overflow-auto">
|
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listData" :key="n">
|
||||||
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listData"
|
|
||||||
:key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
<p class="flex-shrink flex !border-none w35px ml20px">
|
||||||
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
||||||
|
|
@ -544,9 +465,6 @@ async function getTimeFuturecenter() {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.bg-gr {
|
|
||||||
background: linear-gradient(to left, #34A6D9 0%, #23D1C6 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button{
|
.button{
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -560,13 +478,11 @@ async function getTimeFuturecenter() {
|
||||||
::-webkit-scrollbar{
|
::-webkit-scrollbar{
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: -92px;
|
top: -92px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-wrapper[data-v-c5c4f420] {
|
.date-wrapper[data-v-c5c4f420] {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -579,7 +495,6 @@ async function getTimeFuturecenter() {
|
||||||
color: #142142;
|
color: #142142;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab{
|
.tab{
|
||||||
div:hover{
|
div:hover{
|
||||||
color: #0036BC;
|
color: #0036BC;
|
||||||
|
|
|
||||||
|
|
@ -1,473 +0,0 @@
|
||||||
import { historyStat,rateHistoryStat,historyMarketSevenDay,historyStatSevenDay} from '@/api/daikin/base'
|
|
||||||
import type { EChartsOption } from 'echarts'
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
import {calculateDateIntervals} from '@/utils/format'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const state = reactive<any>({
|
|
||||||
type: 'Cu',
|
|
||||||
})
|
|
||||||
const state1 = reactive<any>({
|
|
||||||
currencyCodeFrom:'CNA',
|
|
||||||
currencyCodeTo:'USD',
|
|
||||||
})
|
|
||||||
const state2 = reactive<any>({
|
|
||||||
currencyCodeFrom:'CNA',
|
|
||||||
currencyCodeTo:'USD',
|
|
||||||
})
|
|
||||||
const state3 = reactive<any>({
|
|
||||||
currencyCodeFrom:'USD',
|
|
||||||
currencyCodeTo:'CNA',
|
|
||||||
})
|
|
||||||
const state4 = reactive<any>({
|
|
||||||
number:'Cu',
|
|
||||||
type: '2',
|
|
||||||
dateList:calculateDateIntervals('','').list,
|
|
||||||
startTime:'',
|
|
||||||
endTime:'',
|
|
||||||
})
|
|
||||||
const state5 = reactive<any>({
|
|
||||||
currencyCodeFrom:'CNA',
|
|
||||||
currencyCodeTo:'JPY',
|
|
||||||
type: '2',
|
|
||||||
dateList:calculateDateIntervals('','').list,
|
|
||||||
startTime:'',
|
|
||||||
endTime:'',
|
|
||||||
})
|
|
||||||
|
|
||||||
function getDay(){
|
|
||||||
const today = new Date();
|
|
||||||
const pastSevenDays = [];
|
|
||||||
|
|
||||||
for (let i = 6; i >= 0; i--) {
|
|
||||||
const date = new Date(today);
|
|
||||||
date.setDate(today.getDate() - i);
|
|
||||||
pastSevenDays.push(date.toISOString().split('T')[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return pastSevenDays;
|
|
||||||
}
|
|
||||||
|
|
||||||
function reverseArray(inputArray: string | any[],star: number,enc: number) {
|
|
||||||
const reversedArray = [];
|
|
||||||
|
|
||||||
for (let i = 0; i <= inputArray.length - 1; i++) {
|
|
||||||
reversedArray.push(inputArray[i].substring(star,enc));
|
|
||||||
}
|
|
||||||
|
|
||||||
return reversedArray;
|
|
||||||
}
|
|
||||||
export function Chart1() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref()
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await historyMarketSevenDay({ number: state.type })
|
|
||||||
if (!data) return
|
|
||||||
let { LME, SMM } = data[state.type]
|
|
||||||
SMM = SMM.map((item: any) => (item == 0 ? null : item))
|
|
||||||
LME = LME.map((item: any) => (item == 0 ? null : item))
|
|
||||||
const option = {
|
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['SMM', 'LME'],
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: reverseArray(getDay(), 5, 10)
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value'
|
|
||||||
// name:'1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name:'2',
|
|
||||||
type: 'value'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'SMM',
|
|
||||||
data: SMM,
|
|
||||||
color: '#8F97F8',
|
|
||||||
type: 'line',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'LME',
|
|
||||||
data: LME,
|
|
||||||
type: 'line',
|
|
||||||
color: '#FF603A',
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state.type])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
console.log(state.type)
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
|
|
||||||
return { chartRef, option: optionRef, state }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart3() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await historyStatSevenDay({
|
|
||||||
currencyCodeFrom: state2.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state2.currencyCodeTo
|
|
||||||
})
|
|
||||||
if (!data) return
|
|
||||||
const dat = (
|
|
||||||
data[state2.currencyCodeFrom + '-' + state2.currencyCodeTo] || []
|
|
||||||
).map((item: any) => (item == 0 ? null : item))
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: reverseArray(getDay(), 8, 10)
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#8F97F8',
|
|
||||||
type: 'line',
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state2.currencyCodeFrom, state2.currencyCodeTo])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
console.log(state2.type)
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state2 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart4() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await historyStatSevenDay({
|
|
||||||
currencyCodeFrom: state3.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state3.currencyCodeTo
|
|
||||||
})
|
|
||||||
if (!data) return
|
|
||||||
const dat = (
|
|
||||||
data[state3.currencyCodeFrom + '-' + state3.currencyCodeTo] || []
|
|
||||||
).map((item: any) => (item == 0 ? null : item))
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
|
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
|
||||||
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: reverseArray(getDay(), 8, 10)
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#8F97F8',
|
|
||||||
type: 'line',
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state3.currencyCodeFrom, state3.currencyCodeTo])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
console.log(state3.type)
|
|
||||||
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state3 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart5() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
let nameX: string[]
|
|
||||||
async function dataList() {
|
|
||||||
let SMM, LME
|
|
||||||
const { data } = await historyStat({
|
|
||||||
number: state4.number,
|
|
||||||
type: state4.type,
|
|
||||||
dateList: state4.dateList
|
|
||||||
})
|
|
||||||
if (data && data[state4.number]) {
|
|
||||||
SMM = data[state4.number].SMM || []
|
|
||||||
LME = data[state4.number].LME || []
|
|
||||||
SMM = SMM.map((item: any) => (item == 0 ? null : item))
|
|
||||||
LME = LME.map((item: any) => (item == 0 ? null : item))
|
|
||||||
}
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
// width: '250px', // 设置图表宽度为 800 像素
|
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['SMM', 'LME'],
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: nameX
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value'
|
|
||||||
// name:'1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name:'2',
|
|
||||||
type: 'value'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'SMM',
|
|
||||||
data: SMM,
|
|
||||||
color: '#FF9307',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'LME',
|
|
||||||
data: LME,
|
|
||||||
type: 'line',
|
|
||||||
color: '#0063ED',
|
|
||||||
smooth: true,
|
|
||||||
yAxisIndex: 1,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state4.number, state4.startTime, state4.endTime])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
// console.log(calculateDateIntervals(state4.startTime,state4.endTime),88888)
|
|
||||||
const { type, list } = calculateDateIntervals(
|
|
||||||
state4.startTime,
|
|
||||||
state4.endTime
|
|
||||||
)
|
|
||||||
nameX = list
|
|
||||||
state4.dateList = list
|
|
||||||
state4.type = type
|
|
||||||
console.log(state4.number)
|
|
||||||
dataList()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state4 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart6() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
let nameX: string[]
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await rateHistoryStat({
|
|
||||||
currencyCodeFrom: state5.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state5.currencyCodeTo,
|
|
||||||
type: state5.type,
|
|
||||||
dateList: state5.dateList
|
|
||||||
})
|
|
||||||
const dat = (
|
|
||||||
data[state5.currencyCodeFrom + '-' + state5.currencyCodeTo] || []
|
|
||||||
).map((item: any) => (item == 0 ? null : item))
|
|
||||||
const option = {
|
|
||||||
// width: '250px', // 设置图表宽度为 800 像素
|
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
// legend: {
|
|
||||||
// data:state5.currencyCodeFrom-state5.currencyCodeTo,
|
|
||||||
// right: 20,
|
|
||||||
// top: 10,
|
|
||||||
// },
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: nameX
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state5.currencyCodeFrom + '-' + state5.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#89DF75',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [
|
|
||||||
state5.currencyCodeFrom,
|
|
||||||
state5.currencyCodeTo,
|
|
||||||
state5.startTime,
|
|
||||||
state5.endTime
|
|
||||||
])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
const { type, list } = calculateDateIntervals(
|
|
||||||
state5.startTime,
|
|
||||||
state5.endTime
|
|
||||||
)
|
|
||||||
|
|
||||||
nameX = list
|
|
||||||
state5.dateList = list
|
|
||||||
state5.type = type
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state5 }
|
|
||||||
}
|
|
||||||
|
|
@ -1,976 +0,0 @@
|
||||||
import {
|
|
||||||
historyStat,
|
|
||||||
rateHistoryStat,
|
|
||||||
historyMarketSevenDay,
|
|
||||||
historyStatSevenDay,
|
|
||||||
fetchTimeFuturecenterCu,
|
|
||||||
fetchTimeFuturecenterAl
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import { use } from 'echarts/core'
|
|
||||||
import type { EChartsOption } from 'echarts'
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
import { calculateDateIntervals } from '@/utils/format'
|
|
||||||
// import { CandlestickChart } from 'echarts/charts'
|
|
||||||
// use([CandlestickChart])
|
|
||||||
|
|
||||||
const state = reactive<any>({
|
|
||||||
type: 'Cu'
|
|
||||||
})
|
|
||||||
const state1 = reactive<any>({
|
|
||||||
currencyCodeFrom: 'CNA',
|
|
||||||
currencyCodeTo: 'USD'
|
|
||||||
})
|
|
||||||
const state2 = reactive<any>({
|
|
||||||
currencyCodeFrom: 'CNA',
|
|
||||||
currencyCodeTo: 'USD'
|
|
||||||
})
|
|
||||||
const state3 = reactive<any>({
|
|
||||||
currencyCodeFrom: 'USD',
|
|
||||||
currencyCodeTo: 'CNA'
|
|
||||||
})
|
|
||||||
const state4 = reactive<any>({
|
|
||||||
number: 'Cu',
|
|
||||||
type: '2',
|
|
||||||
dateList: calculateDateIntervals('', '').list,
|
|
||||||
startTime: '',
|
|
||||||
endTime: ''
|
|
||||||
})
|
|
||||||
const state5 = reactive<any>({
|
|
||||||
currencyCodeFrom: 'CNA',
|
|
||||||
currencyCodeTo: 'JPY',
|
|
||||||
type: '2',
|
|
||||||
dateList: calculateDateIntervals('', '').list,
|
|
||||||
startTime: '',
|
|
||||||
endTime: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
function getDay() {
|
|
||||||
const today = new Date()
|
|
||||||
const pastSevenDays = []
|
|
||||||
|
|
||||||
for (let i = 6; i >= 0; i--) {
|
|
||||||
const date = new Date(today)
|
|
||||||
date.setDate(today.getDate() - i)
|
|
||||||
pastSevenDays.push(date.toISOString().split('T')[0])
|
|
||||||
}
|
|
||||||
|
|
||||||
return pastSevenDays
|
|
||||||
}
|
|
||||||
|
|
||||||
function reverseArray(inputArray: string | any[], star: number, enc: number) {
|
|
||||||
const reversedArray = []
|
|
||||||
|
|
||||||
for (let i = 0; i <= inputArray.length - 1; i++) {
|
|
||||||
reversedArray.push(inputArray[i].substring(star, enc))
|
|
||||||
}
|
|
||||||
|
|
||||||
return reversedArray
|
|
||||||
}
|
|
||||||
|
|
||||||
const cuType = reactive<any>({
|
|
||||||
type: 'cu0000'
|
|
||||||
})
|
|
||||||
export function Chart1(type = 'Cu') {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref()
|
|
||||||
// const state = ref({
|
|
||||||
// type
|
|
||||||
// })
|
|
||||||
async function getDat() {
|
|
||||||
const { data = {} } =
|
|
||||||
type == 'Cu'
|
|
||||||
? await fetchTimeFuturecenterCu({ type: cuType.type })
|
|
||||||
: await fetchTimeFuturecenterAl({ type: cuType.type })
|
|
||||||
const { list = [] } = data
|
|
||||||
let xData: any = []
|
|
||||||
let lastPrice: any = []
|
|
||||||
let diff: any = []
|
|
||||||
let diffV: any = []
|
|
||||||
let tradingDay = ''
|
|
||||||
tradingDay = list[0]?.updateTime?.substr(0, 10) || ''
|
|
||||||
list.forEach((item: any) => {
|
|
||||||
xData.push(item.updateTime)
|
|
||||||
lastPrice.push(item.lastPrice)
|
|
||||||
diff.push(item.avgPrice)
|
|
||||||
diffV.push(parseFloat(item.diffValue).toFixed(2))
|
|
||||||
})
|
|
||||||
// console.log('🚀 ~ file: MarketData-new.ts:97 ~ diffV:', xData.at(-1), diffV.at(-1))
|
|
||||||
const option = {
|
|
||||||
// height: '270px', // 设置图表高度为 400 像素
|
|
||||||
height: '140px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
right: '10',
|
|
||||||
// top: 90,
|
|
||||||
// bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['SMM', 'LME'],
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
// position: function (pt) {
|
|
||||||
// return [pt[0], '10%']
|
|
||||||
// },
|
|
||||||
// backgroundColor: '#4c4c4c90',
|
|
||||||
zIndex: 50,
|
|
||||||
appendTo: 'body',
|
|
||||||
formatter: function (params: any) {
|
|
||||||
const { dataIndex } = params[0]
|
|
||||||
const val = list[dataIndex]
|
|
||||||
const style = 'display: flex;justify-content: space-between;align-items: center;'
|
|
||||||
const isUp = val.diffPrice > 0
|
|
||||||
const priceStyle = isUp ? 'color: #ec0000;' : 'color: #00da3c;'
|
|
||||||
return `
|
|
||||||
<div style="width:120px;font-size:12px;line-height:18px;">
|
|
||||||
<div style="${style}borderBottom: 1px solid #ccc">
|
|
||||||
<span>时间:</span>
|
|
||||||
<span>${val.updateTime?.substr(11, 5)}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>最新价:</span>
|
|
||||||
<span style="${priceStyle}">${val.lastPrice}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>涨跌额:</span>
|
|
||||||
<span style="${priceStyle}">${val.diffPrice}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>涨跌幅:</span>
|
|
||||||
<span style="${priceStyle}">${val.diffValue}%</span>
|
|
||||||
</div>
|
|
||||||
${
|
|
||||||
cuType.type
|
|
||||||
? `<div style="${style}">
|
|
||||||
<span>成交额:</span>
|
|
||||||
<span>${val.donePrice ? (val.donePrice / 100000000).toFixed(2) : 0}亿</span>
|
|
||||||
</div>`
|
|
||||||
: ''
|
|
||||||
}
|
|
||||||
<div style="${style}">
|
|
||||||
<span>成交量:</span>
|
|
||||||
<span>${val.doneNumber}</span>
|
|
||||||
</div>
|
|
||||||
${
|
|
||||||
cuType.type
|
|
||||||
? `<div style="${style}">
|
|
||||||
<span>均价:</span>
|
|
||||||
<span>${val.avgPrice}</span>
|
|
||||||
</div>`
|
|
||||||
: ''
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
position: function (pos, params, el, elRect, size) {
|
|
||||||
const obj: any = {
|
|
||||||
top: 10
|
|
||||||
}
|
|
||||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 60
|
|
||||||
return obj
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
animation: true,
|
|
||||||
link: [
|
|
||||||
{
|
|
||||||
xAxisIndex: 'all'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
label: {
|
|
||||||
backgroundColor: '#505765'
|
|
||||||
// formatter: function (params: any) {
|
|
||||||
// const val = parseFloat(params.value).toFixed(0)
|
|
||||||
// return params.axisDimension == 'x' ? `${tradingDay} ${params.value}:00` : val
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
boundaryGap: false,
|
|
||||||
splitLine: { show: false },
|
|
||||||
axisLine: { onZero: false },
|
|
||||||
axisLabel: {
|
|
||||||
formatter: function (value: any) {
|
|
||||||
return value.substr(11, 5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
// {
|
|
||||||
// name: 'Dow-Jones index',
|
|
||||||
// type: 'candlestick',
|
|
||||||
// data: list,
|
|
||||||
// itemStyle: {
|
|
||||||
// color: '#00da3c',
|
|
||||||
// color0: '#ec0000',
|
|
||||||
// borderColor: undefined,
|
|
||||||
// borderColor0: undefined
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '',
|
|
||||||
min: 'dataMin',
|
|
||||||
max: 'dataMax',
|
|
||||||
scale: true,
|
|
||||||
// splitArea: {
|
|
||||||
// show: true
|
|
||||||
// },
|
|
||||||
boundaryGap: [0, '100%']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '',
|
|
||||||
// min: 'dataMin',
|
|
||||||
// formatter: '{value} %',
|
|
||||||
// alignTicks: true,
|
|
||||||
// boundaryGap: [0, '100%'],
|
|
||||||
scale: true,
|
|
||||||
onZero: false,
|
|
||||||
minInterval: 0.1,
|
|
||||||
axisLabel: {
|
|
||||||
// formatter: '{value}%'
|
|
||||||
formatter: function (value, index) {
|
|
||||||
return value.toFixed(1) + '%'
|
|
||||||
},
|
|
||||||
color: function (value, index) {
|
|
||||||
return value > 0 ? '#ec0000' : value == 0 ? '#333' : '#00da3c' //改变颜色 '%'
|
|
||||||
}
|
|
||||||
// color: 'skyblue'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: 'inside',
|
|
||||||
start: 80,
|
|
||||||
end: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
start: 80,
|
|
||||||
end: 100
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: []
|
|
||||||
}
|
|
||||||
const series = [
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
// markLine: {
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// type: 'average',
|
|
||||||
// name: 'Avg'
|
|
||||||
// // coord: [diff.at(-1), lastPrice.at(-1)],
|
|
||||||
// // name: 'New'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// symbol: 'none',
|
|
||||||
// label: {
|
|
||||||
// // color: '#ec0000',
|
|
||||||
// formatter: (params) => {
|
|
||||||
// console.log('🚀 ~ file: MarketData-new.ts:271 ~ params:', params)
|
|
||||||
// return 0
|
|
||||||
// }
|
|
||||||
// // formatter: '{b}: {@score}'
|
|
||||||
// },
|
|
||||||
// itemStyle: {
|
|
||||||
// // color: '#ec0000'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// areaStyle: {},
|
|
||||||
data: lastPrice
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
// yAxisIndex: 1,
|
|
||||||
// areaStyle: {},
|
|
||||||
data: diff,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
// color: '#E08F2D',
|
|
||||||
lineStyle: {
|
|
||||||
color: '#E08F2D'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
// markLine: {
|
|
||||||
// type: 'average',
|
|
||||||
// lineStyle: {
|
|
||||||
// color: '#E08F2D30'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
data: diffV,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
// color: '#E08F2D',
|
|
||||||
lineStyle: {
|
|
||||||
type: 'dotted',
|
|
||||||
color: 'transparent'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// markLine: {
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// type: 'max',
|
|
||||||
// name: '111',
|
|
||||||
// coord: [xData.at(-1), diffV.at(-1)]
|
|
||||||
// // name: 'New'
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// symbol: 'none',
|
|
||||||
// label: {
|
|
||||||
// // color: '#ec0000',
|
|
||||||
// formatter: (params) => {
|
|
||||||
// console.log('🚀 ~ file: MarketData-new.ts:271 ~ params:', diffV.at(-1), params)
|
|
||||||
// // return 0
|
|
||||||
// }
|
|
||||||
// // formatter: '{b}: {@score}'
|
|
||||||
// },
|
|
||||||
// itemStyle: {
|
|
||||||
// // color: '#ec0000'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
option.series = cuType.type == 'cu0000' ? series : series.filter((_, i) => i != 1)
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
// const ss = computed(() => [state.type])
|
|
||||||
watch(
|
|
||||||
() => cuType,
|
|
||||||
async (v) => {
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
// getDat()
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
|
|
||||||
return { chartRef, option: optionRef, cuType }
|
|
||||||
}
|
|
||||||
const alType = reactive<any>({
|
|
||||||
type: 'al0000'
|
|
||||||
})
|
|
||||||
export function Chart11(type = 'Al') {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref()
|
|
||||||
// const state = ref({
|
|
||||||
// type
|
|
||||||
// })
|
|
||||||
async function getDat() {
|
|
||||||
const { data = {} } =
|
|
||||||
type == 'Cu'
|
|
||||||
? await fetchTimeFuturecenterCu({ type: alType.type })
|
|
||||||
: await fetchTimeFuturecenterAl({ type: alType.type })
|
|
||||||
const { list = [] } = data
|
|
||||||
let xData: any = []
|
|
||||||
let lastPrice: any = []
|
|
||||||
let diff: any = []
|
|
||||||
let diffV: any = []
|
|
||||||
let tradingDay = ''
|
|
||||||
tradingDay = list[0]?.updateTime?.substr(0, 10) || ''
|
|
||||||
list.forEach((item: any) => {
|
|
||||||
xData.push(item.updateTime)
|
|
||||||
lastPrice.push(item.lastPrice)
|
|
||||||
diff.push(item.avgPrice)
|
|
||||||
diffV.push(parseFloat(item.diffValue).toFixed(2))
|
|
||||||
})
|
|
||||||
const option = {
|
|
||||||
// height: '270px', // 设置图表高度为 400 像素
|
|
||||||
height: '140px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
right: '10',
|
|
||||||
// top: 90,
|
|
||||||
// bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['SMM', 'LME'],
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
// position: function (pt) {
|
|
||||||
// return [pt[0], '10%']
|
|
||||||
// },
|
|
||||||
// backgroundColor: '#4c4c4c90',
|
|
||||||
appendTo: 'body',
|
|
||||||
formatter: function (params: any) {
|
|
||||||
const { dataIndex } = params[0]
|
|
||||||
const val = list[dataIndex]
|
|
||||||
const style = 'display: flex;justify-content: space-between;align-items: center;'
|
|
||||||
const isUp = val.diffPrice > 0
|
|
||||||
const priceStyle = isUp ? 'color: #ec0000;' : 'color: #00da3c;'
|
|
||||||
return `
|
|
||||||
<div style="width:120px;font-size:12px;line-height:18px;">
|
|
||||||
<div style="${style}borderBottom: 1px solid #ccc">
|
|
||||||
<span>时间:</span>
|
|
||||||
<span>${val.updateTime?.substr(11, 5)}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>最新价:</span>
|
|
||||||
<span style="${priceStyle}">${val.lastPrice}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>涨跌额:</span>
|
|
||||||
<span style="${priceStyle}">${val.diffPrice}</span>
|
|
||||||
</div>
|
|
||||||
<div style="${style}">
|
|
||||||
<span>涨跌幅:</span>
|
|
||||||
<span style="${priceStyle}">${val.diffValue}%</span>
|
|
||||||
</div>
|
|
||||||
${
|
|
||||||
alType.type
|
|
||||||
? `<div style="${style}">
|
|
||||||
<span>成交额:</span>
|
|
||||||
<span>${val.donePrice ? (val.donePrice / 100000000).toFixed(2) : 0}亿</span>
|
|
||||||
</div>`
|
|
||||||
: ''
|
|
||||||
}
|
|
||||||
<div style="${style}">
|
|
||||||
<span>成交量:</span>
|
|
||||||
<span>${val.doneNumber}</span>
|
|
||||||
</div>
|
|
||||||
${
|
|
||||||
alType.type
|
|
||||||
? `<div style="${style}">
|
|
||||||
<span>均价:</span>
|
|
||||||
<span>${val.avgPrice}</span>
|
|
||||||
</div>`
|
|
||||||
: ''
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
position: function (pos, params, el, elRect, size) {
|
|
||||||
const obj: any = {
|
|
||||||
top: 10
|
|
||||||
}
|
|
||||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 100
|
|
||||||
return obj
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
animation: true,
|
|
||||||
link: [
|
|
||||||
{
|
|
||||||
xAxisIndex: 'all'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
label: {
|
|
||||||
backgroundColor: '#505765'
|
|
||||||
// formatter: function (params: any) {
|
|
||||||
// const val = parseFloat(params.value).toFixed(0)
|
|
||||||
// return params.axisDimension == 'x' ? `${tradingDay} ${params.value}:00` : val
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
boundaryGap: false,
|
|
||||||
splitLine: { show: false },
|
|
||||||
axisLine: { onZero: false },
|
|
||||||
axisLabel: {
|
|
||||||
formatter: function (value: any) {
|
|
||||||
return value.substr(11, 5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
// {
|
|
||||||
// name: 'Dow-Jones index',
|
|
||||||
// type: 'candlestick',
|
|
||||||
// data: list,
|
|
||||||
// itemStyle: {
|
|
||||||
// color: '#00da3c',
|
|
||||||
// color0: '#ec0000',
|
|
||||||
// borderColor: undefined,
|
|
||||||
// borderColor0: undefined
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '',
|
|
||||||
min: 'dataMin',
|
|
||||||
max: 'dataMax',
|
|
||||||
scale: true,
|
|
||||||
// splitArea: {
|
|
||||||
// show: true
|
|
||||||
// },
|
|
||||||
boundaryGap: [0, '100%']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'value',
|
|
||||||
name: '',
|
|
||||||
// min: 'dataMin',
|
|
||||||
// formatter: '{value} %',
|
|
||||||
// alignTicks: true,
|
|
||||||
// boundaryGap: [0, '100%'],
|
|
||||||
scale: true,
|
|
||||||
onZero: false,
|
|
||||||
minInterval: 0.1,
|
|
||||||
axisLabel: {
|
|
||||||
// formatter: '{value}%'
|
|
||||||
formatter: function (value, index) {
|
|
||||||
return value.toFixed(1) + '%'
|
|
||||||
},
|
|
||||||
color: function (value, index) {
|
|
||||||
return value > 0 ? '#ec0000' : value == 0 ? '#333' : '#00da3c' //改变颜色 '%'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: 'inside',
|
|
||||||
start: 80,
|
|
||||||
end: 100
|
|
||||||
},
|
|
||||||
{
|
|
||||||
start: 80,
|
|
||||||
end: 100
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: []
|
|
||||||
}
|
|
||||||
const series = [
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
// areaStyle: {},
|
|
||||||
data: lastPrice
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
show: false,
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
// yAxisIndex: 1,
|
|
||||||
// areaStyle: {},
|
|
||||||
data: diff,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
// color: '#E08F2D',
|
|
||||||
lineStyle: {
|
|
||||||
color: '#E08F2D'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '',
|
|
||||||
type: 'line',
|
|
||||||
emphasis: {
|
|
||||||
focus: 'series'
|
|
||||||
},
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
yAxisIndex: 1,
|
|
||||||
// markLine: {
|
|
||||||
// type: 'average',
|
|
||||||
// lineStyle: {
|
|
||||||
// color: '#E08F2D30'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
data: diffV,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
// color: '#E08F2D',
|
|
||||||
lineStyle: {
|
|
||||||
type: 'dotted',
|
|
||||||
color: 'transparent'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
option.series = alType.type == 'al0000' ? series : series.filter((_: any, index) => index != 1)
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
// const ss = computed(() => [state.type])
|
|
||||||
watch(
|
|
||||||
() => alType,
|
|
||||||
async (v) => {
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
// getDat()
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
|
|
||||||
return { chartRef, option: optionRef, alType }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart3() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await historyStatSevenDay({
|
|
||||||
currencyCodeFrom: state2.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state2.currencyCodeTo
|
|
||||||
})
|
|
||||||
if (!data) return
|
|
||||||
const dat = (data[state2.currencyCodeFrom + '-' + state2.currencyCodeTo] || []).map(
|
|
||||||
(item: any) => (item == 0 ? null : item)
|
|
||||||
)
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: reverseArray(getDay(), 8, 10)
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state2.currencyCodeFrom + '-' + state2.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#8F97F8',
|
|
||||||
type: 'line',
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state2.currencyCodeFrom, state2.currencyCodeTo])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
console.log(state2.type)
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state2 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart4() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await historyStatSevenDay({
|
|
||||||
currencyCodeFrom: state3.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state3.currencyCodeTo
|
|
||||||
})
|
|
||||||
if (!data) return
|
|
||||||
const dat = (data[state3.currencyCodeFrom + '-' + state3.currencyCodeTo] || []).map(
|
|
||||||
(item: any) => (item == 0 ? null : item)
|
|
||||||
)
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
|
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
|
||||||
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: reverseArray(getDay(), 8, 10)
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state3.currencyCodeFrom + '-' + state3.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#8F97F8',
|
|
||||||
type: 'line',
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state3.currencyCodeFrom, state3.currencyCodeTo])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
console.log(state3.type)
|
|
||||||
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state3 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart5() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
let nameX: string[]
|
|
||||||
async function dataList() {
|
|
||||||
let SMM, LME
|
|
||||||
const { data } = await historyStat({
|
|
||||||
number: state4.number,
|
|
||||||
type: state4.type,
|
|
||||||
dateList: state4.dateList
|
|
||||||
})
|
|
||||||
if (data && data[state4.number]) {
|
|
||||||
SMM = data[state4.number].SMM || []
|
|
||||||
LME = data[state4.number].LME || []
|
|
||||||
SMM = SMM.map((item: any) => (item == 0 ? null : item))
|
|
||||||
LME = LME.map((item: any) => (item == 0 ? null : item))
|
|
||||||
}
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
// width: '250px', // 设置图表宽度为 800 像素
|
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['SMM', 'LME'],
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: nameX
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: 'value'
|
|
||||||
// name:'1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// name:'2',
|
|
||||||
type: 'value'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: 'SMM',
|
|
||||||
data: SMM,
|
|
||||||
color: '#FF9307',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'LME',
|
|
||||||
data: LME,
|
|
||||||
type: 'line',
|
|
||||||
color: '#0063ED',
|
|
||||||
smooth: true,
|
|
||||||
yAxisIndex: 1,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [state4.number, state4.startTime, state4.endTime])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
// console.log(calculateDateIntervals(state4.startTime,state4.endTime),88888)
|
|
||||||
const { type, list } = calculateDateIntervals(state4.startTime, state4.endTime)
|
|
||||||
nameX = list
|
|
||||||
state4.dateList = list
|
|
||||||
state4.type = type
|
|
||||||
console.log(state4.number)
|
|
||||||
dataList()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state4 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Chart6() {
|
|
||||||
const chartRef = ref()
|
|
||||||
const optionRef = ref<any>({})
|
|
||||||
|
|
||||||
let nameX: string[]
|
|
||||||
async function getDat() {
|
|
||||||
const { data } = await rateHistoryStat({
|
|
||||||
currencyCodeFrom: state5.currencyCodeFrom,
|
|
||||||
currencyCodeTo: state5.currencyCodeTo,
|
|
||||||
type: state5.type,
|
|
||||||
dateList: state5.dateList
|
|
||||||
})
|
|
||||||
const dat = (data[state5.currencyCodeFrom + '-' + state5.currencyCodeTo] || []).map(
|
|
||||||
(item: any) => (item == 0 ? null : item)
|
|
||||||
)
|
|
||||||
const option = {
|
|
||||||
// width: '250px', // 设置图表宽度为 800 像素
|
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
|
||||||
left: '10',
|
|
||||||
top: 90,
|
|
||||||
right: '10',
|
|
||||||
bottom: '10',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis'
|
|
||||||
},
|
|
||||||
// legend: {
|
|
||||||
// data:state5.currencyCodeFrom-state5.currencyCodeTo,
|
|
||||||
// right: 20,
|
|
||||||
// top: 10,
|
|
||||||
// },
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: nameX
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: state5.currencyCodeFrom + '-' + state5.currencyCodeTo,
|
|
||||||
data: dat,
|
|
||||||
color: '#89DF75',
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
showDataShadow: true,
|
|
||||||
connectNulls: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
optionRef.value = option
|
|
||||||
}
|
|
||||||
const ss = computed(() => [
|
|
||||||
state5.currencyCodeFrom,
|
|
||||||
state5.currencyCodeTo,
|
|
||||||
state5.startTime,
|
|
||||||
state5.endTime
|
|
||||||
])
|
|
||||||
watch(
|
|
||||||
() => unref(ss),
|
|
||||||
async (v) => {
|
|
||||||
const { type, list } = calculateDateIntervals(state5.startTime, state5.endTime)
|
|
||||||
|
|
||||||
nameX = list
|
|
||||||
state5.dateList = list
|
|
||||||
state5.type = type
|
|
||||||
getDat()
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: true }
|
|
||||||
)
|
|
||||||
watchEffect(() => {
|
|
||||||
const option = chartRef.value
|
|
||||||
chartRef.value = option
|
|
||||||
})
|
|
||||||
return { chartRef, option: optionRef, state5 }
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +1,31 @@
|
||||||
import {
|
import { historyStat,rateHistoryStat,historyMarketSevenDay,historyStatSevenDay} from '@/api/daikin/base'
|
||||||
historyStat,
|
|
||||||
rateHistoryStat,
|
|
||||||
historyMarketSevenDay,
|
|
||||||
historyStatSevenDay
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import type { EChartsOption } from 'echarts'
|
import type { EChartsOption } from 'echarts'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import {calculateDateIntervals} from '@/utils/format'
|
import {calculateDateIntervals} from '@/utils/format'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
type: 'Cu'
|
type: 'Cu',
|
||||||
})
|
})
|
||||||
const state1 = reactive<any>({
|
const state1 = reactive<any>({
|
||||||
currencyCodeFrom:'CNA',
|
currencyCodeFrom:'CNA',
|
||||||
currencyCodeTo: 'USD'
|
currencyCodeTo:'USD',
|
||||||
})
|
})
|
||||||
const state2 = reactive<any>({
|
const state2 = reactive<any>({
|
||||||
currencyCodeFrom:'CNA',
|
currencyCodeFrom:'CNA',
|
||||||
currencyCodeTo: 'USD'
|
currencyCodeTo:'USD',
|
||||||
})
|
})
|
||||||
const state3 = reactive<any>({
|
const state3 = reactive<any>({
|
||||||
currencyCodeFrom:'USD',
|
currencyCodeFrom:'USD',
|
||||||
currencyCodeTo: 'CNA'
|
currencyCodeTo:'CNA',
|
||||||
})
|
})
|
||||||
const state4 = reactive<any>({
|
const state4 = reactive<any>({
|
||||||
number:'Cu',
|
number:'Cu',
|
||||||
type: '2',
|
type: '2',
|
||||||
dateList:calculateDateIntervals('','').list,
|
dateList:calculateDateIntervals('','').list,
|
||||||
startTime:'',
|
startTime:'',
|
||||||
endTime: ''
|
endTime:'',
|
||||||
})
|
})
|
||||||
const state5 = reactive<any>({
|
const state5 = reactive<any>({
|
||||||
currencyCodeFrom:'CNA',
|
currencyCodeFrom:'CNA',
|
||||||
|
|
@ -36,47 +33,45 @@ const state5 = reactive<any>({
|
||||||
type: '2',
|
type: '2',
|
||||||
dateList:calculateDateIntervals('','').list,
|
dateList:calculateDateIntervals('','').list,
|
||||||
startTime:'',
|
startTime:'',
|
||||||
endTime: ''
|
endTime:'',
|
||||||
})
|
})
|
||||||
|
|
||||||
function getDay(){
|
function getDay(){
|
||||||
const today = new Date()
|
const today = new Date();
|
||||||
const pastSevenDays = []
|
const pastSevenDays = [];
|
||||||
|
|
||||||
for (let i = 6; i >= 0; i--) {
|
for (let i = 6; i >= 0; i--) {
|
||||||
const date = new Date(today)
|
const date = new Date(today);
|
||||||
date.setDate(today.getDate() - i)
|
date.setDate(today.getDate() - i);
|
||||||
pastSevenDays.push(date.toISOString().split('T')[0])
|
pastSevenDays.push(date.toISOString().split('T')[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pastSevenDays
|
return pastSevenDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
function reverseArray(inputArray: string | any[],star: number,enc: number) {
|
function reverseArray(inputArray: string | any[],star: number,enc: number) {
|
||||||
const reversedArray = []
|
const reversedArray = [];
|
||||||
|
|
||||||
for (let i = 0; i <= inputArray.length - 1; i++) {
|
for (let i = 0; i <= inputArray.length - 1; i++) {
|
||||||
reversedArray.push(inputArray[i].substring(star, enc))
|
reversedArray.push(inputArray[i].substring(star,enc));
|
||||||
}
|
}
|
||||||
|
|
||||||
return reversedArray
|
return reversedArray;
|
||||||
}
|
}
|
||||||
export function Chart1(type = state.type) {
|
export function Chart1() {
|
||||||
const chartRef = ref()
|
const chartRef = ref()
|
||||||
const optionRef = ref()
|
const optionRef = ref()
|
||||||
getDat()
|
|
||||||
async function getDat() {
|
async function getDat() {
|
||||||
const { data } = await historyMarketSevenDay({ number: type })
|
const { data } = await historyMarketSevenDay({ number: state.type })
|
||||||
if (!data) return
|
if (!data) return
|
||||||
let { LME, SMM } = data[type]
|
let { LME, SMM } = data[state.type]
|
||||||
SMM = SMM.map((item: any) => (item == 0 ? null : item))
|
SMM = SMM.map((item: any) => (item == 0 ? null : item))
|
||||||
LME = LME.map((item: any) => (item == 0 ? null : item))
|
LME = LME.map((item: any) => (item == 0 ? null : item))
|
||||||
const option = {
|
const option = {
|
||||||
// width: '100%', // 设置图表宽度为 800 像素
|
height: '150px', // 设置图表高度为 400 像素
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
|
||||||
grid: {
|
grid: {
|
||||||
left: '10',
|
left: '10',
|
||||||
top: 60,
|
top: 90,
|
||||||
right: '10',
|
right: '10',
|
||||||
bottom: '10',
|
bottom: '10',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
|
|
@ -133,15 +128,15 @@ export function Chart1(type = state.type) {
|
||||||
}
|
}
|
||||||
optionRef.value = option
|
optionRef.value = option
|
||||||
}
|
}
|
||||||
// const ss = computed(() => [state.type])
|
const ss = computed(() => [state.type])
|
||||||
// watch(
|
watch(
|
||||||
// () => unref(ss),
|
() => unref(ss),
|
||||||
// async (v) => {
|
async (v) => {
|
||||||
// console.log(state.type)
|
console.log(state.type)
|
||||||
// getDat()
|
getDat()
|
||||||
// },
|
},
|
||||||
// { immediate: true, deep: true }
|
{ immediate: true, deep: true }
|
||||||
// )
|
)
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
const option = chartRef.value
|
const option = chartRef.value
|
||||||
chartRef.value = option
|
chartRef.value = option
|
||||||
|
|
@ -160,9 +155,9 @@ export function Chart3() {
|
||||||
currencyCodeTo: state2.currencyCodeTo
|
currencyCodeTo: state2.currencyCodeTo
|
||||||
})
|
})
|
||||||
if (!data) return
|
if (!data) return
|
||||||
const dat = (data[state2.currencyCodeFrom + '-' + state2.currencyCodeTo] || []).map(
|
const dat = (
|
||||||
(item: any) => (item == 0 ? null : item)
|
data[state2.currencyCodeFrom + '-' + state2.currencyCodeTo] || []
|
||||||
)
|
).map((item: any) => (item == 0 ? null : item))
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
height: '150px', // 设置图表高度为 400 像素
|
height: '150px', // 设置图表高度为 400 像素
|
||||||
|
|
@ -232,9 +227,9 @@ export function Chart4() {
|
||||||
currencyCodeTo: state3.currencyCodeTo
|
currencyCodeTo: state3.currencyCodeTo
|
||||||
})
|
})
|
||||||
if (!data) return
|
if (!data) return
|
||||||
const dat = (data[state3.currencyCodeFrom + '-' + state3.currencyCodeTo] || []).map(
|
const dat = (
|
||||||
(item: any) => (item == 0 ? null : item)
|
data[state3.currencyCodeFrom + '-' + state3.currencyCodeTo] || []
|
||||||
)
|
).map((item: any) => (item == 0 ? null : item))
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
grid: {
|
grid: {
|
||||||
|
|
@ -376,7 +371,10 @@ export function Chart5() {
|
||||||
() => unref(ss),
|
() => unref(ss),
|
||||||
async (v) => {
|
async (v) => {
|
||||||
// console.log(calculateDateIntervals(state4.startTime,state4.endTime),88888)
|
// console.log(calculateDateIntervals(state4.startTime,state4.endTime),88888)
|
||||||
const { type, list } = calculateDateIntervals(state4.startTime, state4.endTime)
|
const { type, list } = calculateDateIntervals(
|
||||||
|
state4.startTime,
|
||||||
|
state4.endTime
|
||||||
|
)
|
||||||
nameX = list
|
nameX = list
|
||||||
state4.dateList = list
|
state4.dateList = list
|
||||||
state4.type = type
|
state4.type = type
|
||||||
|
|
@ -404,9 +402,9 @@ export function Chart6() {
|
||||||
type: state5.type,
|
type: state5.type,
|
||||||
dateList: state5.dateList
|
dateList: state5.dateList
|
||||||
})
|
})
|
||||||
const dat = (data[state5.currencyCodeFrom + '-' + state5.currencyCodeTo] || []).map(
|
const dat = (
|
||||||
(item: any) => (item == 0 ? null : item)
|
data[state5.currencyCodeFrom + '-' + state5.currencyCodeTo] || []
|
||||||
)
|
).map((item: any) => (item == 0 ? null : item))
|
||||||
const option = {
|
const option = {
|
||||||
// width: '250px', // 设置图表宽度为 800 像素
|
// width: '250px', // 设置图表宽度为 800 像素
|
||||||
// height: '150px', // 设置图表高度为 400 像素
|
// height: '150px', // 设置图表高度为 400 像素
|
||||||
|
|
@ -455,7 +453,10 @@ export function Chart6() {
|
||||||
watch(
|
watch(
|
||||||
() => unref(ss),
|
() => unref(ss),
|
||||||
async (v) => {
|
async (v) => {
|
||||||
const { type, list } = calculateDateIntervals(state5.startTime, state5.endTime)
|
const { type, list } = calculateDateIntervals(
|
||||||
|
state5.startTime,
|
||||||
|
state5.endTime
|
||||||
|
)
|
||||||
|
|
||||||
nameX = list
|
nameX = list
|
||||||
state5.dateList = list
|
state5.dateList = list
|
||||||
|
|
|
||||||
|
|
@ -1,721 +0,0 @@
|
||||||
<!-- 市况 -->
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { Chart1,Chart11, Chart3, Chart4, Chart5, Chart6 } from './MarketData-new'
|
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
|
||||||
import AppBlock from '@/components/AppBlock.vue'
|
|
||||||
import AppNewsBox from '@/components/AppNewsBox.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
||||||
import { getList, marketPreADD, getMarketUser, saveMarketUser, MarketDownload, MarketPreview, getCurrencyList, getMetalList, fetchExchangeInfo, fetchTimeFuturecenterCu, fetchTimeFuturecenterAl } from '@/api/daikin/base'
|
|
||||||
import { NModal, NCard } from 'naive-ui'
|
|
||||||
import { formatDate } from '@/utils/format'
|
|
||||||
import { message } from '@/utils/message'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
|
||||||
import Amtion from '@/components/amtion.vue'
|
|
||||||
import { use } from 'echarts/core'
|
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
|
||||||
import { groupBy } from 'lodash-es'
|
|
||||||
import {
|
|
||||||
LegendComponent,
|
|
||||||
TooltipComponent,
|
|
||||||
GridComponent,
|
|
||||||
TitleComponent,
|
|
||||||
} from 'echarts/components'
|
|
||||||
import { PieChart, BarChart, LineChart, CandlestickChart } from 'echarts/charts'
|
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
|
||||||
const store = useUserStore()
|
|
||||||
const stores = noticeld()
|
|
||||||
const userCode = ['admin', 'shikuang_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
const userCodes = ['admin', 'huilv_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
|
|
||||||
use([
|
|
||||||
CanvasRenderer,
|
|
||||||
LegendComponent,
|
|
||||||
TooltipComponent,
|
|
||||||
GridComponent,
|
|
||||||
TitleComponent,
|
|
||||||
PieChart,
|
|
||||||
BarChart,
|
|
||||||
LineChart,
|
|
||||||
CandlestickChart
|
|
||||||
])
|
|
||||||
|
|
||||||
const { day, week } = useDate()
|
|
||||||
const { push } = useRouter()
|
|
||||||
const currentDate = new Date();
|
|
||||||
const currentDates = new Date();
|
|
||||||
const value1 = ref<[Date, Date]>([
|
|
||||||
currentDate.setMonth(currentDate.getMonth() - 11),
|
|
||||||
new Date()
|
|
||||||
])
|
|
||||||
const value2 = ref<[Date, Date]>([
|
|
||||||
currentDates.setMonth(currentDates.getMonth() - 11),
|
|
||||||
new Date()
|
|
||||||
])
|
|
||||||
const { chartRef: chartRef1, option: chartOption1, cuType } = Chart1()
|
|
||||||
const { option: chartOption11,alType } = Chart11()
|
|
||||||
const { chartRef: chartRef3, option: chartOption3, state2 } = Chart3()
|
|
||||||
const { chartRef: chartRef4, option: chartOption4, state3 } = Chart4()
|
|
||||||
const { chartRef: chartRef5, option: chartOption5, state4 } = Chart5()
|
|
||||||
// const { state4 } = Chart5()
|
|
||||||
const { chartRef: chartRef6, option: chartOption6, state5 } = Chart6()
|
|
||||||
|
|
||||||
const listData = ref()
|
|
||||||
const listDatas = ref()
|
|
||||||
async function getData() {
|
|
||||||
const { data } = await getList({ type: 2 })
|
|
||||||
const { data: ds } = await getList({ type: 1 })
|
|
||||||
listData.value = data
|
|
||||||
listDatas.value = ds
|
|
||||||
}
|
|
||||||
const metal = ref()
|
|
||||||
const currency = ref()
|
|
||||||
onMounted(async () => {
|
|
||||||
getData()
|
|
||||||
const { data } = await getCurrencyList()
|
|
||||||
const { data: dat } = await getMetalList()
|
|
||||||
if (dat && dat != 'null' && dat.length > 0) {
|
|
||||||
metal.value = dat
|
|
||||||
// .filter((item:any) => {
|
|
||||||
// if(["Fe","lengmei"].includes(item.value)){
|
|
||||||
// return false
|
|
||||||
// }else return item
|
|
||||||
// })
|
|
||||||
from.value.label.radio = dat[0].value
|
|
||||||
state4.number = dat[0].value
|
|
||||||
console.log("🚀 ~ file: Market.vue:56 ~ metal:", metal)
|
|
||||||
}
|
|
||||||
if (data && data != 'null' && data.length > 0) {
|
|
||||||
currency.value = data
|
|
||||||
from.value.labe2.radio = data[0].value
|
|
||||||
const dat = data[0].value.split(',')
|
|
||||||
state5.currencyCodeFrom = dat[0]
|
|
||||||
state5.currencyCodeTo = dat[1]
|
|
||||||
state2.currencyCodeFrom = dat[0]
|
|
||||||
state2.currencyCodeTo = dat[1]
|
|
||||||
state3.currencyCodeFrom = dat[0]
|
|
||||||
state3.currencyCodeTo = dat[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const src = ref('');
|
|
||||||
const srcType = ref()
|
|
||||||
const showModalRef2 = ref(false)
|
|
||||||
const lokeFuck = async (n) => {
|
|
||||||
const { id } = n
|
|
||||||
if (!id) return
|
|
||||||
let { data: { url } } = await MarketPreview({ id })
|
|
||||||
if (!url) {
|
|
||||||
message.info("没有可预览文件!")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
srcType.value = getLastSubstring(url)
|
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
|
||||||
// src.value = filePath
|
|
||||||
// pdfShow.value = true
|
|
||||||
url = 'https://view.xdocin.com/view?src=' + url
|
|
||||||
const screenWidth = window.screen.width;
|
|
||||||
const screenHeight = window.screen.height;
|
|
||||||
window.open(url, '', 'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
function getLastSubstring(str: string): string {
|
|
||||||
const lastIndex = str.lastIndexOf('.');
|
|
||||||
if (lastIndex !== -1) {
|
|
||||||
return str.substring(lastIndex + 1);
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function downloadFile(data: { id: any; title: string }) {
|
|
||||||
console.log(data)
|
|
||||||
if (!data.id) return
|
|
||||||
try {
|
|
||||||
const response = await MarketDownload({ id: data.id })
|
|
||||||
console.log(response)
|
|
||||||
var blob = new Blob([response.data]);
|
|
||||||
|
|
||||||
const downloadUrl = URL.createObjectURL(blob);
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.href = downloadUrl;
|
|
||||||
link.download = response.fileName; // 替换为你要保存的文件名
|
|
||||||
link.click();
|
|
||||||
URL.revokeObjectURL(downloadUrl);
|
|
||||||
} catch (error) {
|
|
||||||
message.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const tab = ref(false)
|
|
||||||
const tab1 = ref(false)
|
|
||||||
const tab2 = ref(false)
|
|
||||||
const names = ref('Cu')
|
|
||||||
const names1 = ref('100USD-CNY')
|
|
||||||
const names2 = ref('100USD-CNY')
|
|
||||||
const tabClick1 = (e) => {
|
|
||||||
|
|
||||||
console.log(e.target.getAttribute('data-id'))
|
|
||||||
tab1.value = false
|
|
||||||
const dat = e.target.getAttribute('data-id').split(',')
|
|
||||||
names1.value = e.target.innerText
|
|
||||||
state2.currencyCodeFrom = dat[0]
|
|
||||||
state2.currencyCodeTo = dat[1]
|
|
||||||
}
|
|
||||||
const tabClick2 = (e) => {
|
|
||||||
|
|
||||||
console.log(e.target.getAttribute('data-id'))
|
|
||||||
tab2.value = false
|
|
||||||
const dat = e.target.getAttribute('data-id').split(',')
|
|
||||||
names2.value = e.target.innerText
|
|
||||||
state3.currencyCodeFrom = dat[0]
|
|
||||||
state3.currencyCodeTo = dat[1]
|
|
||||||
}
|
|
||||||
const tabClick = (e) => {
|
|
||||||
|
|
||||||
console.log(e.target)
|
|
||||||
tab.value = false
|
|
||||||
state.type = e.target.getAttribute('data-id')
|
|
||||||
// names.value =e.target.innerText
|
|
||||||
}
|
|
||||||
const tabShow = (num) => {
|
|
||||||
|
|
||||||
console.log(num)
|
|
||||||
switch (num) {
|
|
||||||
case 0:
|
|
||||||
tab.value = tab.value === false ? true : false
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
tab1.value = tab1.value === false ? true : false
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
tab2.value = tab2.value === false ? true : false
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const from = ref({
|
|
||||||
label: {
|
|
||||||
radio: ''
|
|
||||||
},
|
|
||||||
labe2: {
|
|
||||||
radio: ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const shomk = ref(false)
|
|
||||||
const sdubList = ref({
|
|
||||||
title: '',
|
|
||||||
fileList: [],
|
|
||||||
})
|
|
||||||
const shomks = (it) => {
|
|
||||||
sdubList.value.type = it
|
|
||||||
// console.log(sdubList.value)
|
|
||||||
shomk.value = true
|
|
||||||
}
|
|
||||||
async function onSubmit() {
|
|
||||||
const { type, title, fileList } = sdubList.value
|
|
||||||
|
|
||||||
let filePath
|
|
||||||
if (fileList.length > 0) {
|
|
||||||
// console.log(fileList)
|
|
||||||
filePath = fileList[0].response.url
|
|
||||||
}
|
|
||||||
|
|
||||||
const { msg, code } = await marketPreADD({ type, title, filePath })
|
|
||||||
if (code === 200) { message.success("修改成功") }
|
|
||||||
else message.warning(msg)
|
|
||||||
window.location.reload();
|
|
||||||
// console.log(sdubList.value)
|
|
||||||
}
|
|
||||||
const handleExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
|
||||||
message.warning("当前只支持上传一个文件")
|
|
||||||
}
|
|
||||||
const thisCka = (e) => {
|
|
||||||
if (value1.value) {
|
|
||||||
state4.startTime = formatDate(value1.value[0]).substring(0, 10)
|
|
||||||
state4.endTime = formatDate(value1.value[1]).substring(0, 10)
|
|
||||||
}
|
|
||||||
state4.number = e
|
|
||||||
console.log(e)
|
|
||||||
}
|
|
||||||
const thisCka2 = (e) => {
|
|
||||||
const dat = e.split(',')
|
|
||||||
if (value2.value) {
|
|
||||||
state5.startTime = formatDate(value2.value[0]).substring(0, 10)
|
|
||||||
state5.endTime = formatDate(value2.value[1]).substring(0, 10)
|
|
||||||
}
|
|
||||||
state5.currencyCodeFrom = dat[0]
|
|
||||||
state5.currencyCodeTo = dat[1]
|
|
||||||
}
|
|
||||||
const timenFirst = (e) => {
|
|
||||||
// console.log(e)
|
|
||||||
state4.startTime = formatDate(value1.value[0]).substring(0, 10)
|
|
||||||
state4.endTime = formatDate(value1.value[1]).substring(0, 10)
|
|
||||||
}
|
|
||||||
const timenFirsts = (e) => {
|
|
||||||
// console.log(e)
|
|
||||||
state5.startTime = formatDate(value2.value[0]).substring(0, 10)
|
|
||||||
state5.endTime = formatDate(value2.value[1]).substring(0, 10)
|
|
||||||
}
|
|
||||||
const header = { 'token': store.user.token }
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const flg = ref()
|
|
||||||
const setUserList = ref()
|
|
||||||
async function getUser(moduleId: any) {
|
|
||||||
showModal.value = !showModal.value
|
|
||||||
flg.value = moduleId
|
|
||||||
const { data: userArr } = await getMarketUser({ moduleId })
|
|
||||||
stores.article.reviewSource = '2'
|
|
||||||
setUserList.value = userArr
|
|
||||||
|
|
||||||
}
|
|
||||||
// 获取子组件传过来的值
|
|
||||||
const handleChild = (data: any) => {
|
|
||||||
console.log(data, 444);
|
|
||||||
const { showModal: show, multipleSelection } = data
|
|
||||||
showModal.value = unref(show)
|
|
||||||
// userList.value = multipleSelection
|
|
||||||
let userIdList: any[] = []
|
|
||||||
multipleSelection.value.forEach((i: { userId: any }) => {
|
|
||||||
// console.log(dataList.value)
|
|
||||||
userIdList.push(i.userId)
|
|
||||||
})
|
|
||||||
|
|
||||||
saveMarketUser({
|
|
||||||
moduleId: flg.value,
|
|
||||||
userIdList: userIdList
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const CloseThiss = (data: boolean) => {
|
|
||||||
showModal.value = data
|
|
||||||
}
|
|
||||||
|
|
||||||
getHomeExInfo()
|
|
||||||
const exchangeInfo = ref({})
|
|
||||||
// getTimeFuturecenter()
|
|
||||||
const homeExchangeInfo = ref<any>([])
|
|
||||||
async function getHomeExInfo() {
|
|
||||||
const { data } = await fetchExchangeInfo()
|
|
||||||
exchangeInfo.value = groupBy(data,'channel')
|
|
||||||
console.log('🚀 ~ file: Home.vue:252 ~ }):', exchangeInfo.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getTimeFuturecenter() {
|
|
||||||
const { data } = await fetchTimeFuturecenterCu()
|
|
||||||
console.log("🚀 ~ file: Market.vue:293 ~ data:", data)
|
|
||||||
}
|
|
||||||
|
|
||||||
const cuTypeChange = (e) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<HomeHead class="top">
|
|
||||||
<template #content>
|
|
||||||
<!-- <HomeHeadSearch /> -->
|
|
||||||
</template>
|
|
||||||
</HomeHead>
|
|
||||||
<div class="h-full relative flex flex-col overflow-y-auto scrollbar-width-1px">
|
|
||||||
<div class="pl12px mt30px flex w-full h-full gap-30px">
|
|
||||||
<!-- <img src="./images/shukuang.png" alt="" class="w-full h-full"> -->
|
|
||||||
|
|
||||||
<AppBlock class="flex-1 box">
|
|
||||||
<div class="box-title">市况</div>
|
|
||||||
<el-button type="primary" v-if="userCode" class="button !mr-30px !mt-[-30px] z-100"
|
|
||||||
@click="push({ name: 'MarketDataModify' })">数据管理</el-button>
|
|
||||||
<div class="bgStyle !h250px mt20px">
|
|
||||||
<div class=" relative w100%">
|
|
||||||
|
|
||||||
<span @click="tabShow(0)" class="title bg-#70BFCD pl18px pr24px">{{ names }}
|
|
||||||
<!-- <el-icon><CaretBottom /></el-icon> -->
|
|
||||||
</span>
|
|
||||||
<!-- <span class="absolute right-160px top-14px z-30 text-#000">最近7天数据</span> -->
|
|
||||||
<span class="absolute right-10px top-6px z-30 text-#000">
|
|
||||||
<el-radio-group v-model="cuType.type">
|
|
||||||
<el-radio-button label="SMM" value="cu0000" />
|
|
||||||
<el-radio-button label="LME" value="LME_CA_3M" />
|
|
||||||
</el-radio-group></span>
|
|
||||||
|
|
||||||
<div v-if="false && tab"
|
|
||||||
class="tab absolute bg-#fff w100px top-50px z-50 text-#112144 text-center leading-28px text-18px ">
|
|
||||||
<div v-if="metal"
|
|
||||||
v-for="im in metal.filter((item: any) => !['Fe', 'lengmei'].includes(item.value))"
|
|
||||||
class="py5px !rounded-none" :data-id="im.value" @click="tabClick">{{ im.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="Fe" @click="tabClick">Fe</div>
|
|
||||||
|
|
||||||
<div class="py5px !rounded-none" data-id="Cu" @click="tabClick">Cu</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="Re" @click="tabClick">稀土</div> -->
|
|
||||||
</div>
|
|
||||||
<VChart class="absolute z-22 left-0 right-0 !w-full" ref="chartRef1" :option="chartOption1"
|
|
||||||
autoresize />
|
|
||||||
</div>
|
|
||||||
<!-- <div>
|
|
||||||
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
|
||||||
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption2" autoresize />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h250px mt10px">
|
|
||||||
<div class=" relative w100%">
|
|
||||||
|
|
||||||
<span class="title bg-#FF960F pl18px pr28px">{{ 'AI' }}
|
|
||||||
<!-- <el-icon><CaretBottom /></el-icon> -->
|
|
||||||
</span>
|
|
||||||
<!-- <span class="absolute right-160px top-14px z-30 text-#000">最近7天数据</span> -->
|
|
||||||
<span class="absolute right-10px top-6px z-30 text-#000">
|
|
||||||
<el-radio-group v-model="alType.type">
|
|
||||||
<el-radio-button label="SMM" value="al0000" />
|
|
||||||
<el-radio-button label="LME" value="LME_AH_3M" />
|
|
||||||
</el-radio-group></span>
|
|
||||||
<VChart class="absolute z-22 left-0 right-0 !w-full" ref="chartRef11" :option="chartOption11"
|
|
||||||
autoresize />
|
|
||||||
</div>
|
|
||||||
<!-- <div>
|
|
||||||
<span class="title bg-#70BFCD p5px pl10px !pr25px">AI</span>
|
|
||||||
<VChart class="absolute z-22" ref="chartRef2" :option="chartOption1" autoresize />
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bgStyle !h240px mt10px">
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef5" :option="chartOption5" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt8px ml10px">
|
|
||||||
<div class="flex items-center w-45%">
|
|
||||||
|
|
||||||
<span class="text-#000 whitespace-nowrap">日期:</span>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-date-picker v-model="value1" type="daterange" range-separator="到"
|
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small"
|
|
||||||
@change="timenFirst" /></el-config-provider>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-between items-center">
|
|
||||||
<el-radio-group v-model="from.label.radio" class="ml-4" @change="thisCka">
|
|
||||||
<el-radio v-if="metal" v-for="im in metal" :label="im.value" size="large">{{ im.title
|
|
||||||
}}</el-radio>
|
|
||||||
<!-- <el-radio label="Al" size="large" >Al</el-radio>
|
|
||||||
<el-radio label="Fe" size="large" >Fe</el-radio>
|
|
||||||
<el-radio label="Re" size="large" >稀土</el-radio> -->
|
|
||||||
</el-radio-group>
|
|
||||||
<el-popover placement="top-end" trigger="click"
|
|
||||||
:popper-style="{ width: '590px', borderRadius: '10px' }" :teleported="true">
|
|
||||||
<template #reference>
|
|
||||||
<div
|
|
||||||
class="bg-gr h-42px w115px flex justify-center items-center text-#fff rounded-10px text-18px cursor-pointer font-bold">
|
|
||||||
市况预测 <el-icon class="rotate-270deg">
|
|
||||||
<CaretBottom />
|
|
||||||
</el-icon></div>
|
|
||||||
</template>
|
|
||||||
<!-- <Teleport to="v-screen-box"> -->
|
|
||||||
<!-- <VScaleScreen
|
|
||||||
ref="fitscreenRef"
|
|
||||||
:width="1920"
|
|
||||||
:height="1080"
|
|
||||||
mode="fit"
|
|
||||||
> -->
|
|
||||||
<div class="bgStyle h-250px w-690px mt15px mb10px">
|
|
||||||
<div class="w-full">
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px b">市况预测</span>
|
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(1)">查看范围</el-button> -->
|
|
||||||
<el-button type="primary" size="small" v-if="userCode" class="button !mr-2%"
|
|
||||||
@click="push({ name: 'MarketModifys' })">管理</el-button>
|
|
||||||
<p class="mt40px p15px !border-none max-h250px overflow-auto">
|
|
||||||
<p class="!border-none w-98% !flex items-center pb10px news-item !pr30rpx"
|
|
||||||
v-for="n in listDatas" :key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
|
||||||
<el-button size="small" type="primary" @click="lokeFuck(n)">预览</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- </VScaleScreen> -->
|
|
||||||
<!-- </Teleport> -->
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div v-if="false" class="mt8px ml10px">
|
|
||||||
|
|
||||||
<div class="flex justify-between items-center">
|
|
||||||
<el-popover placement="top-end" trigger="click"
|
|
||||||
:popper-style="{ width: '590px', borderRadius: '10px' }" :teleported="true">
|
|
||||||
<template #reference>
|
|
||||||
<div
|
|
||||||
class="bg-gr h-42px w115px ml-auto flex justify-center items-center text-#fff rounded-10px text-18px cursor-pointer font-bold">
|
|
||||||
市况预测 <el-icon class="rotate-270deg">
|
|
||||||
<CaretBottom />
|
|
||||||
</el-icon></div>
|
|
||||||
</template>
|
|
||||||
<!-- <Teleport to="v-screen-box"> -->
|
|
||||||
<!-- <VScaleScreen
|
|
||||||
ref="fitscreenRef"
|
|
||||||
:width="1920"
|
|
||||||
:height="1080"
|
|
||||||
mode="fit"
|
|
||||||
> -->
|
|
||||||
<div class="bgStyle !h-284px w-690px mt15px mb10px">
|
|
||||||
<div class="w-full">
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px b">市况预测</span>
|
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(1)">查看范围</el-button> -->
|
|
||||||
<el-button type="primary" size="small" v-if="userCode" class="button !mr-2%"
|
|
||||||
@click="push({ name: 'MarketModifys' })">管理</el-button>
|
|
||||||
<p class="mt40px p15px !border-none max-h250px overflow-auto">
|
|
||||||
<p class="!border-none w-98% !flex items-center pb10px news-item !pr30rpx"
|
|
||||||
v-for="n in listDatas" :key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
|
||||||
<el-button size="small" type="primary" @click="lokeFuck(n)">预览</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- </VScaleScreen> -->
|
|
||||||
<!-- </Teleport> -->
|
|
||||||
</el-popover>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
<AppBlock class="flex-1 box">
|
|
||||||
<div class="box-title ">汇率</div>
|
|
||||||
<div class="bgStyle !h250px mt20px z-100">
|
|
||||||
<div class="mr25px">
|
|
||||||
<span @click="tabShow(1)" class="title bg-#FF603A !text-16px pl13px pr20px cursor-pointer !z-100">{{ names1
|
|
||||||
}}<el-icon>
|
|
||||||
<CaretBottom />
|
|
||||||
</el-icon></span>
|
|
||||||
<div v-if="tab1"
|
|
||||||
class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value"
|
|
||||||
@click="tabClick1">{{ it.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick1">人民币-美元</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick1">日元-美元</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef3" :option="chartOption3" autoresize />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span @click="tabShow(2)" class="title bg-#70BFCD !text-16px pl13px pr20px !z-100 cursor-pointer">{{ names2
|
|
||||||
}}<el-icon>
|
|
||||||
<CaretBottom />
|
|
||||||
</el-icon></span>
|
|
||||||
|
|
||||||
<div v-if="tab2"
|
|
||||||
class="tab absolute bg-#fff w100px top-40px z-50 text-#112144 text-center leading-28px text-16px ">
|
|
||||||
<div v-if="currency" v-for="it in currency" class="py5px !rounded-none" :data-id="it.value"
|
|
||||||
@click="tabClick2">{{ it.title }}</div>
|
|
||||||
<!-- <div class="py5px !rounded-none" data-id="CNA,USD" @click="tabClick2">人民币-美元</div>
|
|
||||||
<div class="py5px !rounded-none" data-id="JPY,USD" @click="tabClick2">日元-美元</div> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<VChart class="absolute z-22" ref="chartRef4" :option="chartOption4" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bgStyle !h250px mt10px">
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">历年数据</span>
|
|
||||||
<VChart class=" absolute z-22" ref="chartRef6" :option="chartOption6" autoresize />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt10px ml10px">
|
|
||||||
<div class="flex items-center w-45%">
|
|
||||||
|
|
||||||
<span class="text-#000 whitespace-nowrap">日期:</span>
|
|
||||||
<el-config-provider :locale="zhCn">
|
|
||||||
<el-date-picker v-model="value2" type="daterange" range-separator="到"
|
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" size="small"
|
|
||||||
@change="timenFirsts" /></el-config-provider>
|
|
||||||
</div>
|
|
||||||
<div class="h-30px">
|
|
||||||
<el-radio-group v-model="from.labe2.radio" class="ml-4" @change="thisCka2">
|
|
||||||
<el-radio v-if="currency" v-for="it in currency" :label="it.value" size="large">{{ it.title
|
|
||||||
}}</el-radio>
|
|
||||||
<!-- <el-radio label="JPY,USD" size="large" >日元-美元</el-radio>
|
|
||||||
<el-radio label="CNA,USD" size="large" >人民币-美元</el-radio> -->
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="bgStyle !h230px mt15px mb10px">
|
|
||||||
<div>
|
|
||||||
<span class="title bg-#003BB7 !text-16px pl13px pr20px ">汇率预测</span>
|
|
||||||
<!-- <el-button type="primary" v-if="userCode" class="button" @click="getUser(2)">查看范围</el-button> -->
|
|
||||||
<el-button type="primary" v-if="userCodes" class="button"
|
|
||||||
@click="push({ name: 'MarketModify' })">管理</el-button>
|
|
||||||
<p class="mt40px p15px !border-none max-h-full overflow-auto">
|
|
||||||
<p class="!border-none w615px !flex items-center pb10px news-item " v-for="n in listData"
|
|
||||||
:key="n">
|
|
||||||
<AppNewsBox class="flex-1 !border-none" :text="n.title" :date="n.createTime" />
|
|
||||||
<p class="flex-shrink flex !border-none w35px ml20px">
|
|
||||||
<el-button type="primary" @click="lokeFuck(n)">预览</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="downloadFile(n)">下载</el-button> -->
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div style="width: 1200px; height:800px ; position: fixed; z-index: 100; top:50px;;">
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<n-modal :mask-closable="true" v-model:show="showModalRef2">
|
|
||||||
<div class="w90% h90% ">
|
|
||||||
<Amtion :data="src" :datas="srcType" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</n-modal>
|
|
||||||
|
|
||||||
|
|
||||||
<n-modal v-model:show="shomk">
|
|
||||||
<div class="py40px px30px bg-#fff">
|
|
||||||
|
|
||||||
<el-form :model="sdubList" label-width="120px" :inline="true">
|
|
||||||
|
|
||||||
<el-form-item label="标题">
|
|
||||||
<el-input v-model="sdubList.title" />
|
|
||||||
</el-form-item>
|
|
||||||
<br>
|
|
||||||
<el-form-item label="文件">
|
|
||||||
<el-upload v-model:file-list="sdubList.fileList" class="upload-demo" :headers="header"
|
|
||||||
action="/test-api/common/upload" :on-change="handleChange">
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
|
||||||
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<el-form-item class="ml80px">
|
|
||||||
<el-button type="primary" @click="onSubmit">提交</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</n-modal>
|
|
||||||
<n-modal v-model:show="showModal">
|
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.bg-gr {
|
|
||||||
background: linear-gradient(to left, #34A6D9 0%, #23D1C6 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
display: block;
|
|
||||||
float: right;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -92px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.date-wrapper[data-v-c5c4f420] {
|
|
||||||
line-height: 1.5;
|
|
||||||
position: relative;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
vertical-align: middle;
|
|
||||||
color: #142142;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tab {
|
|
||||||
div:hover {
|
|
||||||
color: #0036BC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
padding: 23px 20px 0 20px;
|
|
||||||
|
|
||||||
.box-title {
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 600;
|
|
||||||
position: relative;
|
|
||||||
padding-left: 24px;
|
|
||||||
color: black;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: " ";
|
|
||||||
display: block;
|
|
||||||
width: 8px;
|
|
||||||
height: 30px;
|
|
||||||
background-color: #003ab5;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bgStyle {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
height: 270px;
|
|
||||||
position: relative;
|
|
||||||
padding: 0 5px;
|
|
||||||
|
|
||||||
div {
|
|
||||||
flex: 1;
|
|
||||||
border: 1px solid rgb(236, 236, 236);
|
|
||||||
border-radius: 18px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
// width: 60px;
|
|
||||||
// height: 60px;
|
|
||||||
border-radius: 18px 0 50px 0;
|
|
||||||
color: aliceblue;
|
|
||||||
line-height: 40px;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: 500;
|
|
||||||
z-index: 1;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -5,7 +5,6 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import { useMessage, NModal } from 'naive-ui'
|
import { useMessage, NModal } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
|
|
||||||
import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
|
import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
|
||||||
|
|
||||||
|
|
@ -16,6 +15,7 @@ const header = { 'token': store.user.token }
|
||||||
const dataA = ref([])
|
const dataA = ref([])
|
||||||
const editA = ref()
|
const editA = ref()
|
||||||
|
|
||||||
|
|
||||||
const shomkA = ref(false)
|
const shomkA = ref(false)
|
||||||
|
|
||||||
async function setDataFiles(arr, _row) {
|
async function setDataFiles(arr, _row) {
|
||||||
|
|
@ -23,8 +23,8 @@ async function setDataFiles(arr, _row) {
|
||||||
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
||||||
if (i.filePathList && i.filePathList.length > 0) {
|
if (i.filePathList && i.filePathList.length > 0) {
|
||||||
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
||||||
file.name = file.originalFileName
|
file.name = file.originalFileName;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
|
|
@ -37,106 +37,85 @@ async function getDataA() {
|
||||||
// setDataFiles(dataArr);
|
// setDataFiles(dataArr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getDataA()
|
getDataA();
|
||||||
})
|
})
|
||||||
|
|
||||||
function computedName(title) {
|
function computedName(title) {
|
||||||
let index = title.indexOf('.')
|
let index = title.indexOf(".");
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
return title.slice(0, index - 1)
|
return title.slice(0, index - 1);
|
||||||
}
|
}
|
||||||
return title
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitA(row: {
|
async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
|
||||||
id: any
|
|
||||||
fileList?: any
|
|
||||||
title?: any
|
|
||||||
isTop?: any
|
|
||||||
isPublish?: any
|
|
||||||
publishTime?: any
|
|
||||||
}) {
|
|
||||||
console.log(row, 555)
|
console.log(row, 555)
|
||||||
const { id, title, isTop, isPublish, publishTime } = row
|
const { id, title } = row
|
||||||
// let moduleId = 1;
|
// let moduleId = 1;
|
||||||
let sendData= {}
|
let sendData= {}
|
||||||
if(!row.id){
|
if(!row.id){
|
||||||
sendData = {
|
sendData = { title,type:type.value,userIdList:userData.value };
|
||||||
title,
|
|
||||||
type: type.value,
|
|
||||||
userIdList: userData.value,
|
|
||||||
isTop,
|
|
||||||
isPublish,
|
|
||||||
publishTime
|
|
||||||
}
|
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
|
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
sendData.filePath = item.response.url
|
sendData.filePath = item.response.url;
|
||||||
// obj.title = title || computedName(item.response.originalFilename);
|
// obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
sendData.filePath = item.url
|
else {
|
||||||
|
sendData.filePath = item.url;
|
||||||
// obj.title = title || computedName(item.originalFilename);
|
// obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
sendData = {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
type: type.value,
|
|
||||||
userIdList: userData.value,
|
|
||||||
isTop,
|
|
||||||
isPublish,
|
|
||||||
publishTime
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
sendData = {id, title,type:type.value,userIdList:userData.value };
|
||||||
}
|
}
|
||||||
console.log(sendData)
|
console.log(sendData)
|
||||||
const {code,msg} = await marketPreADD(sendData)
|
const {code,msg} = await marketPreADD(sendData)
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
getDataA()
|
getDataA();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const handleEditA = (type: string, row: any) => {
|
const handleEditA = (type: string, row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
editA.value = {
|
editA.value = {
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
setUserList.value =[]
|
setUserList.value =[]
|
||||||
shomkA.value = true
|
shomkA.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
|
|
||||||
editA.value = row
|
editA.value = row
|
||||||
editA.value.fileList = [
|
editA.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
setUserList.value =row.userIdList
|
setUserList.value =row.userIdList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleDeleteA(index: number, row: any) {
|
async function handleDeleteA(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await marketPreDelete({ id,type:type.value })
|
const { code, msg } = await marketPreDelete({ id,type:type.value })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
getDataA();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataA()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeName = ref('first')
|
|
||||||
|
const activeName = ref("first")
|
||||||
const userList = ref()
|
const userList = ref()
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
const flg = ref()
|
const flg = ref()
|
||||||
|
|
@ -150,11 +129,12 @@ async function getUser(row) {
|
||||||
}
|
}
|
||||||
// const {data: userArr} = await getBPCUser({moduleId})
|
// const {data: userArr} = await getBPCUser({moduleId})
|
||||||
// setUserList.value = userArr
|
// setUserList.value = userArr
|
||||||
|
|
||||||
}
|
}
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const userData = ref()
|
const userData = ref()
|
||||||
const handleChild = (data: any) => {
|
const handleChild = (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)
|
||||||
let userIdList: any[] =[]
|
let userIdList: any[] =[]
|
||||||
|
|
@ -164,7 +144,7 @@ const handleChild = (data: any) => {
|
||||||
if(flg.value.id){
|
if(flg.value.id){
|
||||||
flg.value.userIdList = userIdList
|
flg.value.userIdList = userIdList
|
||||||
marketPreADD(flg.value)
|
marketPreADD(flg.value)
|
||||||
getDataA()
|
getDataA();
|
||||||
console.log(flg.value)
|
console.log(flg.value)
|
||||||
}
|
}
|
||||||
userData.value = userIdList
|
userData.value = userIdList
|
||||||
|
|
@ -172,6 +152,7 @@ const handleChild = (data: any) => {
|
||||||
const CloseThiss = (data: boolean)=>{
|
const CloseThiss = (data: boolean)=>{
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top">
|
<HomeHead class="top">
|
||||||
|
|
@ -188,18 +169,9 @@ const CloseThiss = (data: boolean) => {
|
||||||
<div class=" cont relative w100% h800px overflow-y-auto">
|
<div class=" cont relative w100% h800px overflow-y-auto">
|
||||||
<el-button type="primary" @click="handleEditA" class="my20px">汇率内容新增</el-button>
|
<el-button type="primary" @click="handleEditA" class="my20px">汇率内容新增</el-button>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="dataA" style="width: 95%"
|
||||||
:data="dataA"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<!-- <el-table-column label="级别" prop="status" /> -->
|
<!-- <el-table-column label="级别" prop="status" /> -->
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -215,21 +187,19 @@ const CloseThiss = (data: boolean) => {
|
||||||
<el-table-column label="查看范围" prop="userIdList">
|
<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 v-if="scope.row.userIdList" v-for="it in scope.row.userIdList">
|
<span v-if="scope.row.userIdList" v-for="it in scope.row.userIdList"> {{it.nickName}}</span>
|
||||||
{{ it.nickName }}</span
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)"
|
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)">删除</el-button>
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
|
|
||||||
<n-modal v-model:show="shomkA">
|
<n-modal v-model:show="shomkA">
|
||||||
|
|
@ -242,64 +212,23 @@ const CloseThiss = (data: boolean) => {
|
||||||
<el-radio label="New" size="large">New</el-radio>
|
<el-radio label="New" size="large">New</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="标题">
|
<el-form-item label="标题">
|
||||||
<el-input v-model="editA.title" />
|
<el-input v-model="editA.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="查看范围">
|
<el-form-item label="查看范围">
|
||||||
<el-button class="button" @click="getUser(2)">设置</el-button>
|
<el-button class="button" @click="getUser(2)">设置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editA.fileList"
|
action="/test-api/common/upload" multiple :limit="editA.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editA.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editA.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editA.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editA.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import { useMessage, NModal } from 'naive-ui'
|
import { useMessage, NModal } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
||||||
import { pickerOptions } from '@/utils/date'
|
|
||||||
import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
|
import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
@ -15,6 +15,7 @@ const header = { 'token': store.user.token }
|
||||||
const dataA = ref([])
|
const dataA = ref([])
|
||||||
const editA = ref()
|
const editA = ref()
|
||||||
|
|
||||||
|
|
||||||
const shomkA = ref(false)
|
const shomkA = ref(false)
|
||||||
|
|
||||||
async function setDataFiles(arr, _row) {
|
async function setDataFiles(arr, _row) {
|
||||||
|
|
@ -22,8 +23,8 @@ async function setDataFiles(arr, _row) {
|
||||||
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
|
||||||
if (i.filePathList && i.filePathList.length > 0) {
|
if (i.filePathList && i.filePathList.length > 0) {
|
||||||
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
|
||||||
file.name = file.originalFileName
|
file.name = file.originalFileName;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
})
|
})
|
||||||
|
|
@ -36,106 +37,85 @@ async function getDataA() {
|
||||||
// setDataFiles(dataArr);
|
// setDataFiles(dataArr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getDataA()
|
getDataA();
|
||||||
})
|
})
|
||||||
|
|
||||||
function computedName(title) {
|
function computedName(title) {
|
||||||
let index = title.indexOf('.')
|
let index = title.indexOf(".");
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
return title.slice(0, index - 1)
|
return title.slice(0, index - 1);
|
||||||
}
|
}
|
||||||
return title
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmitA(row: {
|
async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
|
||||||
id: any
|
|
||||||
fileList?: any
|
|
||||||
title?: any
|
|
||||||
isTop?: any
|
|
||||||
isPublish?: any
|
|
||||||
publishTime?: any
|
|
||||||
}) {
|
|
||||||
console.log(row, 555)
|
console.log(row, 555)
|
||||||
const { id, title, isTop, isPublish, publishTime } = row
|
const { id, title } = row
|
||||||
// let moduleId = 1;
|
// let moduleId = 1;
|
||||||
let sendData= {}
|
let sendData= {}
|
||||||
if(!row.id){
|
if(!row.id){
|
||||||
sendData = {
|
sendData = { title,type:type.value,userIdList:userData.value };
|
||||||
title,
|
|
||||||
type: type.value,
|
|
||||||
userIdList: userData.value,
|
|
||||||
isTop,
|
|
||||||
isPublish,
|
|
||||||
publishTime
|
|
||||||
}
|
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
if (row.fileList && row.fileList.length > 0) {
|
||||||
row.fileList.map((item) => {
|
row.fileList.map(item => {
|
||||||
|
|
||||||
if(item.response) {
|
if(item.response) {
|
||||||
sendData.filePath = item.response.url
|
sendData.filePath = item.response.url;
|
||||||
// obj.title = title || computedName(item.response.originalFilename);
|
// obj.title = title || computedName(item.response.originalFilename);
|
||||||
} else {
|
}
|
||||||
sendData.filePath = item.url
|
else {
|
||||||
|
sendData.filePath = item.url;
|
||||||
// obj.title = title || computedName(item.originalFilename);
|
// obj.title = title || computedName(item.originalFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
sendData = {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
type: type.value,
|
|
||||||
userIdList: userData.value,
|
|
||||||
isTop,
|
|
||||||
isPublish,
|
|
||||||
publishTime
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
sendData = {id, title,type:type.value,userIdList:userData.value };
|
||||||
}
|
}
|
||||||
console.log(sendData)
|
console.log(sendData)
|
||||||
const {code,msg} = await marketPreADD(sendData)
|
const {code,msg} = await marketPreADD(sendData)
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("修改成功!") }
|
||||||
message.success('修改成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
getDataA()
|
getDataA();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const handleEditA = (type: string, row: any) => {
|
const handleEditA = (type: string, row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
editA.value = {
|
editA.value = {
|
||||||
title: '',
|
title: '',
|
||||||
fileList: []
|
fileList: [],
|
||||||
}
|
}
|
||||||
setUserList.value =[]
|
setUserList.value =[]
|
||||||
shomkA.value = true
|
shomkA.value = true
|
||||||
if (!row) return
|
if (!row) return
|
||||||
|
|
||||||
editA.value = row
|
editA.value = row
|
||||||
editA.value.fileList = [
|
editA.value.fileList = [{
|
||||||
{
|
|
||||||
name: row.title,
|
name: row.title,
|
||||||
originalFilename: row.title,
|
originalFilename: row.title,
|
||||||
url: row.filePath
|
url: row.filePath,
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
setUserList.value =row.userIdList
|
setUserList.value =row.userIdList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleDeleteA(index: number, row: any) {
|
async function handleDeleteA(index: number, row: any) {
|
||||||
const { id } = row
|
const { id } = row
|
||||||
if (!id) return
|
if (!id) return
|
||||||
const { code, msg } = await marketPreDelete({ id,type:type.value })
|
const { code, msg } = await marketPreDelete({ id,type:type.value })
|
||||||
if (code === 200) {
|
if (code === 200) { message.success("删除成功!") }
|
||||||
message.success('删除成功!')
|
else { message.error(msg) }
|
||||||
} else {
|
getDataA();
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
getDataA()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeName = ref('first')
|
|
||||||
|
const activeName = ref("first")
|
||||||
const userList = ref()
|
const userList = ref()
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
const flg = ref()
|
const flg = ref()
|
||||||
|
|
@ -149,11 +129,12 @@ async function getUser(row) {
|
||||||
}
|
}
|
||||||
// const {data: userArr} = await getBPCUser({moduleId})
|
// const {data: userArr} = await getBPCUser({moduleId})
|
||||||
// setUserList.value = userArr
|
// setUserList.value = userArr
|
||||||
|
|
||||||
}
|
}
|
||||||
// 获取子组件传过来的值
|
// 获取子组件传过来的值
|
||||||
const userData = ref()
|
const userData = ref()
|
||||||
const handleChild = (data: any) => {
|
const handleChild = (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)
|
||||||
let userIdList: any[] =[]
|
let userIdList: any[] =[]
|
||||||
|
|
@ -170,6 +151,7 @@ const handleChild = (data: any) => {
|
||||||
const CloseThiss = (data: boolean)=>{
|
const CloseThiss = (data: boolean)=>{
|
||||||
showModal.value = data
|
showModal.value = data
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top">
|
<HomeHead class="top">
|
||||||
|
|
@ -186,18 +168,9 @@ const CloseThiss = (data: boolean) => {
|
||||||
<div class=" cont relative w100% h800px overflow-y-auto">
|
<div class=" cont relative w100% h800px overflow-y-auto">
|
||||||
<el-button type="primary" @click="handleEditA('add')" class="my20px">市况内容新增</el-button>
|
<el-button type="primary" @click="handleEditA('add')" class="my20px">市况内容新增</el-button>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="dataA" style="width: 95%"
|
||||||
:data="dataA"
|
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }"
|
||||||
style="width: 95%"
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
>
|
|
||||||
<!-- <el-table-column label="级别" prop="status" /> -->
|
<!-- <el-table-column label="级别" prop="status" /> -->
|
||||||
<el-table-column label="名称" prop="title" />
|
<el-table-column label="名称" prop="title" />
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -213,21 +186,19 @@ const CloseThiss = (data: boolean) => {
|
||||||
<el-table-column label="查看范围" prop="userIdList">
|
<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 v-if="scope.row.userIdList" v-for="it in scope.row.userIdList"
|
<span v-if="scope.row.userIdList" v-for="it in scope.row.userIdList"> {{it.nickName}}</span>
|
||||||
> {{ it.nickName }}</span
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="180px">
|
<el-table-column label="操作" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)"
|
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)">删除</el-button>
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
|
|
||||||
<n-modal v-model:show="shomkA">
|
<n-modal v-model:show="shomkA">
|
||||||
|
|
@ -240,64 +211,23 @@ const CloseThiss = (data: boolean) => {
|
||||||
<el-radio label="New" size="large">New</el-radio>
|
<el-radio label="New" size="large">New</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="标题">
|
<el-form-item label="标题">
|
||||||
<el-input v-model="editA.title" />
|
<el-input v-model="editA.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="查看范围">
|
<el-form-item label="查看范围">
|
||||||
<el-button class="button" @click="getUser(2)">设置</el-button>
|
<el-button class="button" @click="getUser(2)">设置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<br>
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload
|
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
|
||||||
v-model:file-list="editA.fileList"
|
action="/test-api/common/upload" multiple :limit="editA.type == 'add' ? 3 : 1" :on-exceed="handleExceed">
|
||||||
class="upload-demo"
|
|
||||||
:headers="header"
|
|
||||||
action="/test-api/common/upload"
|
|
||||||
multiple
|
|
||||||
:limit="editA.type == 'add' ? 3 : 1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
>
|
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
|
||||||
<el-form-item label="是否置顶">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isTop"
|
|
||||||
active-text="置顶"
|
|
||||||
inactive-text="不置顶"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="是否定时发送">
|
|
||||||
<el-switch
|
|
||||||
v-model="editA.isPublish"
|
|
||||||
active-text="是"
|
|
||||||
inactive-text="否"
|
|
||||||
:inactive-value="0"
|
|
||||||
:active-value="1"
|
|
||||||
@change="(val) => (editA.publishTime = val ? pickerOptions.day : '')"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="发布时间" v-if="editA.isPublish == 1">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="editA.publishTime"
|
|
||||||
align="right"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
:disabledDate="pickerOptions.disabledDate"
|
|
||||||
:shortcuts="pickerOptions.shortcuts"
|
|
||||||
:value-format="pickerOptions.valueFormat"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1" />
|
<hr class="mb15px border-#f1f1f1">
|
||||||
|
|
||||||
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -68,17 +68,9 @@ const num = ['', '第一周', '第二周', '第三周', '第四周', '第五周'
|
||||||
function groupDatesByWeek(dates = [], weekStartDay = 1) {
|
function groupDatesByWeek(dates = [], weekStartDay = 1) {
|
||||||
return dates.reduce((acc: any, item: any) => {
|
return dates.reduce((acc: any, item: any) => {
|
||||||
const date = dayjs(item.createTime)
|
const date = dayjs(item.createTime)
|
||||||
const weekday = date.day() // 获取目标日期的星期几(0表示周日,1表示周一,依此类推)
|
const weekStart = date.startOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
||||||
// 计算到本周周一的距离
|
|
||||||
const mondayDistance = (weekday + 6) % 7
|
|
||||||
// 计算到本周周日的距离
|
|
||||||
const sundayDistance = 7 - mondayDistance - 1
|
|
||||||
// 获取本周周一和周日的日期
|
|
||||||
const weekStart = date.subtract(mondayDistance, 'day').format('MM月DD日')
|
|
||||||
const weekEnd = date.add(sundayDistance, 'day').format('MM月DD日')
|
|
||||||
// const weekStart = date.startOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
|
||||||
// const weekEnd = date.endOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
|
||||||
item.date = date.format('YYYY-MM-DD')
|
item.date = date.format('YYYY-MM-DD')
|
||||||
|
const weekEnd = date.endOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
||||||
const week = getWeekOfMonth(date)
|
const week = getWeekOfMonth(date)
|
||||||
const month = date.format('MM')
|
const month = date.format('MM')
|
||||||
const key = `${+month}月 ${num[week]} ( ${weekStart} - ${weekEnd} )`
|
const key = `${+month}月 ${num[week]} ( ${weekStart} - ${weekEnd} )`
|
||||||
|
|
@ -140,6 +132,7 @@ const codePath = {
|
||||||
const goModule = (item, type) => {
|
const goModule = (item, type) => {
|
||||||
const { moduleCode, id, cateId } = item
|
const { moduleCode, id, cateId } = item
|
||||||
const { modulePath, path } = codePath[moduleCode]
|
const { modulePath, path } = codePath[moduleCode]
|
||||||
|
console.log('🚀 ~ file: News.vue:128 ~ modulePath, path:', modulePath, path)
|
||||||
if (modulePath) {
|
if (modulePath) {
|
||||||
if (type === 'module') {
|
if (type === 'module') {
|
||||||
push(modulePath)
|
push(modulePath)
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,6 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
// import { NTimeline, NTimelineItem } from 'naive-ui'
|
// import { NTimeline, NTimelineItem } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import { fetchContactList } from '@/api/daikin/base'
|
|
||||||
import { groupBy } from 'lodash-es'
|
|
||||||
const store = useUserStore()
|
|
||||||
|
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
@ -50,25 +46,6 @@ let flag = ref(false)
|
||||||
const switchImg = () => {
|
const switchImg = () => {
|
||||||
flag.value = !flag.value
|
flag.value = !flag.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const userCode = ref(false)
|
|
||||||
watchEffect(() => {
|
|
||||||
userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) =>
|
|
||||||
store.user.roleCode?.includes(item)
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
const contactList = ref<any>([])
|
|
||||||
const fetchDataList = async () => {
|
|
||||||
const { rows = [] } = await fetchContactList({
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 1000
|
|
||||||
})
|
|
||||||
contactList.value = rows
|
|
||||||
console.log('🚀 ~ file: index.vue:68 ~ rows:', groupBy(rows, 'type'))
|
|
||||||
}
|
|
||||||
|
|
||||||
fetchDataList()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -97,38 +74,21 @@ fetchDataList()
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="mt20px flex w100% relative pt-40px overflow-hidden">
|
<div class="mt30px mr20px flex w100% relative overflow-hidden">
|
||||||
<!-- <el-button
|
|
||||||
v-if="userCode"
|
|
||||||
type="primary"
|
|
||||||
class="button absolute top-0px right-50px"
|
|
||||||
@click="push({ name: 'phoneManage' })"
|
|
||||||
>数据管理</el-button
|
|
||||||
> -->
|
|
||||||
<!-- <img src="../../../assets/images/fzqiet3.png" class="w100%" /> -->
|
<!-- <img src="../../../assets/images/fzqiet3.png" class="w100%" /> -->
|
||||||
<div class="h-full overflow-hidden w-1500px flex items-center">
|
<img
|
||||||
<div
|
src="../../../assets/images/jjllt.jpg"
|
||||||
class="w-1500px h-full transition-all duration-500 ease-out relative"
|
class="w100% transition-all duration-500"
|
||||||
:class="flag ? '-translate-x-full' : 'mr0px'"
|
|
||||||
>
|
|
||||||
<img src="../../../assets/images/jjllt.jpg" class="w-1500px h-90%" />
|
|
||||||
<view
|
|
||||||
class="absolute top-24px right-40px w-300px h30px z-2 bg-#ffffff text-#000 text-end leading-30px text-18px font font-600"
|
|
||||||
>
|
|
||||||
更新日:{{ new Date().toLocaleDateString() }}
|
|
||||||
</view>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="!w-1500px !h-full transition-all duration-500 ease-out relative"
|
|
||||||
:class="flag ? '-translate-x-full' : ''"
|
:class="flag ? '-translate-x-full' : ''"
|
||||||
>
|
/>
|
||||||
<img src="../../../assets/images/jjllt-right.jpg" class="!w-1500px !h-full" />
|
<img
|
||||||
</div>
|
src="../../../assets/images/jjllt-right.jpg"
|
||||||
</div>
|
class="w100% transition-all duration-500"
|
||||||
<!-- 56px -->
|
:class="flag ? '-translate-x-full' : ''"
|
||||||
|
/>
|
||||||
<div
|
<div
|
||||||
@click="switchImg"
|
@click="switchImg"
|
||||||
class="absolute top-96px right-40px w-300px h50px z-10 cursor-pointer"
|
class="absolute top-56px right-40px w-300px h50px z-10 cursor-pointer"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -140,10 +100,6 @@ fetchDataList()
|
||||||
top: -92px;
|
top: -92px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font {
|
|
||||||
font-family: '微软雅黑', 'Microsoft YaHei', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.g-wrapper {
|
.g-wrapper {
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
border: 1px solid #e7ebf5;
|
border: 1px solid #e7ebf5;
|
||||||
|
|
|
||||||
|
|
@ -1,406 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import AppBlock from '@/components/AppBlock.vue'
|
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
|
||||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
|
||||||
import { useMessage, NModal } from 'naive-ui'
|
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
|
||||||
import UserList from '@/views/home/intelligence/process/UserPages.vue'
|
|
||||||
import dayjs from 'dayjs'
|
|
||||||
|
|
||||||
import {
|
|
||||||
fetchDelHis,
|
|
||||||
marketPreADD,
|
|
||||||
getMetalList,
|
|
||||||
fetchGetHisPage,
|
|
||||||
fetchUpdateHis,
|
|
||||||
fetchSaveHis,
|
|
||||||
fetchContactList,
|
|
||||||
fetchContactEdit,
|
|
||||||
fetchContactDel,
|
|
||||||
fetchContactAdd
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
|
|
||||||
const message = useMessage()
|
|
||||||
const store = useUserStore()
|
|
||||||
const header = { token: store.user.token }
|
|
||||||
const pageInfo = reactive({
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 15,
|
|
||||||
total: 0
|
|
||||||
})
|
|
||||||
|
|
||||||
const dataA = ref<any>([])
|
|
||||||
const editA = ref<any>({})
|
|
||||||
const metaList = ref<any>([])
|
|
||||||
const metaObj = ref<any>({})
|
|
||||||
|
|
||||||
const stDateList = ref<any>([])
|
|
||||||
const shomkA = ref(false)
|
|
||||||
|
|
||||||
const type = ref(2)
|
|
||||||
async function getDataA() {
|
|
||||||
const { data } = await fetchGetHisPage({})
|
|
||||||
dataA.value = Object.entries(data).map(([key, value]: any) => {
|
|
||||||
return {
|
|
||||||
stDate: key,
|
|
||||||
yearId: key,
|
|
||||||
children: value.map((item: any) => {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
numbers: metaObj.value[item.number]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// setDataFiles(dataArr);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
// const { data = [] } = await getMetalList()
|
|
||||||
// metaList.value = data
|
|
||||||
// data.forEach((item: any) => {
|
|
||||||
// metaObj.value[item.value] = item.title
|
|
||||||
// })
|
|
||||||
// getDataA()
|
|
||||||
fetchDataList()
|
|
||||||
})
|
|
||||||
|
|
||||||
const contactList = ref<any>([])
|
|
||||||
const fetchDataList = async () => {
|
|
||||||
const { rows = [] } = await fetchContactList({
|
|
||||||
pageNum: pageInfo.currentPage,
|
|
||||||
pageSize: pageInfo.pageSize
|
|
||||||
})
|
|
||||||
contactList.value = rows
|
|
||||||
console.log('🚀 ~ file: manage.vue:66 ~ data:', rows)
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
|
|
||||||
console.log(row, 555)
|
|
||||||
const { id, title } = row
|
|
||||||
// let moduleId = 1;
|
|
||||||
let sendData = {}
|
|
||||||
if (!row.id) {
|
|
||||||
sendData = { title, type: type.value, userIdList: userData.value }
|
|
||||||
if (row.fileList && row.fileList.length > 0) {
|
|
||||||
row.fileList.map((item) => {
|
|
||||||
if (item.response) {
|
|
||||||
sendData.filePath = item.response.url
|
|
||||||
// obj.title = title || computedName(item.response.originalFilename);
|
|
||||||
} else {
|
|
||||||
sendData.filePath = item.url
|
|
||||||
// obj.title = title || computedName(item.originalFilename);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
sendData = { id, title, type: type.value, userIdList: userData.value }
|
|
||||||
}
|
|
||||||
const { code, msg } = await marketPreADD(sendData)
|
|
||||||
if (code === 200) {
|
|
||||||
message.success('修改成功!')
|
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
shomkA.value = false
|
|
||||||
getDataA()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleEditA = (type: string, row: any = { type: 1 }) => {
|
|
||||||
if (!row) return
|
|
||||||
editA.value = { ...row }
|
|
||||||
// editA.value.stDateList = [row.stDate, row.stDate]
|
|
||||||
// stDateList.value = [row.stDate, row.stDate]
|
|
||||||
// setUserList.value =[]
|
|
||||||
shomkA.value = true
|
|
||||||
|
|
||||||
// editA.value.fileList = [{
|
|
||||||
// name: row.title,
|
|
||||||
// originalFilename: row.title,
|
|
||||||
// url: row.filePath,
|
|
||||||
// }]
|
|
||||||
// setUserList.value =row.userIdList
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleDeleteA(index: number, row: any) {
|
|
||||||
const { id } = row
|
|
||||||
if (!id) return
|
|
||||||
const { code, msg } = await fetchContactDel(id)
|
|
||||||
if (code === 200) {
|
|
||||||
message.success('删除成功!')
|
|
||||||
} else {
|
|
||||||
message.error(msg)
|
|
||||||
}
|
|
||||||
fetchDataList()
|
|
||||||
}
|
|
||||||
|
|
||||||
const showModal = ref(false)
|
|
||||||
const flg = ref()
|
|
||||||
const setUserList = ref()
|
|
||||||
async function getUser(row) {
|
|
||||||
console.log(row)
|
|
||||||
showModal.value = !showModal.value
|
|
||||||
flg.value = row
|
|
||||||
if (row.id && row.userIdList) {
|
|
||||||
setUserList.value = row.userIdList
|
|
||||||
}
|
|
||||||
// const {data: userArr} = await getBPCUser({moduleId})
|
|
||||||
// setUserList.value = userArr
|
|
||||||
}
|
|
||||||
// 获取子组件传过来的值
|
|
||||||
const userData = ref()
|
|
||||||
const handleChild = (data: any) => {
|
|
||||||
const { showModal: show, multipleSelection } = data
|
|
||||||
showModal.value = unref(show)
|
|
||||||
let userIdList: any[] = []
|
|
||||||
multipleSelection.value.forEach((i: { userId: any }) => {
|
|
||||||
userIdList.push(i.userId)
|
|
||||||
})
|
|
||||||
if (flg.value.id) {
|
|
||||||
flg.value.userIdList = userIdList
|
|
||||||
marketPreADD(flg.value)
|
|
||||||
getDataA()
|
|
||||||
console.log(flg.value)
|
|
||||||
}
|
|
||||||
userData.value = userIdList
|
|
||||||
}
|
|
||||||
const CloseThiss = (data: boolean) => {
|
|
||||||
showModal.value = data
|
|
||||||
}
|
|
||||||
const goBacks = () => {
|
|
||||||
history.back()
|
|
||||||
}
|
|
||||||
|
|
||||||
const editForm = ref(null)
|
|
||||||
const channelList = ref([
|
|
||||||
{
|
|
||||||
label: 'LME',
|
|
||||||
value: 'LME'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'SMM',
|
|
||||||
value: 'SMM'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
const handleClickA = async () => {
|
|
||||||
const req = { ...editA.value }
|
|
||||||
let flag = false
|
|
||||||
try {
|
|
||||||
} catch (error) {}
|
|
||||||
if (!req.type) {
|
|
||||||
message.error('请选择部门')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
req.dept = typeList.find((i) => i.value == req.type)?.label
|
|
||||||
let res: any = req.id ? await fetchContactEdit(req) : await fetchContactAdd(req)
|
|
||||||
if (res.code == 200) {
|
|
||||||
shomkA.value = false
|
|
||||||
message.success('操作成功!')
|
|
||||||
fetchDataList()
|
|
||||||
} else {
|
|
||||||
message.error(res.msg)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function generateDateRange() {
|
|
||||||
const [startDate, endDate] = stDateList.value || []
|
|
||||||
if (!startDate || !endDate) return []
|
|
||||||
const dateFormat = 'YYYY-MM-DD'
|
|
||||||
const dates = []
|
|
||||||
|
|
||||||
const start = dayjs(startDate, dateFormat)
|
|
||||||
const end = dayjs(endDate, dateFormat)
|
|
||||||
|
|
||||||
// 将开始日期添加到数组中
|
|
||||||
dates.push(start.format(dateFormat))
|
|
||||||
|
|
||||||
// 逐步增加日期,直到结束日期
|
|
||||||
let currentDate = start
|
|
||||||
while (currentDate.isSameOrBefore(end)) {
|
|
||||||
currentDate = currentDate.add(1, 'day')
|
|
||||||
dates.push(currentDate.format(dateFormat))
|
|
||||||
}
|
|
||||||
|
|
||||||
return dates
|
|
||||||
}
|
|
||||||
|
|
||||||
// 类型 1;调达本部 2: DSZ 3: DISH
|
|
||||||
const typeList = [
|
|
||||||
{
|
|
||||||
label: '调达本部',
|
|
||||||
value: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'DSZ',
|
|
||||||
value: 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'DISH',
|
|
||||||
value: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
const handleClose = (tag: any) => {
|
|
||||||
editA.value = { type: 1 }
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<HomeHead class="top">
|
|
||||||
<template #content>
|
|
||||||
<!-- <HomeHeadSearch /> -->
|
|
||||||
</template>
|
|
||||||
</HomeHead>
|
|
||||||
<AppBlock class="w-full h-full p30px text-#000">
|
|
||||||
<div class="font-600 flex items-center">
|
|
||||||
<!-- <img src="./images/logo.svg" class="h56px mr21px" /> -->
|
|
||||||
<div class="text-36px text-#000">紧急联络人-数据管理</div>
|
|
||||||
</div>
|
|
||||||
<div class="cont relative w100% h900px overflow-y-auto">
|
|
||||||
<el-button type="primary" @click="handleEditA" class="my20px">新增紧急联络人</el-button>
|
|
||||||
<div
|
|
||||||
class="rounded-md cursor-pointer float-right mr-30px mt-20px px20px py10px z-200 bg-#f5f5f5 flex items-center justify-center w-100px"
|
|
||||||
@click="goBacks"
|
|
||||||
>
|
|
||||||
<el-icon><ArrowLeftBold size="18" /></el-icon> 返回
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
:data="contactList"
|
|
||||||
style="width: 100%"
|
|
||||||
:header-cell-style="{
|
|
||||||
background: '#2A7BF7',
|
|
||||||
color: '#fff',
|
|
||||||
height: '60px',
|
|
||||||
textAlign: 'center',
|
|
||||||
'font-size': '24px'
|
|
||||||
}"
|
|
||||||
:cell-style="{ 'text-align': 'center' }"
|
|
||||||
height="740px"
|
|
||||||
>
|
|
||||||
<el-table-column label="部门" prop="dept" />
|
|
||||||
<el-table-column label="职位" prop="position" />
|
|
||||||
<el-table-column label="姓名" prop="realname" />
|
|
||||||
<el-table-column label="手机号" prop="mobile" />
|
|
||||||
<el-table-column label="行号" prop="rowIndex" />
|
|
||||||
<el-table-column label="排序" prop="sort" />
|
|
||||||
<el-table-column label="创建时间" prop="createTime">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{ dayjs(row.createTime).format('YYYY-MM-DD') }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- <el-table-column label="查看范围" prop="userIdList">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.userIdList" v-for="it in scope.row.userIdList"> {{it.nickName}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="操作" width="180px">
|
|
||||||
<template #default="scope">
|
|
||||||
<template v-if="!scope.row.children?.length">
|
|
||||||
<el-button size="small" @click="handleEditA('edit', scope.row)">编辑</el-button>
|
|
||||||
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<div class="absolute bottom-50px left-50% translate-x-[-50%] z-11">
|
|
||||||
<el-pagination
|
|
||||||
background
|
|
||||||
v-model:current-page="pageInfo.currentPage"
|
|
||||||
v-model:page-size="pageInfo.pageSize"
|
|
||||||
layout="prev, pager, next, total,jumper,->"
|
|
||||||
:total="pageInfo.total"
|
|
||||||
@current-change="fetchDataList"
|
|
||||||
/>
|
|
||||||
<!-- @size-change="handleSizeChange" -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</AppBlock>
|
|
||||||
|
|
||||||
<el-dialog
|
|
||||||
:z-index="200"
|
|
||||||
v-model="shomkA"
|
|
||||||
title=" "
|
|
||||||
width="30%"
|
|
||||||
:modal="false"
|
|
||||||
top="30vh"
|
|
||||||
@close="handleClose"
|
|
||||||
>
|
|
||||||
<div class="bg-#FFF">
|
|
||||||
<el-form ref="editForm" :model="editA" label-width="100px" size="large">
|
|
||||||
<el-form-item label="部门" prop="dept">
|
|
||||||
<!-- <el-input v-model="editA.dept" placeholder="请输入部门"></el-input> -->
|
|
||||||
<el-select v-model="editA.type" placeholder="选择部门" class="!w-100%">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="职位" prop="position">
|
|
||||||
<el-input v-model="editA.position" placeholder="请输入职位"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="姓名" prop="position">
|
|
||||||
<el-input v-model="editA.realname" placeholder="请输入职位"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="手机号" prop="mobile">
|
|
||||||
<el-input v-model="editA.mobile" placeholder="请输入手机号"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="行号" prop="rowIndex">
|
|
||||||
<el-input-number v-model="editA.rowIndex" :controls="false" class="!w-100%" />
|
|
||||||
<!-- <el-input v-model="editA.rowIndex" placeholder="请输入行号"></el-input> -->
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<el-form-item label="排序" prop="sort">
|
|
||||||
<el-input-number v-model="editA.sort" :controls="false" class="!w-100%" />
|
|
||||||
<!-- <el-input v-model="editA.sort" placeholder="请输入排序"></el-input> -->
|
|
||||||
</el-form-item>
|
|
||||||
<br />
|
|
||||||
<div class="text-center">
|
|
||||||
<el-button type="" @click="shomkA = false" class="mb-20px !mr-50rpx"> 取消</el-button>
|
|
||||||
<el-button type="primary" @click="handleClickA(editA)" class="mb-20px"> 确认</el-button>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<n-modal v-model:show="showModal">
|
|
||||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.demo-tabs > .el-tabs__content {
|
|
||||||
color: #6b778c;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.top {
|
|
||||||
position: absolute;
|
|
||||||
right: 30px;
|
|
||||||
top: -92px;
|
|
||||||
}
|
|
||||||
.flex-center {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
:deep(.el-input-number .el-input__inner) {
|
|
||||||
text-align: left !important;
|
|
||||||
}
|
|
||||||
:deep {
|
|
||||||
.el-dialog__body {
|
|
||||||
margin-top: 18px;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from "echarts";
|
||||||
import {topStat} from '@/api/daikin/base'
|
import {topStat} from '@/api/daikin/base'
|
||||||
import {getPreviousMonths} from '@/utils/format'
|
import {getPreviousMonths} from '@/utils/format'
|
||||||
function formatDate(inputDate: string) {
|
function formatDate(inputDate: string) {
|
||||||
|
|
@ -25,17 +25,7 @@ export function useChart21() {
|
||||||
const { data } = await topStat()
|
const { data } = await topStat()
|
||||||
|
|
||||||
const option = {
|
const option = {
|
||||||
legend: {
|
legend: {},
|
||||||
orient: 'vertical',
|
|
||||||
right: 0,
|
|
||||||
top: '40%',
|
|
||||||
itemgrap: 10,
|
|
||||||
textStyle: {
|
|
||||||
width: 50,
|
|
||||||
overflow: 'break'
|
|
||||||
},
|
|
||||||
itemStyle: {}
|
|
||||||
},
|
|
||||||
title: {
|
title: {
|
||||||
text: '件',
|
text: '件',
|
||||||
textStyle: { fontSize: 14, fontWeight: 500 },
|
textStyle: { fontSize: 14, fontWeight: 500 },
|
||||||
|
|
@ -50,9 +40,8 @@ export function useChart21() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '5%',
|
|
||||||
left: '6%',
|
left: '6%',
|
||||||
right: '24%',
|
right: '4%',
|
||||||
bottom: '5%',
|
bottom: '5%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,18 @@ import { useChart21 } from './Quality'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { NModal, useMessage } from 'naive-ui'
|
import { NModal, useMessage } from 'naive-ui'
|
||||||
import Amtion from '@/components/amtion.vue'
|
import Amtion from '@/components/amtion.vue'
|
||||||
import { topList, actList, highList, badartList, topStat } from '@/api/daikin/base'
|
import {
|
||||||
|
topList,
|
||||||
|
actList,
|
||||||
|
highList,
|
||||||
|
badartList,
|
||||||
|
topStat
|
||||||
|
} from '@/api/daikin/base'
|
||||||
import { isNotOneWeekAgo } from '@/utils'
|
import { isNotOneWeekAgo } from '@/utils'
|
||||||
// import { it } from "element-plus/es/locale/index.js";
|
// import { it } from "element-plus/es/locale/index.js";
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin', 'quality_dangdan', 'tech_service'].some((item) =>
|
const userCode = ['admin', 'quality_dangdan', 'tech_service'].includes(
|
||||||
store.user.roleCode?.includes(item)
|
store.user.roleCode
|
||||||
)
|
)
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
// console.log(userCode);
|
// console.log(userCode);
|
||||||
|
|
@ -161,11 +167,7 @@ const value1 = ref(null)
|
||||||
const src = ref('')
|
const src = ref('')
|
||||||
const srcType = ref()
|
const srcType = ref()
|
||||||
const showModalRef2 = ref(false)
|
const showModalRef2 = ref(false)
|
||||||
const openUrl = async (row: any) => {
|
const openUrl = async (url) => {
|
||||||
if (row.isSelect === 2) {
|
|
||||||
return message.info('您没有权限查看!')
|
|
||||||
}
|
|
||||||
let url = row.filePath || row.filePathList[0].url
|
|
||||||
console.log(url)
|
console.log(url)
|
||||||
|
|
||||||
if (!url) {
|
if (!url) {
|
||||||
|
|
@ -173,19 +175,30 @@ const openUrl = async (row: any) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(url)
|
srcType.value = getLastSubstring(url)
|
||||||
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
if (
|
||||||
|
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||||
|
) {
|
||||||
// src.value = filePath
|
// src.value = filePath
|
||||||
// pdfShow.value = true
|
// pdfShow.value = true
|
||||||
const _url = 'https://view.xdocin.com/view?src=' + url
|
url = 'https://view.xdocin.com/view?src=' + url
|
||||||
const screenWidth = window.screen.width
|
const screenWidth = window.screen.width
|
||||||
const screenHeight = window.screen.height
|
const screenHeight = window.screen.height
|
||||||
window.open(
|
window.open(
|
||||||
_url,
|
url,
|
||||||
'',
|
'',
|
||||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
'width=' +
|
||||||
|
screenWidth +
|
||||||
|
',height=' +
|
||||||
|
screenHeight +
|
||||||
|
',top=' +
|
||||||
|
0 +
|
||||||
|
',left=' +
|
||||||
|
0
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
message.error(
|
||||||
|
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
|
|
@ -265,7 +278,7 @@ function getLastSubstring(str: string): string {
|
||||||
<span
|
<span
|
||||||
v-if="row.filePathList.length > 0"
|
v-if="row.filePathList.length > 0"
|
||||||
class="text-#5695FF underline text-16px truncate"
|
class="text-#5695FF underline text-16px truncate"
|
||||||
@click="openUrl(row)"
|
@click="openUrl(row.filePathList[0].url)"
|
||||||
>{{ row.filePathList[0].originalFileName }}</span
|
>{{ row.filePathList[0].originalFileName }}</span
|
||||||
>
|
>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
|
|
@ -274,7 +287,9 @@ function getLastSubstring(str: string): string {
|
||||||
v-if="row.filePathList.length > 1"
|
v-if="row.filePathList.length > 1"
|
||||||
>
|
>
|
||||||
<span class="el-dropdown-link mt5px">
|
<span class="el-dropdown-link mt5px">
|
||||||
<el-icon color="#097BC2" class="el-icon--right"><CaretBottom /></el-icon>
|
<el-icon color="#097BC2" class="el-icon--right"
|
||||||
|
><CaretBottom
|
||||||
|
/></el-icon>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
|
@ -376,7 +391,9 @@ function getLastSubstring(str: string): string {
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
<div class="h400px relative">
|
<div class="h400px relative">
|
||||||
<div class="box-title">品质情报</div>
|
<div class="box-title">品质情报</div>
|
||||||
<div class="absolute right-0px top-10px w165px text-14px text-#B2B7BE">
|
<div
|
||||||
|
class="absolute right-0px top-10px w165px text-14px text-#B2B7BE"
|
||||||
|
>
|
||||||
{{ dataC.length > 0 ? '更新时间:' + dataC[0].createTime : '' }}
|
{{ dataC.length > 0 ? '更新时间:' + dataC[0].createTime : '' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt23px overflow-y-auto">
|
<div class="mt23px overflow-y-auto">
|
||||||
|
|
@ -415,12 +432,16 @@ function getLastSubstring(str: string): string {
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="title" label="详情" width="110px" />
|
<el-table-column prop="title" label="详情" width="110px" />
|
||||||
<el-table-column prop="source" label="来源" width="60px" />
|
<el-table-column prop="source" label="来源" width="60px" />
|
||||||
<el-table-column prop="createTime" label="情报追踪" width="120px">
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="情报追踪"
|
||||||
|
width="120px"
|
||||||
|
>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<span
|
<span
|
||||||
v-if="row.filePathList.length > 0"
|
v-if="row.filePathList.length > 0"
|
||||||
class="text-#5695FF underline text-16px w-80px truncate"
|
class="text-#5695FF underline text-16px w-80px truncate"
|
||||||
@click="openUrl(row)"
|
@click="openUrl(row.filePathList[0].url)"
|
||||||
>{{ row.filePathList[0].originalFileName }}</span
|
>{{ row.filePathList[0].originalFileName }}</span
|
||||||
>
|
>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
|
|
@ -429,7 +450,9 @@ function getLastSubstring(str: string): string {
|
||||||
v-if="row.filePathList.length > 1"
|
v-if="row.filePathList.length > 1"
|
||||||
>
|
>
|
||||||
<span class="el-dropdown-link mt5px">
|
<span class="el-dropdown-link mt5px">
|
||||||
<el-icon color="#097BC2" class="el-icon--right"><CaretBottom /></el-icon>
|
<el-icon color="#097BC2" class="el-icon--right"
|
||||||
|
><CaretBottom
|
||||||
|
/></el-icon>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
|
@ -449,7 +472,9 @@ function getLastSubstring(str: string): string {
|
||||||
|
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<div class="box-title mt30px">活动进展</div>
|
<div class="box-title mt30px">活动进展</div>
|
||||||
<div class="absolute right-0 top-40px w165px text-14px text-#B2B7BE">
|
<div
|
||||||
|
class="absolute right-0 top-40px w165px text-14px text-#B2B7BE"
|
||||||
|
>
|
||||||
{{ dataB.length > 0 ? '更新时间:' + dataB[0].createTime : '' }}
|
{{ dataB.length > 0 ? '更新时间:' + dataB[0].createTime : '' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt23px overflow-y-auto">
|
<div class="mt23px overflow-y-auto">
|
||||||
|
|
@ -489,12 +514,16 @@ function getLastSubstring(str: string): string {
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="title" label="内容" width="150px" />
|
<el-table-column prop="title" label="内容" width="150px" />
|
||||||
|
|
||||||
<el-table-column prop="createTime" label="活动追踪" width="140px">
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="活动追踪"
|
||||||
|
width="140px"
|
||||||
|
>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<span
|
<span
|
||||||
v-if="row.filePathList.length > 0"
|
v-if="row.filePathList.length > 0"
|
||||||
class="text-#5695FF underline text-16px w-80px truncate"
|
class="text-#5695FF underline text-16px w-80px truncate"
|
||||||
@click="openUrl(row)"
|
@click="openUrl(row.filePathList[0].url)"
|
||||||
>{{ row.filePathList[0].originalFileName }}</span
|
>{{ row.filePathList[0].originalFileName }}</span
|
||||||
>
|
>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
|
|
@ -503,7 +532,9 @@ function getLastSubstring(str: string): string {
|
||||||
v-if="row.filePathList.length > 1"
|
v-if="row.filePathList.length > 1"
|
||||||
>
|
>
|
||||||
<span class="el-dropdown-link mt5px">
|
<span class="el-dropdown-link mt5px">
|
||||||
<el-icon color="#097BC2" class="el-icon--right"><CaretBottom /></el-icon>
|
<el-icon color="#097BC2" class="el-icon--right"
|
||||||
|
><CaretBottom
|
||||||
|
/></el-icon>
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
|
|
||||||
|
|
@ -148,11 +148,11 @@ function getFileNameFromUrl(url: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const goModule = (item, type) => {
|
const goModule = (item, type) => {
|
||||||
const { moduleCode, id, cateId } = item
|
const { moduleCode, id } = item
|
||||||
const { modulePath, path } = codePath[moduleCode]
|
const { modulePath, path } = codePath[moduleCode]
|
||||||
if (modulePath) {
|
if (modulePath) {
|
||||||
if (type === 'module') {
|
if (type === 'module') {
|
||||||
moduleCode === 'App_Database' ? push(modulePath + `?id=${cateId}`) : push(modulePath)
|
push(modulePath)
|
||||||
} else {
|
} else {
|
||||||
push(path + id)
|
push(path + id)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import { NModal, NPopover } from 'naive-ui'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import Searchs from '@/components/search.vue'
|
import Searchs from '@/components/search.vue'
|
||||||
import { report, treeDbList } from '@/api/daikin/base'
|
import { report, treeDbList } from '@/api/daikin/base'
|
||||||
// import axios from 'axios'
|
|
||||||
useTitle('大金中国调达本部 HOMEPAGE')
|
useTitle('大金中国调达本部 HOMEPAGE')
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
|
|
@ -70,8 +69,7 @@ const Menus = ref([
|
||||||
{
|
{
|
||||||
key: 'YCWZ',
|
key: 'YCWZ',
|
||||||
name: '调达本部才望子',
|
name: '调达本部才望子',
|
||||||
isClick: true
|
link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index'
|
||||||
// link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'GCDB',
|
key: 'GCDB',
|
||||||
|
|
@ -114,10 +112,8 @@ async function getDbTree() {
|
||||||
|
|
||||||
getDbTree()
|
getDbTree()
|
||||||
let flag = false
|
let flag = false
|
||||||
const onClick = ref(false)
|
|
||||||
function menuHandler(menu: any, index: number) {
|
function menuHandler(menu: any, index: number) {
|
||||||
activeMenuKey.value = menu.key
|
activeMenuKey.value = menu.key
|
||||||
onClick.value = true
|
|
||||||
console.log(menu, index)
|
console.log(menu, index)
|
||||||
if (menu.key === 'DataBase' && idx.value === index) {
|
if (menu.key === 'DataBase' && idx.value === index) {
|
||||||
report({ moduleCode: 'App_Database' })
|
report({ moduleCode: 'App_Database' })
|
||||||
|
|
@ -147,14 +143,6 @@ function menuHandler(menu: any, index: number) {
|
||||||
}
|
}
|
||||||
push({ name: menu.key })
|
push({ name: menu.key })
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleExpand = (m, index) => {
|
|
||||||
if (m.key === activeMenuKey.value) {
|
|
||||||
onClick.value = !onClick.value
|
|
||||||
} else {
|
|
||||||
menuHandler(m, index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const shorm = ref(false)
|
const shorm = ref(false)
|
||||||
|
|
||||||
const { path } = useRoute()
|
const { path } = useRoute()
|
||||||
|
|
@ -168,10 +156,6 @@ watchEffect(() => {
|
||||||
}, 0)
|
}, 0)
|
||||||
})
|
})
|
||||||
function goChild(menu: any) {
|
function goChild(menu: any) {
|
||||||
if (menu.isClick) {
|
|
||||||
goUrl()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
activeItem = menu.key
|
activeItem = menu.key
|
||||||
if (menu.key === 'CODE') {
|
if (menu.key === 'CODE') {
|
||||||
shorm.value = true
|
shorm.value = true
|
||||||
|
|
@ -182,15 +166,6 @@ function goChild(menu: any) {
|
||||||
push({ name: menu.key, query: menu.params || {} })
|
push({ name: menu.key, query: menu.params || {} })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const goUrl = () => {
|
|
||||||
const url = store.user?.cwzLoginUrl
|
|
||||||
const doman = url ? url.split('?')?.shift() : ''
|
|
||||||
if (!doman) return
|
|
||||||
fetch(url).then((res) => {
|
|
||||||
window.open(doman, '_blank')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
var activeItem = 0
|
var activeItem = 0
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -209,21 +184,15 @@ var activeItem = 0
|
||||||
<!-- max-h-636px -->
|
<!-- max-h-636px -->
|
||||||
<div class="pt10px pb10px flex-1 max-h-836px">
|
<div class="pt10px pb10px flex-1 max-h-836px">
|
||||||
<div
|
<div
|
||||||
class="nav pl20px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline transition-all111"
|
class="nav pl36px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline"
|
||||||
v-for="(m, index) in Menus"
|
v-for="(m, index) in Menus"
|
||||||
:key="m.key"
|
:key="m.key"
|
||||||
:class="activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''"
|
:class="activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''"
|
||||||
@click="() => menuHandler(m, index)"
|
@click="() => menuHandler(m, index)"
|
||||||
>
|
>
|
||||||
<div class="relative" :class="activeMenuKey === m.key && 'onActive'">
|
<div :class="activeMenuKey === m.key && 'onActive'">
|
||||||
<p class="inline-block">
|
<img v-if="activeMenuKey === m.key" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
|
||||||
<img
|
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" />
|
||||||
v-if="activeMenuKey === m.key"
|
|
||||||
:src="m.icon1"
|
|
||||||
class="w22px h22px mr12px mt--5px"
|
|
||||||
/>
|
|
||||||
<img v-else :src="m.icon" class="w22px h22px mr12px mt--5px" />
|
|
||||||
</p>
|
|
||||||
<span
|
<span
|
||||||
class="text-22px font-900 leading-22px"
|
class="text-22px font-900 leading-22px"
|
||||||
:class="
|
:class="
|
||||||
|
|
@ -240,23 +209,9 @@ var activeItem = 0
|
||||||
</span>
|
</span>
|
||||||
<span class="text-18px italic font-500" v-if="m.other">{{ m.other }}</span>
|
<span class="text-18px italic font-500" v-if="m.other">{{ m.other }}</span>
|
||||||
</span>
|
</span>
|
||||||
<p
|
|
||||||
@click.stop="handleExpand(m, index)"
|
|
||||||
v-if="['DataBase', 'link', 'phone'].includes(m.key)"
|
|
||||||
class="inline-block ml-auto text-#FFF cursor-pointer p-2 float-right mr--10px mt--2"
|
|
||||||
:class="activeMenuKey === m.key && '!text-#4977FC'"
|
|
||||||
>
|
|
||||||
<el-icon size="26">
|
|
||||||
<CaretTop v-if="activeMenuKey === m.key && onClick" class="text-#4977FC" />
|
|
||||||
<CaretBottom v-else />
|
|
||||||
</el-icon>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div v-if="m.children && idx == index" class="pl40px">
|
||||||
v-if="m.children && idx == index && onClick"
|
|
||||||
class="pl30px transition-all duration-300"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
class="my16px pl30px text-#fff activeChildren text-20px"
|
class="my16px pl30px text-#fff activeChildren text-20px"
|
||||||
v-for="(item, ind) in m.children"
|
v-for="(item, ind) in m.children"
|
||||||
|
|
@ -301,11 +256,8 @@ var activeItem = 0
|
||||||
</div>
|
</div>
|
||||||
</n-popover>
|
</n-popover>
|
||||||
<div class="p20px w270px rd-20px b-4px bg-#fff/4 b-4px b-solid b-#fff/23 text-14px relative">
|
<div class="p20px w270px rd-20px b-4px bg-#fff/4 b-4px b-solid b-#fff/23 text-14px relative">
|
||||||
<!-- href="http://106.14.114.146/scripts/cbgrn/grn.exe" -->
|
<a
|
||||||
<!-- href="http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index" -->
|
href="http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index"
|
||||||
<div
|
|
||||||
@click="goUrl"
|
|
||||||
:href="store.user?.cwzLoginUrl"
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="no-underline text-#fff"
|
class="no-underline text-#fff"
|
||||||
>
|
>
|
||||||
|
|
@ -321,7 +273,7 @@ var activeItem = 0
|
||||||
src="@/assets/images/zhulj@2x.png"
|
src="@/assets/images/zhulj@2x.png"
|
||||||
class="absolute w22px h22px mr10px top--15px right--20px"
|
class="absolute w22px h22px mr10px top--15px right--20px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</a>
|
||||||
<div class="mt10px ml-30px opacity-70" @click="(e) => e.stopPropagation()">
|
<div class="mt10px ml-30px opacity-70" @click="(e) => e.stopPropagation()">
|
||||||
请点击上方链接登录cybouzu
|
请点击上方链接登录cybouzu
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -438,7 +390,7 @@ var activeItem = 0
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 32px 0 0 32px;
|
border-radius: 32px 0 0 32px;
|
||||||
|
|
||||||
padding: 24px 16px 24px 20px;
|
padding: 24px 16px 24px 36px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import PurgeIcons from 'vite-plugin-purge-icons'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: '/',
|
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/test-api': {
|
'/test-api': {
|
||||||
|
|
|
||||||