main
王文龙 2023-12-15 18:12:46 +08:00
parent 4ce47123c8
commit 888f9af83b
11 changed files with 1644 additions and 1221 deletions

1
components.d.ts vendored
View File

@ -16,6 +16,7 @@ declare module 'vue' {
AppNewsBox: typeof import('./src/components/AppNewsBox.vue')['default'] AppNewsBox: typeof import('./src/components/AppNewsBox.vue')['default']
AppPagination: typeof import('./src/components/AppPagination.vue')['default'] AppPagination: typeof import('./src/components/AppPagination.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']

View File

@ -19,9 +19,9 @@ export function report(data: any) {
// {"msg":"b5c17f42-4f63-4fbd-b5cf-9c82b033c9a7","code":200} // {"msg":"b5c17f42-4f63-4fbd-b5cf-9c82b033c9a7","code":200}
export interface LoginReq { export interface LoginReq {
// 账号 13923879210 // 账号 13923879210
account: string, account: string
// 密码 123456 // 密码 123456
password: string, password: string
authType: string authType: string
} }
export function login(data: LoginReq) { export function login(data: LoginReq) {
@ -63,18 +63,17 @@ export async function deptTree(params: any) {
return http.get('/user/deptTree', { params }) return http.get('/user/deptTree', { params })
} }
export interface userPage { export interface userPage {
pageNum?:string, pageNum?: string
pageSize?:string, pageSize?: string
phonenumber?:string, phonenumber?: string
status?:string, status?: string
beingTime:string, beingTime: string
endTime:string, endTime: string
deptId?:string, deptId?: string
nickName:string, nickName: string
reviewSource:string, reviewSource: string
} }
/** /**
* URL:daikin- * URL:daikin-
GET GET
@ -117,7 +116,7 @@ export interface ArticlePageReq {
// 类型 1-外部情报 2-内部情报 // 类型 1-外部情报 2-内部情报
type?: string type?: string
// 分类 1-外部环境 2-竞争对手 3-供方动向 4-大金集团 5-中国据点 6-调达本部 7-news 8-重要通知 // 分类 1-外部环境 2-竞争对手 3-供方动向 4-大金集团 5-中国据点 6-调达本部 7-news 8-重要通知
cate?: String, cate?: String
position: String position: String
} }
export async function getArticlePage(params: ArticlePageReq) { export async function getArticlePage(params: ArticlePageReq) {
@ -156,7 +155,7 @@ export async function getManagerDetail(id: string) {
} }
// 撤回 // 撤回
export async function deleteWithdraw(id: string) { export async function deleteWithdraw(id: string) {
return http.get("/article/withdraw?id=" + id) return http.get('/article/withdraw?id=' + id)
} }
// 外部情报-管理列表 // 外部情报-管理列表
export async function getManagerList(params: { pageNum: any; pageSize: any }) { export async function getManagerList(params: { pageNum: any; pageSize: any }) {
@ -169,21 +168,24 @@ export async function getExternalManagerDetail(id: string) {
} }
// news/重要通知-撤回 // news/重要通知-撤回
export async function externalWithdraw(id: string) { export async function externalWithdraw(id: string) {
return http.get("/article/external/withdraw?id=" + id) return http.get('/article/external/withdraw?id=' + id)
} }
// news/重要通知-流程列表 // news/重要通知-流程列表
export async function getExternalManagerList(params: {pageNum: any;pageSize:any}) { export async function getExternalManagerList(params: {
pageNum: any
pageSize: any
}) {
return http.get('/article/external/getManagerList', { params }) return http.get('/article/external/getManagerList', { params })
} }
// -------------------------------------列表end // -------------------------------------列表end
export interface ArticleSave { export interface ArticleSave {
title: string, //标题 title: string //标题
content: string, //内容 content: string //内容
tag: string, //标签 紧急/New tag: string //标签 紧急/New
source: string, //"网站添加", //来源 文本 source: string //"网站添加", //来源 文本
type?: string, type?: string
cate?: string, //分类 1-外部环境 2-竞争对手 3-供方动向 4-大金集团 5-中国据点 6-调达本部 cate?: string //分类 1-外部环境 2-竞争对手 3-供方动向 4-大金集团 5-中国据点 6-调达本部
reviewSource:number, reviewSource: number
} }
// 接口URL: 提交情报 // 接口URL: 提交情报
@ -198,7 +200,7 @@ export interface ArticleSave {
// } // }
export async function saveArticle(data: ArticleSave) { export async function saveArticle(data: ArticleSave) {
// return openApiRequest({ url: `/article/save`, data }) // return openApiRequest({ url: `/article/save`, data })
return http.post("/article/save",data) return http.post('/article/save', data)
} }
// 接口URL: 分类文件-上下拖动排序 // 接口URL: 分类文件-上下拖动排序
@ -211,7 +213,7 @@ export async function saveArticle(data: ArticleSave) {
// "lastId": 5 //被移动位置的文件id // "lastId": 5 //被移动位置的文件id
// } // }
export async function dragFile(data: ArticleSave) { export async function dragFile(data: ArticleSave) {
return http.post("/db/cateFileSort",data) return http.post('/db/cateFileSort', data)
} }
/**banner /**banner
@ -219,13 +221,11 @@ export async function dragFile(data: ArticleSave) {
* *
*/ */
export async function getBannerList(params: any) { export async function getBannerList(params: any) {
return http.get("/article/getBannerList",{params}) return http.get('/article/getBannerList', { params })
} }
export interface notice { export interface notice {
reviewStatus:number, reviewStatus: number
reviewSource: number reviewSource: number
} }
@ -237,7 +237,7 @@ token
674f3e91-38de-4065-a4e2-2ce8981864fa 674f3e91-38de-4065-a4e2-2ce8981864fa
*/ */
export async function getNoticeList(params: notice) { export async function getNoticeList(params: notice) {
return http.get("/article/getNoticeList",{params}) return http.get('/article/getNoticeList', { params })
} }
/** /**
@ -248,11 +248,11 @@ token
674f3e91-38de-4065-a4e2-2ce8981864fa 674f3e91-38de-4065-a4e2-2ce8981864fa
*/ */
export async function getHomeList(params: notice) { export async function getHomeList(params: notice) {
return http.get("/cd/homeList",{params}) return http.get('/cd/homeList', { params })
} }
export async function statDel(params: notice) { export async function statDel(params: notice) {
return http.get("/cd/statDel",{params}) return http.get('/cd/statDel', { params })
} }
/** /**
@ -263,18 +263,17 @@ token
674f3e91-38de-4065-a4e2-2ce8981864fa 674f3e91-38de-4065-a4e2-2ce8981864fa
*/ */
export async function getTreeList(params: notice) { export async function getTreeList(params: notice) {
return http.get("/cd/treeList",{params}) return http.get('/cd/treeList', { params })
} }
export async function statEdit(data: ArticleReview) { export async function statEdit(data: ArticleReview) {
return http.post("/cd/statEdit",data) return http.post('/cd/statEdit', data)
} }
export interface msg { export interface msg {
pageNum:number, pageNum: number
treeSource:number, treeSource: number
pageSize:number, pageSize: number
} }
/** /**
* http://127.0.0.1:8811/openApi/article/boardMsgList * http://127.0.0.1:8811/openApi/article/boardMsgList
@ -282,10 +281,10 @@ export interface msg{
* *
*/ */
export async function boardMsgList(params: msg) { export async function boardMsgList(params: msg) {
return http.get("/article/boardMsgList",{params}) return http.get('/article/boardMsgList', { params })
} }
export async function deleteMsgById(id: string) { export async function deleteMsgById(id: string) {
return http.get("/article/delMsgList?id=" + id) return http.get('/article/delMsgList?id=' + id)
} }
/** /**
@ -294,21 +293,24 @@ POST
http://127.0.0.1:8811/openApi/supplier/trendsAdd http://127.0.0.1:8811/openApi/supplier/trendsAdd
*/ */
export async function trendsAdd(data: { title: any; content: string }) { export async function trendsAdd(data: { title: any; content: string }) {
return http.post("/supplier/trendsAdd",data) return http.post('/supplier/trendsAdd', data)
} }
/** /**
* -- * --
http://127.0.0.1:8811/openApi/supplier/trendsDetail?id=1 http://127.0.0.1:8811/openApi/supplier/trendsDetail?id=1
*/ */
export async function trendsDetail(params: any) { export async function trendsDetail(params: any) {
return http.get("/supplier/trendsDetail" ,{params}) return http.get('/supplier/trendsDetail', { params })
} }
/**-- /**--
* http://127.0.0.1:8811/openApi/supplier/trendsPage?pageNum=1&pageSize=20 * http://127.0.0.1:8811/openApi/supplier/trendsPage?pageNum=1&pageSize=20
*/ */
export async function trendsPage(params: { pageNum: number; pageSize: number }) { export async function trendsPage(params: {
return http.get("/supplier/trendsPage" ,{params}) pageNum: number
pageSize: number
}) {
return http.get('/supplier/trendsPage', { params })
} }
/**-- /**--
@ -316,40 +318,43 @@ export async function trendsPage(params: { pageNum: number; pageSize: number })
http://127.0.0.1:8811/openApi/supplier/demandAdd http://127.0.0.1:8811/openApi/supplier/demandAdd
*/ */
export async function demandAdd(data: any) { export async function demandAdd(data: any) {
return http.post("/supplier/demandAdd",data) return http.post('/supplier/demandAdd', data)
} }
/** /**
* -- * --
* http://127.0.0.1:8811/openApi/supplier/demandDetail?id=1 * http://127.0.0.1:8811/openApi/supplier/demandDetail?id=1
*/ */
export async function demandDetail(params: any) { export async function demandDetail(params: any) {
return http.get("/supplier/demandDetail" ,{params}) return http.get('/supplier/demandDetail', { params })
} }
/** /**
* -- * --
* http://127.0.0.1:8811/openApi/supplier/demandPage?pageNum=1&pageSize=20 * http://127.0.0.1:8811/openApi/supplier/demandPage?pageNum=1&pageSize=20
*/ */
export async function demandPage(params: { pageNum: number; pageSize: number }) { export async function demandPage(params: {
return http.get("/supplier/demandPage" ,{params}) pageNum: number
pageSize: number
}) {
return http.get('/supplier/demandPage', { params })
} }
/*** /***
* -- * --
* http://127.0.0.1:8811/openApi/supplier/faqAdd * http://127.0.0.1:8811/openApi/supplier/faqAdd
*/ */
export async function faqAdd(data: any) { export async function faqAdd(data: any) {
return http.post("/supplier/faqAdd",data) return http.post('/supplier/faqAdd', data)
} }
/**-- /**--
* http://127.0.0.1:8811/openApi/supplier/faqDetail?id=2 * http://127.0.0.1:8811/openApi/supplier/faqDetail?id=2
*/ */
export async function faqDetail(params: any) { export async function faqDetail(params: any) {
return http.get("/supplier/faqDetail" ,{params}) return http.get('/supplier/faqDetail', { params })
} }
/**-- /**--
* http://127.0.0.1:8811/openApi/supplier/faqPage?pageNum=1&pageSize=20 * http://127.0.0.1:8811/openApi/supplier/faqPage?pageNum=1&pageSize=20
*/ */
export async function faqPage(params: { pageNum: number; pageSize: number }) { export async function faqPage(params: { pageNum: number; pageSize: number }) {
return http.get("/supplier/faqPage" ,{params}) return http.get('/supplier/faqPage', { params })
} }
/** /**
@ -368,7 +373,7 @@ export async function demandDel(params: any) {
* http://127.0.0.1:8811/openApi/supplier/reply * http://127.0.0.1:8811/openApi/supplier/reply
*/ */
export async function reply(data: any) { export async function reply(data: any) {
return http.post("/supplier/reply",data) return http.post('/supplier/reply', data)
} }
/**-- /**--
@ -386,12 +391,12 @@ export async function demandWithdraw(data: any) {
} }
export interface ArticleReview { export interface ArticleReview {
id?:string, id?: string
title:string, title: string
content:string, content: string
source:string, source: string
cate?:string, cate?: string
noticeId?:string, noticeId?: string
userIdList: any[] userIdList: any[]
} }
@ -413,30 +418,26 @@ http://127.0.0.1:8811/openApi/article/review
* @returns * @returns
*/ */
export async function review(data: ArticleReview) { export async function review(data: ArticleReview) {
return http.post("/article/review",data) return http.post('/article/review', data)
} }
/** /**
* CD- * CD-
* @returns http://127.0.0.1:8811/openApi/cd/amountList * @returns http://127.0.0.1:8811/openApi/cd/amountList
*/ */
export async function amountList() { export async function amountList() {
return http.get("/cd/amountList") return http.get('/cd/amountList')
} }
/** /**
* "number": "DIS", //编号 DIS/DSZ/DISH * "number": "DIS", //编号 DIS/DSZ/DISH
"amount": "30" "amount": "30"
* @returns http://127.0.0.1:8811/openApi/cd/updateAmount * @returns http://127.0.0.1:8811/openApi/cd/updateAmount
*/ */
export async function updateAmount(data: any) { export async function updateAmount(data: any) {
return http.post("/cd/updateAmount",data) return http.post('/cd/updateAmount', data)
} }
// 接口URL: // 接口URL:
// GET // GET
// http://127.0.0.1:8811/openApi/cdCate/treeList // http://127.0.0.1:8811/openApi/cdCate/treeList
@ -471,9 +472,8 @@ export async function curYearDataStat(data:getData){
return http.post('/cdCate/curYearDataStat', data) return http.post('/cdCate/curYearDataStat', data)
} }
export interface hisYearD { export interface hisYearD {
cateId:number, cateId: number
yearTime: string yearTime: string
} }
/* /*
@ -493,7 +493,6 @@ export async function hisYearDataStat(data:hisYearD){
return http.post('/cdCate/hisYearDataStat', data) return http.post('/cdCate/hisYearDataStat', data)
} }
/** /**
* CD- * CD-
* http://127.0.0.1:8811/openApi/cdCate/hisDataList * http://127.0.0.1:8811/openApi/cdCate/hisDataList
@ -541,12 +540,13 @@ http://127.0.0.1:8811/openApi/common/upload
multipart/form-data multipart/form-data
*/ */
export async function upload(
export async function upload(params: any,Headers: AxiosRequestConfig<any> | undefined){ params: any,
Headers: AxiosRequestConfig<any> | undefined
) {
return http.post('/common/upload', params, Headers) return http.post('/common/upload', params, Headers)
} }
/** /**
* URL: * URL:
GET GET
@ -560,11 +560,10 @@ export async function getGroupList(){
return http.get('/group/getList') return http.get('/group/getList')
} }
export interface getNotice { export interface getNotice {
id:string, id: string
name:string, name: string
userIdList:Array<any>, userIdList: Array<any>
} }
/** /**
@ -573,13 +572,15 @@ POST
http://127.0.0.1:8811/openApi/group/add http://127.0.0.1:8811/openApi/group/add
* *
*/ */
export async function addGroup(params: getNotice,Headers:AxiosRequestConfig<any> | undefined){ export async function addGroup(
params: getNotice,
Headers: AxiosRequestConfig<any> | undefined
) {
return http.post('/group/add', params, Headers) return http.post('/group/add', params, Headers)
} }
export interface group { export interface group {
id:string, id: string
} }
/** /**
@ -591,9 +592,6 @@ export async function deleteGroup(params: group){
return http.get('/group/delete', { params }) return http.get('/group/delete', { params })
} }
export interface newPwd { export interface newPwd {
newPassword: string newPassword: string
oldPassword: string oldPassword: string
@ -604,11 +602,13 @@ export interface newPwd{
http://127.0.0.1:8811/openApi/auth/updatePwd http://127.0.0.1:8811/openApi/auth/updatePwd
* *
*/ */
export async function updatePwd(params: newPwd,Headers:AxiosRequestConfig<any> | undefined){ export async function updatePwd(
params: newPwd,
Headers: AxiosRequestConfig<any> | undefined
) {
return http.post('/auth/updatePwd', params, Headers) return http.post('/auth/updatePwd', params, Headers)
} }
export interface work { export interface work {
pageNum: number pageNum: number
} }
@ -636,8 +636,8 @@ export async function getPageWork(params:work){
} }
export interface visit { export interface visit {
pageNum:number, pageNum: number
status:number, status: number
source: number source: number
} }
@ -651,7 +651,6 @@ export async function getPageInv(params:visit){
return http.get('/inv/getPage', { params }) return http.get('/inv/getPage', { params })
} }
/**访 /**访
* http://127.0.0.1:8811/openApi/visit/getPage * http://127.0.0.1:8811/openApi/visit/getPage
* *
@ -662,20 +661,23 @@ export async function getPageVisit(params:visit){
} }
export interface pupid { export interface pupid {
title:string, title: string
content:string, content: string
actName:string, actName: string
actSTime:string, actSTime: string
actETime:string, actETime: string
position:string, position: string
userIdList:Array<any>, userIdList: Array<any>
} }
/** /**
* : * :
POST POST
http://127.0.0.1:8811/openApi/inv/add http://127.0.0.1:8811/openApi/inv/add
*/ */
export async function addPageInv(params: pupid,Headers:AxiosRequestConfig<any> | undefined){ export async function addPageInv(
params: pupid,
Headers: AxiosRequestConfig<any> | undefined
) {
return http.post('/inv/add', params, Headers) return http.post('/inv/add', params, Headers)
} }
@ -687,7 +689,10 @@ export async function addPageInv(params: pupid,Headers:AxiosRequestConfig<any> |
POST POST
http://127.0.0.1:8811/openApi/visit/add http://127.0.0.1:8811/openApi/visit/add
*/ */
export async function addPageVisit(params: pupid,Headers:AxiosRequestConfig<any> | undefined){ export async function addPageVisit(
params: pupid,
Headers: AxiosRequestConfig<any> | undefined
) {
return http.post('/visit/add', params, Headers) return http.post('/visit/add', params, Headers)
} }
@ -702,7 +707,6 @@ export async function visitInfo(id: string){
return http.get(`/visit/getDetail/${id}`) return http.get(`/visit/getDetail/${id}`)
} }
/** /**
* URL: * URL:
@ -714,7 +718,6 @@ export async function invInfo(id: string){
return http.get(`/inv/getDetail/${id}`) return http.get(`/inv/getDetail/${id}`)
} }
/** /**
* CSR * CSR
* http://127.0.0.1:8811/openApi/csr/getDetail * http://127.0.0.1:8811/openApi/csr/getDetail
@ -723,13 +726,11 @@ export async function getCSRDetail(){
return http.get(`/csr/getDetail`) return http.get(`/csr/getDetail`)
} }
export interface CSR { export interface CSR {
id:string, id: string
content: Object content: Object
} }
/** /**
* http://127.0.0.1:8811/openApi/csr/updateFootprint * http://127.0.0.1:8811/openApi/csr/updateFootprint
* -/ * -/
@ -742,7 +743,11 @@ export async function updateFootprint(data: CSR){
* - * -
* http://127.0.0.1:8811/openApi/csr/getFootprintList * http://127.0.0.1:8811/openApi/csr/getFootprintList
*/ */
export async function getFootprintList(params: { pageNum: number; pageSize: number; moduleId: string }){ export async function getFootprintList(params: {
pageNum: number
pageSize: number
moduleId: string
}) {
return http.get(`/csr/getFootprintList`, { params }) return http.get(`/csr/getFootprintList`, { params })
} }
/**-/ /**-/
@ -761,7 +766,6 @@ export async function delFootprint(params: any){
return http.get(`/csr/delFootprint`, { params }) return http.get(`/csr/delFootprint`, { params })
} }
/** /**
* CSR * CSR
* http://127.0.0.1:8811/openApi/csr/add * http://127.0.0.1:8811/openApi/csr/add
@ -770,7 +774,6 @@ export async function CSRAdd(data: CSR){
return http.post(`/csr/add`, data) return http.post(`/csr/add`, data)
} }
/**PLUS /**PLUS
* http://127.0.0.1:8811/openApi/csr/getCsrActList * http://127.0.0.1:8811/openApi/csr/getCsrActList
*/ */
@ -787,7 +790,6 @@ export async function updateAct(data: any){
return http.post(`/csr/updateAct`, data) return http.post(`/csr/updateAct`, data)
} }
/**Lab /**Lab
* http://127.0.0.1:8811/openApi/lab/getDetail * http://127.0.0.1:8811/openApi/lab/getDetail
*/ */
@ -795,7 +797,6 @@ export async function getLabActList(){
return http.get(`/lab/getDetail`) return http.get(`/lab/getDetail`)
} }
/** /**
* Lab * Lab
http://127.0.0.1:8811/openApi/lab/add http://127.0.0.1:8811/openApi/lab/add
@ -826,9 +827,6 @@ export async function actLABDel(params: any){
return http.get(`/lab/actDel`, { params }) return http.get(`/lab/actDel`, { params })
} }
/** /**
* http://127.0.0.1:8811/openApi/lab/getCsrActList * http://127.0.0.1:8811/openApi/lab/getCsrActList
*/ */
@ -855,7 +853,6 @@ export async function deleteCate(params: any){
return http.get(`/lab/deleteCate`, { params }) return http.get(`/lab/deleteCate`, { params })
} }
/** /**
* http://127.0.0.1:8811/openApi/lab/editCateItem * http://127.0.0.1:8811/openApi/lab/editCateItem
*/ */
@ -876,9 +873,6 @@ export async function getCateItemList(params: any){
return http.get(`/lab/getCateItemList`, { params }) return http.get(`/lab/getCateItemList`, { params })
} }
/**BCP /**BCP
* http://127.0.0.1:8811/openApi/bcp/add * http://127.0.0.1:8811/openApi/bcp/add
*/ */
@ -886,7 +880,6 @@ export async function addBPC(data: any){
return http.post(`/bcp/add`, data) return http.post(`/bcp/add`, data)
} }
/**BCP /**BCP
* http://127.0.0.1:8811/openApi/bcp/getDetail * http://127.0.0.1:8811/openApi/bcp/getDetail
*/ */
@ -962,9 +955,9 @@ export async function delBPCActList(params:{id: any}){
export async function BPCDownload(params: { id: any }) { export async function BPCDownload(params: { id: any }) {
// return http.get(`/bcp/download`,{params}) // return http.get(`/bcp/download`,{params})
return http({ return http({
method: "get", method: 'get',
url: "/bcp/download?id=" +params.id, url: '/bcp/download?id=' + params.id,
responseType: "arraybuffer" responseType: 'arraybuffer'
}) })
} }
@ -999,16 +992,16 @@ export async function saveMarketUser(data: any){
export async function MarketDownload(params: { id: any }) { export async function MarketDownload(params: { id: any }) {
// return http.get(`/bcp/download`,{params}) // return http.get(`/bcp/download`,{params})
return http({ return http({
method: "get", method: 'get',
url: "/marketPre/download?id=" +params.id, url: '/marketPre/download?id=' + params.id,
responseType: "arraybuffer" responseType: 'arraybuffer'
}) })
} }
/** /**
* http://127.0.0.1:8811/openApi/marketPre/preview?id=11 * http://127.0.0.1:8811/openApi/marketPre/preview?id=11
*/ */
export async function MarketPreview(params: { id: any }) { export async function MarketPreview(params: { id: any }) {
return http.get("/marketPre/preview",{params}) return http.get('/marketPre/preview', { params })
} }
/***7- /***7-
* http://127.0.0.1:8811/openApi/market/historySevenDay * http://127.0.0.1:8811/openApi/market/historySevenDay
@ -1045,22 +1038,15 @@ export async function rateHistoryStat(data: any){
* http://127.0.0.1:8811/openApi/common/getCurrencyList * http://127.0.0.1:8811/openApi/common/getCurrencyList
*/ */
export async function getCurrencyList() { export async function getCurrencyList() {
return http.get("/common/getCurrencyList") return http.get('/common/getCurrencyList')
} }
/** /**
* http://127.0.0.1:8811/openApi/common/getMetalList * http://127.0.0.1:8811/openApi/common/getMetalList
*/ */
export async function getMetalList() { export async function getMetalList() {
return http.get("/common/getMetalList") return http.get('/common/getMetalList')
} }
/**- /**-
* http://127.0.0.1:8811/openApi/rate/homePage * http://127.0.0.1:8811/openApi/rate/homePage
*/ */
@ -1076,9 +1062,6 @@ export async function marketPreADD(data: any){
return http.post(`/marketPre/add`, data) return http.post(`/marketPre/add`, data)
} }
/**- /**-
* *
* http://127.0.0.1:8811/openApi/quality/badartAdd * http://127.0.0.1:8811/openApi/quality/badartAdd
@ -1138,7 +1121,6 @@ export async function badartList(){
return http.get(`/quality/badartList?pageNum=1&pageSize=1000`) return http.get(`/quality/badartList?pageNum=1&pageSize=1000`)
} }
/**- /**-
* http://127.0.0.1:8811/openApi/quality/highList?pageNum=1 * http://127.0.0.1:8811/openApi/quality/highList?pageNum=1
*/ */
@ -1169,8 +1151,6 @@ export async function topStat(){
return http.get(`/quality/topStat`) return http.get(`/quality/topStat`)
} }
// DATABASE // DATABASE
/** /**
* http://127.0.0.1:8811/openApi/db/cateAdd * http://127.0.0.1:8811/openApi/db/cateAdd
@ -1194,7 +1174,6 @@ export async function treeDbList(params: any){
return http.get(`/db/treeList`, { params }) return http.get(`/db/treeList`, { params })
} }
/** /**
* http://127.0.0.1:8811/openApi/db/cateInfo?id=1 * http://127.0.0.1:8811/openApi/db/cateInfo?id=1
*/ */
@ -1202,7 +1181,6 @@ export async function cateInfo(params: any){
return http.get(`/db/cateInfo`, { params }) return http.get(`/db/cateInfo`, { params })
} }
/** /**
* http://127.0.0.1:8811/openApi/db/cateDel?id=1 * http://127.0.0.1:8811/openApi/db/cateDel?id=1
*/ */
@ -1237,9 +1215,9 @@ export async function cateFileList(params: any){
*/ */
export async function download(params: any) { export async function download(params: any) {
return http({ return http({
method: "get", method: 'get',
url: "/db/download?id=" +params.id, url: '/db/download?id=' + params.id,
responseType: "arraybuffer" responseType: 'arraybuffer'
}) })
} }
@ -1376,8 +1354,15 @@ export async function fetchUpdateHis(data?: any){
return http.post(`/market/updateHis`, data) return http.post(`/market/updateHis`, data)
} }
/**
* https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchReviewAuthCateList(params?: any) {
return http.get(`/db/getReviewAuthCateList`, { params })
}
/**
* - https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchmoduleStatExternalPage(params?: any) {
return http.get(`/moduleStat/externalPage`, { params })
}

View File

@ -1,27 +1,21 @@
<script setup lang="ts"> <script setup lang="ts">
import { import { charData, charData2, pieData1 } from './CSRDatas'
charData,
charData2,
pieData1,
} from './CSRDatas'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// const { chartRef, option } = charData() // const { chartRef, option } = charData()
// const { chartRef: chartRef1, option: option1 } = charData2() // const { chartRef: chartRef1, option: option1 } = charData2()
// const { chartRef: chartRefP1, option: optionP1 } = pieData1() // const { chartRef: chartRefP1, option: optionP1 } = pieData1()
import { NNumberAnimation,NDatePicker } from "naive-ui"; import { NNumberAnimation, NDatePicker } from 'naive-ui'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { import { fetchStatListlBar, fetchStatListlPie } from '@/api/daikin/base'
fetchStatListlBar,fetchStatListlPie
} from '@/api/daikin/base'
const yearrange = ref([new Date(2020, 0).valueOf(), new Date().valueOf()]) const yearrange = ref([new Date(2020, 0).valueOf(), new Date().valueOf()])
const pieYear = ref('20') const pieYear = ref('20')
const option = ref<any>({}); const option = ref<any>({})
const option1 = ref({}); const option1 = ref({})
const optionP1 = ref<any>({}); const optionP1 = ref<any>({})
const chartRef = ref<any>(null); const chartRef = ref<any>(null)
const chartRef1 = ref(null); const chartRef1 = ref(null)
const chartRefP1 = ref(null); const chartRefP1 = ref(null)
const locale = computed(() => zhCn) const locale = computed(() => zhCn)
const YearTime1 = ref<any>('2020') const YearTime1 = ref<any>('2020')
const YearTime2 = ref<any>('2023') const YearTime2 = ref<any>('2023')
@ -32,13 +26,13 @@ const cardsClick = (it) => {
// dataInfo.treeSource = it // dataInfo.treeSource = it
} }
const numberObj: any = { const numberObj: any = {
'Fe':'铁', Fe: '铁',
'Cu':'铜', Cu: '铜',
'Al':'铝', Al: '铝',
'shuzhi':'树脂' shuzhi: '树脂'
} }
const numberList = ['Al', 'Fe', 'Cu', 'shuzhi'] const numberList = ['Al', 'Fe', 'Cu', 'shuzhi']
const pieDecObj = ref<any>({}); const pieDecObj = ref<any>({})
numberList.forEach((item) => { numberList.forEach((item) => {
pieDecObj.value[item + 1] = 0 pieDecObj.value[item + 1] = 0
pieDecObj.value[item + 2] = 0 pieDecObj.value[item + 2] = 0
@ -71,9 +65,12 @@ const getStatListlBar = async ([startYear, endYear] = [2020, 2023]) => {
} }
const statListlPieData = ref([]) const statListlPieData = ref([])
const pieUseTotalData = ref(0) const pieUseTotalData = ref<any>(0)
const pieDischargeTotal = ref(0) const pieDischargeTotal = ref<any>(0)
const getStatListlPie = async ( year = option.value.xAxis.data || '2020', channel = 'DIS') => { const getStatListlPie = async (
year = option.value.xAxis.data || '2020',
channel = 'DIS'
) => {
numberList.forEach((item) => { numberList.forEach((item) => {
pieDecObj.value[item + 1] = 0 pieDecObj.value[item + 1] = 0
pieDecObj.value[item + 2] = 0 pieDecObj.value[item + 2] = 0
@ -86,12 +83,13 @@ const getStatListlPie = async ( year = option.value.xAxis.data || '2020', channe
}) })
data.forEach((item: any) => { data.forEach((item: any) => {
pieDecObj.value[item.number + item.type] = item.negAmount pieDecObj.value[item.number + item.type] = item.negAmount
}); })
statListlPieData.value = data || [] statListlPieData.value = data || []
optionP1.value.series[0].data = []; optionP1.value.series[0].data = []
optionP1.value.series[1].data = []; optionP1.value.series[1].data = []
optionP1.value.title.text = `【FY${pieYear.value}原材料构成数据】` optionP1.value.title.text = `【FY${pieYear.value}原材料构成数据】`
data?.length && numberList.forEach((item) => { data?.length &&
numberList.forEach((item) => {
optionP1.value.series[0].data.push({ optionP1.value.series[0].data.push({
name: numberObj[item], name: numberObj[item],
value: pieDecObj.value[item + 1] || '-' value: pieDecObj.value[item + 1] || '-'
@ -103,9 +101,12 @@ const getStatListlPie = async ( year = option.value.xAxis.data || '2020', channe
}) })
pieDischargeTotal.value += pieDecObj.value[item + 2] || 0 pieDischargeTotal.value += pieDecObj.value[item + 2] || 0
}) })
pieUseTotalData.value = Math.trunc(
(pieUseTotalData.value || 0) / 1000
).toLocaleString()
pieDischargeTotal.value = Math.trunc(pieDischargeTotal.value).toLocaleString()
} }
onMounted(() => { onMounted(() => {
const char = charData() const char = charData()
option.value = char.option.value option.value = char.option.value
@ -130,7 +131,7 @@ const chartClick = (it:any) => {
shadowColor: 'rgba(0, 0, 0, 0.7)', shadowColor: 'rgba(0, 0, 0, 0.7)',
shadowOffsetY: 10, shadowOffsetY: 10,
shadowBlur: 20 shadowBlur: 20
}; }
getStatListlPie(it.name, it.seriesName) getStatListlPie(it.name, it.seriesName)
pieYear.value = (+it.name).toString().substring(2) pieYear.value = (+it.name).toString().substring(2)
} }
@ -188,7 +189,12 @@ const handleDateChange = (val:any) => {
</div> </div>
</div> </div>
<div class="w-full h-450px"> <div class="w-full h-450px">
<VChart @click="chartClick" ref="chartRef" :option="option" autoresize /> <VChart
@click="chartClick"
ref="chartRef"
:option="option"
autoresize
/>
</div> </div>
<!-- <div class="absolute top-91% flex items-center"> <!-- <div class="absolute top-91% flex items-center">
日期<el-config-provider :locale="locale"> 日期<el-config-provider :locale="locale">
@ -209,11 +215,19 @@ const handleDateChange = (val:any) => {
</el-config-provider> </el-config-provider>
</div> --> </div> -->
<div class="absolute top-91% flex items-center"> <div class="absolute top-91% flex items-center">
日期<n-date-picker @update:formatted-value="handleDateChange" v-model:value="yearrange" type="yearrange" format="yyyy" size="small" /> 日期<n-date-picker
@update:formatted-value="handleDateChange"
v-model:value="yearrange"
type="yearrange"
format="yyyy"
size="small"
/>
</div> </div>
</div> </div>
<div class="relative w-full bg-#fff h-38.5%"> <div class="relative w-full bg-#fff h-38.5%">
<div class="absolute top-28px left-1/2 translate-[-50%] text-center text-#142142 text-22px py20px font-extrabold"> <div
class="absolute top-28px left-1/2 translate-[-50%] text-center text-#142142 text-22px py20px font-extrabold"
>
SMM牌号低碳铝价格&价差 SMM牌号低碳铝价格&价差
</div> </div>
<div class="w-full h-340px pt-4 relative"> <div class="w-full h-340px pt-4 relative">
@ -250,27 +264,49 @@ const handleDateChange = (val:any) => {
style="align-content: space-between" style="align-content: space-between"
> >
<div class="w-full h-70% bg-#fff" style="border-radius: 25px 25px 0 0"> <div class="w-full h-70% bg-#fff" style="border-radius: 25px 25px 0 0">
<div class="text-center text-#265DD5 text-22px pt20px pb-10px font-extrabold"> <div
class="text-center text-#265DD5 text-22px pt20px pb-10px font-extrabold"
>
原材料用量及碳排放量占比图<br /> 原材料用量及碳排放量占比图<br />
<!-- <span class="text-16px mt10px"> (FY{{pieYear}}BASE基准)</span> --> <!-- <span class="text-16px mt10px"> (FY{{pieYear}}BASE基准)</span> -->
<!-- <div class="h-10px mt10px"> </div> --> <!-- <div class="h-10px mt10px"> </div> -->
</div> </div>
<div class="relative w-full h-430px"> <div class="relative w-full h-430px">
<div class="w-130px h-26px absolute left-0 top-0 bg-white z-10"></div> <div
<div class="absolute top-7 right-6 text-14px leading-20px opacity-90"> class="w-130px h-26px absolute left-0 top-0 bg-white z-10"
<p class="text-right">原材料使用量合计{{ pieUseTotalData }}千克</p> ></div>
<p class="text-right">原材料碳排放量合计{{ pieDischargeTotal }}</p> <div
class="absolute top-7 right-6 text-14px leading-20px opacity-90"
>
<p class="text-right">
原材料使用量合计{{ pieUseTotalData }}
</p>
<p class="text-right">
原材料碳排放量合计{{ pieDischargeTotal }}
</p>
</div> </div>
<VChart ref="chartRefP1" :option="optionP1" autoresize /> <VChart ref="chartRefP1" :option="optionP1" autoresize />
</div> </div>
<div class="box-border pr-20px mx-20px h-130px bg-#F5F8FF p10px"> <div class="box-border pr-20px mx-20px h-130px bg-#F5F8FF p10px">
<div class="py5px" v-for="n in numberList" :key="n"> <div class="py5px" v-for="n in numberList" :key="n">
<!-- <n-number-animation show-separator :from="0" :to="10700"/>碳排放量159,158--> <!-- <n-number-animation show-separator :from="0" :to="10700"/>碳排放量159,158-->
<span class="text-18px font-bold text-#3164BF">{{ numberObj[n] }}</span <span class="text-18px font-bold text-#3164BF">{{
> numberObj[n]
<span class="ml5px">使用量 }}</span>
<n-number-animation show-separator :from="0" :duration="300" :to="pieDecObj[`${n}1`]"/>千克碳排放量 <span class="ml5px"
<n-number-animation show-separator :from="0" :duration="300" :to="pieDecObj[`${n}2`]"/> >使用量
<n-number-animation
show-separator
:from="0"
:duration="300"
:to="pieDecObj[`${n}1`] / 1000"
/>
<n-number-animation
show-separator
:from="0"
:duration="300"
:to="pieDecObj[`${n}2`]"
/>
</span> </span>
</div> </div>
</div> </div>
@ -281,26 +317,22 @@ const handleDateChange = (val:any) => {
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px"> <div class="px20px py10px bg-#F5F8FF rd-5px">
<span class="text-#000 text-16px font-extrabold"> 现行铝</span <span class="text-#000 text-16px font-extrabold"> 现行铝</span>
>
<!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> --> ><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 低碳铝</span <span class="text-#000 text-16px font-extrabold"> 低碳铝</span>
>
<!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> --> ><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 碳价</span <span class="text-#000 text-16px font-extrabold"> 碳价</span>
>
<!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span <!-- <span class="text-22px text-#265DD5 font-extrabold">0.000</span
><span> /</span> --> ><span> /</span> -->
</div> </div>
<div class="px20px py10px bg-#F5F8FF rd-5px mt5px"> <div class="px20px py10px bg-#F5F8FF rd-5px mt5px">
<span class="text-#000 text-16px font-extrabold"> 数据来源</span <span class="text-#000 text-16px font-extrabold"> 数据来源</span>
>
<span class="text-#265DD5">行情展示 (cneeex.com)</span> <br /> <span class="text-#265DD5">行情展示 (cneeex.com)</span> <br />
<div class="ml-82px mt-6px">SMM网站</div> <div class="ml-82px mt-6px">SMM网站</div>
</div> </div>
@ -308,7 +340,10 @@ const handleDateChange = (val:any) => {
class="absolute flex flex-col w-full h-full z-200 top-0 left-0 text-center bg-red justify-center items-center" 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)" style="background-color: rgba(255, 255, 255, 0.8)"
> >
<img src="@/assets/images/chah.png" class="h-130px object-contain" /> <img
src="@/assets/images/chah.png"
class="h-130px object-contain"
/>
<br /> <br />
<div class="text-#5683DB text-36px">做成中,敬请期待</div> <div class="text-#5683DB text-36px">做成中,敬请期待</div>
</div> </div>

View File

@ -1,8 +1,8 @@
import type { EChartsOption } from 'echarts' import type { EChartsOption } from 'echarts'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import 'echarts-liquidfill'; import 'echarts-liquidfill'
import { getCSRDetail } from '@/api/daikin/base' import { getCSRDetail } from '@/api/daikin/base'
import { create } from 'naive-ui'; import { create } from 'naive-ui'
import { xAxisD, dataA, dataB } from './testData' import { xAxisD, dataA, dataB } from './testData'
export const Content2 = [ export const Content2 = [
@ -600,7 +600,7 @@ export function pieData1() {
orient: 'vertical', orient: 'vertical',
data: [ data: [
{ {
name: '原材料使用量(千克', name: '原材料使用量(',
itemStyle: { color: '#f8cbad', borderWidth: 0 } itemStyle: { color: '#f8cbad', borderWidth: 0 }
}, },
{ {
@ -619,7 +619,27 @@ export function pieData1() {
textStyle: { color: '#4075E1' } textStyle: { color: '#4075E1' }
}, },
tooltip: { tooltip: {
trigger: 'item' trigger: 'item',
// formatter: '{a} <br/>{b} : {c} ({d}%)'
formatter: function (params: any) {
const title = `<p>${params.seriesName}</p>`
const colorDot =
'<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:' +
params.color +
'"></span>'
return (
title +
colorDot +
params.name +
': ' +
(params.componentIndex === 0
? Math.trunc(params.value / 1000).toLocaleString()
: params.value.toLocaleString()) +
'' +
params.percent +
'%'
)
}
}, },
grid: { grid: {
// left: '20', // left: '20',
@ -636,7 +656,7 @@ export function pieData1() {
series: [ series: [
{ {
center: ['50%', '56%'], center: ['50%', '56%'],
name: '原材料使用量(千克', name: '原材料使用量(',
type: 'pie', type: 'pie',
selectedMode: 'single', selectedMode: 'single',
radius: [0, '50%'], radius: [0, '50%'],
@ -646,7 +666,10 @@ export function pieData1() {
label: { label: {
position: 'inner', position: 'inner',
fontSize: 16, fontSize: 16,
formatter: '{b}{c}' // formatter: '{b}{c}'
formatter: function (params: any) {
return Math.trunc(params.data.value / 1000).toLocaleString()
}
}, },
labelLine: { labelLine: {
show: false show: false
@ -693,7 +716,10 @@ export function pieData1() {
label: { label: {
position: 'inner', position: 'inner',
fontSize: 16, fontSize: 16,
formatter: '{b}{c}' // formatter: '{b}{c}'
formatter: function (params: any) {
return Math.trunc(+params.data.value).toLocaleString()
}
// backgroundColor: '#F6F8FC', // backgroundColor: '#F6F8FC',
// borderColor: '#8C8D8E', // borderColor: '#8C8D8E',
// borderWidth: 1, // borderWidth: 1,
@ -817,7 +843,8 @@ export function liQuid() {
bottom: '-5px', bottom: '-5px',
textStyle: { fontSize: '14px', fontWeight: '100' } textStyle: { fontSize: '14px', fontWeight: '100' }
}, },
series: [{ series: [
{
type: 'liquidFill', type: 'liquidFill',
silent: true, silent: true,
data: [0.76, 0.55, 0.62], data: [0.76, 0.55, 0.62],
@ -837,12 +864,11 @@ export function liQuid() {
fontSize: 19, fontSize: 19,
fontColor: '#fff', fontColor: '#fff',
formatter: function (param) { formatter: function (param) {
return '原材料' + '\n'+ '\n' return '原材料' + '\n' + '\n' + param.value * 100 + '%'
+ (param.value * 100) + '%';
},
} }
}] }
}
]
}) })
return { chartRef, option } return { chartRef, option }
} }
@ -857,7 +883,8 @@ export function liQuids() {
bottom: '-5px', bottom: '-5px',
textStyle: { fontSize: '14px', fontWeight: '100' } textStyle: { fontSize: '14px', fontWeight: '100' }
}, },
series: [{ series: [
{
type: 'liquidFill', type: 'liquidFill',
silent: true, silent: true,
data: [0.8, 0.65, 0.72], data: [0.8, 0.65, 0.72],
@ -877,12 +904,11 @@ export function liQuids() {
fontSize: 19, fontSize: 19,
fontColor: '#fff', fontColor: '#fff',
formatter: function (param) { formatter: function (param) {
return '能源消耗' + '\n'+ '\n' return '能源消耗' + '\n' + '\n' + param.value * 100 + '%'
+ (param.value * 100) + '%';
},
} }
}] }
}
]
}) })
return { chartRef, option } return { chartRef, option }
} }

View File

@ -1,15 +1,28 @@
<script setup lang="ts"> <script setup lang="ts">
import DataBaseHead from "@/views/home/components/DataBaseHead.vue"; import DataBaseHead from '@/views/home/components/DataBaseHead.vue'
import { cateAdd, cateUpdate, treeDbList, cateInfo, cateDel, cateFileUpdate, cateFileDel, cateFileList, download,fetchdbAuthGetInfo } from '@/api/daikin/base' import {
cateAdd,
cateUpdate,
treeDbList,
cateInfo,
cateDel,
cateFileUpdate,
cateFileDel,
cateFileList,
download,
fetchdbAuthGetInfo
} from '@/api/daikin/base'
import { useUserStore } from '@/stores/modules/user' import { useUserStore } from '@/stores/modules/user'
import { useMessage, NModal } from 'naive-ui' import { useMessage, NModal } from 'naive-ui'
const store = useUserStore() const store: any = useUserStore()
const message = useMessage() const message = useMessage()
const userCode = ['admin', 'database_dandang'].includes(store.user.roleCode) const userCode = ['admin', 'database_dandang'].includes(store.user.roleCode)
const isDbReview = store.user?.isDbReview === 1
const isDbUpload = store.user?.isDbUpload === 1
const user: any = store.user const user: any = store.user
const { push } = useRouter(); const { push } = useRouter()
const title = ref("大金集团经营理念") const title = ref('大金集团经营理念')
const prop = defineProps({ const prop = defineProps({
cateId: Number, cateId: Number,
@ -25,13 +38,17 @@ watchEffect(()=>{
prop.title prop.title
title.value = prop.title title.value = prop.title
getTree() getTree()
getAuth() // getAuth()
}) })
const tableData = ref() const tableData = ref()
async function getTree() { async function getTree() {
const { currentPage, pageSize } = pageInfo const { currentPage, pageSize } = pageInfo
if (!prop.cateId) return if (!prop.cateId) return
const {rows,total} = await cateFileList({cateId:prop.cateId,pageNum:currentPage,pageSize}) const { rows, total } = await cateFileList({
cateId: prop.cateId,
pageNum: currentPage,
pageSize
})
pageInfo.total = total pageInfo.total = total
tableData.value = rows tableData.value = rows
} }
@ -62,14 +79,18 @@ async function downloads(row:any) {
console.log(row, '!!!!!!!!!!xiazai') console.log(row, '!!!!!!!!!!xiazai')
const { isSelect, filePath } = row const { isSelect, filePath } = row
if (isSelect === 2) { if (isSelect === 2) {
message.info("没有访问权限") message.info('没有访问权限')
return return
} }
// try{ // try{
// downloadFile(filePath) // downloadFile(filePath)
// }catch(error){ // }catch(error){
// } // }
window.open(filePath) // window.open(
// 'https://view.officeapps.live.com/op/view.aspx?src=' +
// encodeURIComponent(filePath)
// )
filePath && window.open(filePath)
} }
const lazyState = computed(() => [pageInfo.currentPage]) const lazyState = computed(() => [pageInfo.currentPage])
watch( watch(
@ -77,7 +98,7 @@ const lazyState = computed(() => [pageInfo.currentPage])
async (v) => { async (v) => {
getTree() getTree()
}, },
{ immediate: true, deep: true }, { immediate: true, deep: true }
) )
const handleSizeChange = (e) => { const handleSizeChange = (e) => {
@ -96,34 +117,46 @@ const openUrl = async (it)=>{
console.log(it, 2222) console.log(it, 2222)
let { filePath, isSelect } = it let { filePath, isSelect } = it
if (isSelect === 2) { if (isSelect === 2) {
message.info("没有访问权限") message.info('没有访问权限')
return return
} }
if (!filePath) { if (!filePath) {
message.info("没有可预览文件!") message.info('没有可预览文件!')
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
const screenWidth = window.screen.width; const screenWidth = window.screen.width
const screenHeight = window.screen.height; const screenHeight = window.screen.height
window.open(filePath, '', 'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0) window.open(
filePath,
'',
'width=' +
screenWidth +
',height=' +
screenHeight +
',top=' +
0 +
',left=' +
0
)
} else {
message.error(
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'"
)
} }
else{
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'")
}
} }
function getLastSubstring(str: string): string { function getLastSubstring(str: string): string {
const lastIndex = str.lastIndexOf('.'); const lastIndex = str.lastIndexOf('.')
if (lastIndex !== -1) { if (lastIndex !== -1) {
return str.substring(lastIndex + 1); return str.substring(lastIndex + 1)
} else { } else {
return ''; return ''
} }
} }
function downloadFile(url: any) { function downloadFile(url: any) {
@ -143,11 +176,11 @@ function getFileName(url: string) {
return url.slice(lastSplashIndex + 1, lastDotIndex) return url.slice(lastSplashIndex + 1, lastDotIndex)
} }
function getFileNameFromUrl(url: string) { function getFileNameFromUrl(url: string) {
const lastSlashIndex = url.lastIndexOf("/"); const lastSlashIndex = url.lastIndexOf('/')
if (lastSlashIndex !== -1) { if (lastSlashIndex !== -1) {
return url.substring(lastSlashIndex + 1); return url.substring(lastSlashIndex + 1)
} else { } else {
return "Invalid URL"; return 'Invalid URL'
} }
} }
@ -193,59 +226,119 @@ 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 }}
<el-button v-if=" userCode || hasUpload || hasReview" class="float-right top-25px right-30px" type="primary" @click="push('/DataBase/Modify')"></el-button> <div class="float-right top-0 right-30px">
<el-button
class="mr-30px"
v-if="isDbReview || isDbUpload || userCode"
type="warning"
@click="push({ path: '/DataBase/review' })"
>
审批流程
</el-button>
<el-button
v-if="isDbReview || isDbUpload || userCode"
type="primary"
@click="push('/DataBase/Modify')"
>内容管理</el-button
>
</div>
</div> </div>
<div class="p30px relative h790px"> <div class="p30px relative h790px">
<!-- lujinli --> <!-- lujinli -->
<!-- <table class="history w-full text-center text-16px border-spacing-0 "> --> <!-- <table class="history w-full text-center text-16px border-spacing-0 "> -->
<table class="history w-full text-center text-18px border-spacing-0"> <table class="history w-full text-center text-18px border-spacing-0">
<thead <thead
style="background-color: #E7EDFF;color: #000;height: 50px;width: 220px; border: 1px solid #417BEF;"> style="
background-color: #e7edff;
color: #000;
height: 50px;
width: 220px;
border: 1px solid #417bef;
"
>
<tr class="text-20px leading-50px"> <tr class="text-20px leading-50px">
<th width="20%"><img src="@/assets/images/baiot@2x.png" class="w35px mt--7px mr-5px" />标题</th> <th width="20%">
<th width="20%"><img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传科室</th> <img
<th width="20%"><img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传部门</th> src="@/assets/images/baiot@2x.png"
<th width="20%"><img src="@/assets/images/riqii@2x.png" class="w35px mt--7px mr-5px" />上传日期</th> class="w35px mt--7px mr-5px"
<th width="16%">操作</th> />
</th>
<th width="20%">
<img
src="@/assets/images/scbmm@2x.png"
class="w35px mt--7px mr-5px"
/>
</th>
<th width="20%">
<img
src="@/assets/images/scbmm@2x.png"
class="w35px mt--7px mr-5px"
/>
</th>
<th width="20%">
<img
src="@/assets/images/riqii@2x.png"
class="w35px mt--7px mr-5px"
/>
</th>
<th width="20% text-center">操作</th>
</tr> </tr>
</thead> </thead>
<tbody class=" h650px overflow-auto absolute w100% "> <tbody class="h650px overflow-auto absolute w-full">
<tr class="w-full flex leading-50px" v-for="it in tableData"> <tr class="w-full flex leading-50px" v-for="it in tableData">
<td class="w20% h50px cursor-pointer overflow-hidden text-left pl25px truncate text-#000" > <td
class="w20% h50px cursor-pointer overflow-hidden text-left pl25px truncate text-#000"
>
<span :title="it.title"> {{ it.title }}</span> <span :title="it.title"> {{ it.title }}</span>
</td> </td>
<td class="w20% h50px">{{ it.deptName }}</td> <td class="w20% h50px">{{ it.deptName }}</td>
<td class="w20% h50px">{{ it.parentDeptName }}</td> <td class="w20% h50px">{{ it.parentDeptName }}</td>
<td class="w20% h50px">{{ it.createTime }}</td> <td class="w20% h50px">{{ it.createTime }}</td>
<td class="w16% h50px text-center"> <td class="w20% h50px">
<!-- <el-button style="color: #000;" @click="openUrl(it)"></el-button> --> <!-- <el-button style="color: #000;" @click="openUrl(it)"></el-button> -->
<!-- <el-button style="color: #000;" @click="downloads(it)"></el-button> --> <!-- <el-button style="color: #000;" @click="downloads(it)"></el-button> -->
<el-button style="color: #000;" @click="downloads(it)"></el-button> <el-button style="color: #000" @click="downloads(it)"
>查看</el-button
>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="float-right absolute bottom-20px right-30px"> <div class="float-right absolute bottom-20px right-30px">
<el-pagination v-model:current-page="pageInfo.currentPage" v-model:page-size="pageInfo.pageSize" <el-pagination
layout="prev, pager, next, jumper" :total="pageInfo.total" v-model:current-page="pageInfo.currentPage"
@size-change="handleSizeChange" @current-change="handleCurrentChange" /> v-model:page-size="pageInfo.pageSize"
layout="prev, pager, next, jumper"
:total="pageInfo.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</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"><Close /></el-icon> <el-icon
color="#fff"
size="26px"
@click="pdfShow = false"
class="absolute left-92% bg-#F43"
><Close
/></el-icon>
<Amtion :data="src" :datas="srcType" /> <Amtion :data="src" :datas="srcType" />
</div> </div>
</n-modal> </n-modal>
@ -257,4 +350,5 @@ async function getAuth() {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
}</style> }
</style>

View File

@ -2,10 +2,11 @@
import { RouterView } from 'vue-router' import { RouterView } from 'vue-router'
import { useUserStore } from '@/stores/modules/user' import { useUserStore } from '@/stores/modules/user'
import { treeDbList, download } from '@/api/daikin/base' import { treeDbList, download } from '@/api/daikin/base'
import {databaseld} from "@/stores/modules/database" import { databaseld } from '@/stores/modules/database'
import { NPopover } from 'naive-ui' import { NPopover } from 'naive-ui'
const { push } = useRouter() const { push } = useRouter()
const route = useRoute()
const store = useUserStore() const store = useUserStore()
const database = databaseld() const database = databaseld()
const { toggle } = inject<any>('fullscreen') const { toggle } = inject<any>('fullscreen')
@ -17,17 +18,23 @@ function menuHandler(menu: any, index: number) {
console.log(menu, index) console.log(menu, index)
activeMenuKey.value = menu.id activeMenuKey.value = menu.id
titles.value = menu.name titles.value = menu.name
idx.value = index; idx.value = index
activeItem.value = menu.id activeItem.value = menu.id
if (menu.childList && menu.childList.length > 0) { if (menu.childList && menu.childList.length > 0) {
activeItem.value = menu.childList[0].id activeItem.value = menu.childList[0].id
} }
database.database.id = activeItem.value database.database.id = activeItem.value
goListPage()
} }
function goChild(menu: any) { function goChild(menu: any) {
activeItem.value = menu.id activeItem.value = menu.id
console.log(menu.id) console.log(menu.id)
database.database.id = menu.id database.database.id = menu.id
goListPage()
}
function goListPage() {
const { path } = route
if (path === '/DataBase/review') push('/DataBase')
} }
var activeItem = ref<any>() var activeItem = ref<any>()
const tableData = ref() const tableData = ref()
@ -56,25 +63,30 @@ async function getTree() {
}) })
} }
} }
} }
getTree() getTree()
function findItemById(
items: any,
function findItemById(items:any, targetId:any, topLevelItem:any = null):any { targetId: any,
topLevelItem: any = null
): any {
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
const item = items[i]; const item = items[i]
if (item.id === targetId) { if (item.id === targetId) {
return { topLevelItem: topLevelItem || item, targetItem: item }; return { topLevelItem: topLevelItem || item, targetItem: item }
} else if (item.childList?.length > 0) { } else if (item.childList?.length > 0) {
const result = findItemById(item.childList, targetId, topLevelItem || item); const result = findItemById(
item.childList,
targetId,
topLevelItem || item
)
if (result) { if (result) {
return result; return result
} }
} }
} }
return {topLevelItem: null, targetItem: null}; return { topLevelItem: null, targetItem: null }
} }
</script> </script>
@ -86,33 +98,58 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
<img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" /> <img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" />
</div> </div>
<div class="pt30px pb24px flex-1 pl20px bg-#fff"> <div class="pt30px pb24px flex-1 pl20px bg-#fff">
<div
<div class="nav px36px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer" class="nav px36px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer"
v-for="(m, index) in tableData" :key="m.id" :class="activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''" v-for="(m, index) in tableData"
@click="() => menuHandler(m, index)"> :key="m.id"
<div :class="activeMenuKey === m.id && 'onActive'" class="flex" @click="onClic=!onClic"> :class="
activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''
"
@click="() => menuHandler(m, index)"
>
<div
:class="activeMenuKey === m.id && 'onActive'"
class="flex"
@click="onClic = !onClic"
>
<!-- <img v-if="activeMenuKey === m.id" :src="m.icon1" class="w22px h22px mr16px mt--5px" /> <!-- <img v-if="activeMenuKey === m.id" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> --> <img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> -->
<!-- lujinli --> <!-- lujinli -->
<!-- <span class="text-17px font-900 relative min-w195px block"> --> <!-- <span class="text-17px font-900 relative min-w195px block"> -->
<span class="text-18px font-900 relative min-w195px block"> <span class="text-18px font-900 relative min-w195px block">
<span class="truncate"> {{ m.name }} </span> <span class="truncate"> {{ m.name }} </span>
<span class="text-#000000 absolute right--30px top--5px"><el-icon size="26"> <span class="text-#000000 absolute right--30px top--5px"
<CaretTop v-if="activeMenuKey === m.id&&onClic" class="text-#4977FC" /> ><el-icon size="26">
<CaretBottom v-else /> <CaretTop
</el-icon></span> v-if="activeMenuKey === m.id && onClic"
class="text-#4977FC"
/>
<CaretBottom v-else /> </el-icon
></span>
</span> </span>
</div> </div>
<div v-if="m.childList && idx == index" class="pl40px" v-show="idx === index&&onClic?true:false"> <div
<div class="my30px pl10px text-#000 activeChildren" v-for="(item, ind) in m.childList" :key="item.id" v-if="m.childList && idx == index"
@click.stop="goChild(item)" @click="activeItem = item.id" > class="pl40px"
v-show="idx === index && onClic ? true : false"
>
<div
class="my30px pl10px text-#000 activeChildren"
v-for="(item, ind) in m.childList"
:key="item.id"
@click.stop="goChild(item)"
@click="activeItem = item.id"
>
<!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> --> <!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> -->
<n-popover trigger="hover" placement="top-start"> <n-popover trigger="hover" placement="top-start">
<template #trigger> <template #trigger>
<span class="text-18px flex child font-900 truncate" :class="activeItem === item.id ? 'text-#002fa7' : ''">{{ item.name }}</span> <span
class="text-18px flex child font-900 truncate"
:class="activeItem === item.id ? 'text-#002fa7' : ''"
>{{ item.name }}</span
>
</template> </template>
<div class="text-18px leading-40px"> <div class="text-18px leading-40px">
{{ item.name }} {{ item.name }}
@ -120,13 +157,21 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
</n-popover> </n-popover>
<!-- </el-tooltip> --> <!-- </el-tooltip> -->
<div v-if="item.childList && idx == index" class="pl10px"> <div v-if="item.childList && idx == index" class="pl10px">
<div class="my30px pl10px text-#000 " v-for="(ite, ind) in item.childList" :key="item.id" <div
@click.stop="goChild(ite)" @click="activeItem = ite.id"> class="my30px pl10px text-#000"
v-for="(ite, ind) in item.childList"
:key="item.id"
@click.stop="goChild(ite)"
@click="activeItem = ite.id"
>
<n-popover trigger="hover" placement="top-start"> <n-popover trigger="hover" placement="top-start">
<template #trigger> <template #trigger>
<span class="text-18px flex childs font-900 truncate" :class="activeItem === ite.id ? 'text-#002fa7' : ''">{{ ite.name }}</span> <span
class="text-18px flex childs font-900 truncate"
:class="activeItem === ite.id ? 'text-#002fa7' : ''"
>{{ ite.name }}</span
>
</template> </template>
<div class="text-18px leading-40px"> <div class="text-18px leading-40px">
{{ ite.name }} {{ ite.name }}
@ -134,11 +179,20 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
</n-popover> </n-popover>
<div v-if="ite.childList && idx == index" class="pl10px"> <div v-if="ite.childList && idx == index" class="pl10px">
<div class="my30px pl10px text-#000 " v-for="(it, ind) in ite.childList" :key="item.id" <div
@click.stop="goChild(it)" @click="activeItem = it.id"> class="my30px pl10px text-#000"
v-for="(it, ind) in ite.childList"
:key="item.id"
@click.stop="goChild(it)"
@click="activeItem = it.id"
>
<n-popover trigger="hover" placement="top-start"> <n-popover trigger="hover" placement="top-start">
<template #trigger> <template #trigger>
<span class="text-18px flex childs font-900 truncate" :class="activeItem === it.id ? 'text-#002fa7' : ''">{{ it.name }}</span> <span
class="text-18px flex childs font-900 truncate"
:class="activeItem === it.id ? 'text-#002fa7' : ''"
>{{ it.name }}</span
>
</template> </template>
<div class="text-18px leading-40px"> <div class="text-18px leading-40px">
{{ it.name }} {{ it.name }}
@ -151,9 +205,6 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -187,8 +238,6 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
} }
.nav { .nav {
&::before { &::before {
top: -48px; top: -48px;
} }
@ -206,7 +255,7 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
&.active { &.active {
color: #002fa7; color: #002fa7;
background-color: #E6ECFF; background-color: #e6ecff;
a { a {
color: #002fa7; color: #002fa7;
@ -220,8 +269,8 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
&.actives { &.actives {
padding: 0px !important; padding: 0px !important;
color: #4977FC; color: #4977fc;
background-color: #F5F8FF; background-color: #f5f8ff;
a { a {
color: #002fa7; color: #002fa7;
@ -233,7 +282,7 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
} }
.onActive { .onActive {
background-color: #E6ECFF; background-color: #e6ecff;
border-radius: 32px 0 0 32px; border-radius: 32px 0 0 32px;
padding: 24px 36px 24px 36px; padding: 24px 36px 24px 36px;
@ -242,14 +291,14 @@ function findItemById(items:any, targetId:any, topLevelItem:any = null):any {
} }
.main { .main {
width: 100%; width: 100%;
height: 95%; height: 95%;
background-color: #4877FB; background-color: #4877fb;
margin-left: 30px; margin-left: 30px;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
scrollbar-width: none scrollbar-width: none;
}</style> }
</style>

View File

@ -6,7 +6,7 @@
<el-tabs v-model="activeName" class="demo-tabs"> <el-tabs v-model="activeName" class="demo-tabs">
<div class="absolute z-200 right-0 flex items-center"> <div class="absolute z-200 right-0 flex items-center">
<el-button <el-button
v-if="hasReview || hasUpload" v-if="isDbUpload || isDbReview"
type="warning" type="warning"
@click="handleClick" @click="handleClick"
> >
@ -21,7 +21,12 @@
</div> </div>
<el-tab-pane label="分类管理" name="first"> <el-tab-pane 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>
@ -89,7 +94,7 @@
<el-tab-pane label="内容管理" name="second"> <el-tab-pane label="内容管理" name="second">
<div class="h-52px"> <div class="h-52px">
<el-button <el-button
v-if="hasUpload" v-if="isDbReview || isDbUpload"
type="primary" type="primary"
@click="editClickB('add')" @click="editClickB('add')"
class="mb-20px" class="mb-20px"
@ -166,20 +171,27 @@
show-overflow-tooltip show-overflow-tooltip
/> />
<!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> --> <!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> -->
<el-table-column <el-table-column label="查看范围" prop="userIdList">
label="查看范围"
prop="userIdList"
>
<template #default="scope"> <template #default="scope">
<!-- <el-button type="primary" class="button" @click="getUser(scope.row)"></el-button> --> <!-- <el-button type="primary" class="button" @click="getUser(scope.row)"></el-button> -->
<!-- <span class="descStyle" v-if="scope.row.userList" v-for="it in scope.row.userList"> &nbsp;&nbsp; {{it.nickName}}</span> --> <!-- <span class="descStyle" v-if="scope.row.userList" v-for="it in scope.row.userList"> &nbsp;&nbsp; {{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 v-for="(it, e) in scope.row.userList" :class="scope.row.userList.length < 2 ? '!leading-46px' : 'xx'"> <p
v-for="(it, e) in scope.row.userList"
: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"
>...{{ scope.row.userList.length }}</span >...{{ scope.row.userList.length }}</span
@ -198,7 +210,7 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template #default="scope"> <template #default="scope">
<div> <div v-if="userCode || hasUpload || hasReview">
<el-button <el-button
type="primary" type="primary"
@click="editClickB('edit', scope.row)" @click="editClickB('edit', scope.row)"
@ -207,7 +219,6 @@
编辑</el-button 编辑</el-button
> >
<el-button <el-button
v-if="userCode || hasUpload"
type="danger" type="danger"
@click="deleteClickB(scope.row)" @click="deleteClickB(scope.row)"
class="mb-20px w45px" class="mb-20px w45px"
@ -286,15 +297,15 @@
<el-input v-model="editB.sort" type="number" /> <el-input v-model="editB.sort" type="number" />
</el-form-item> </el-form-item>
<br /> <br />
<!-- <el-form-item label="所属类别"> <el-form-item label="所属类别">
<el-cascader <el-cascader
v-model="editB.cateId" :modelValue="editB.cateIds"
:options="tableData" :options="tableDataAuth"
@change="handleChange" @change="handleChange"
:props="{ children: 'childList', label: 'name', value: 'id' }" :props="{ children: 'childList', label: 'name', value: 'id' }"
/> />
</el-form-item> </el-form-item>
<br /> --> <br />
<el-form-item label="查看范围"> <el-form-item label="查看范围">
<el-button <el-button
class="button" class="button"
@ -352,21 +363,23 @@ import {
download, download,
dragFile, dragFile,
fetchdbAuthAdd, fetchdbAuthAdd,
fetchdbAuthGetInfo fetchdbAuthGetInfo,
fetchReviewAuthCateList
} 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 { databaseld } from '@/stores/modules/database' import { databaseld } from '@/stores/modules/database'
const { push } = useRouter(); const { push } = useRouter()
const database = databaseld() const database = databaseld()
const store = useUserStore() const store: any = useUserStore()
const message = useMessage() const message = useMessage()
const userCode = ['admin', 'database_dandang'].includes( const userCode = ['admin', 'database_dandang'].includes(store.user.roleCode)
store.user.roleCode const isDbReview = store.user?.isDbReview === 1
) const isDbUpload = store.user?.isDbUpload === 1
const tableData = ref() const tableData = ref([])
const tableDataAuth = ref([])
const infoData = ref() const infoData = ref()
const shomkA = ref(false) const shomkA = ref(false)
@ -382,6 +395,9 @@ const pageInfo = reactive({
async function getTree() { async function getTree() {
const { data } = await treeDbList({}) const { data } = await treeDbList({})
tableData.value = data tableData.value = data
console.log('🚀 ~ file: modify.vue:399 ~ data:', data)
const { data: auth = [] } = await fetchReviewAuthCateList()
tableDataAuth.value = auth
} }
let cateIds = ref() let cateIds = ref()
watchEffect(() => { watchEffect(() => {
@ -462,7 +478,7 @@ async function addClickA(row: any) {
shomkA.value = false shomkA.value = false
getTree() getTree()
} }
const editClickB = (edit: any, obj: any) => { const editClickB = (edit: any, obj: any = {}) => {
console.log(obj) console.log(obj)
if (edit === 'add' && obj && obj.id) { if (edit === 'add' && obj && obj.id) {
editB.value = { editB.value = {
@ -515,6 +531,14 @@ const editClickB = (edit: any, obj: any) => {
editB.value.cateId = database.database.id editB.value.cateId = database.database.id
userData.value = false userData.value = false
console.log(editB.value) console.log(editB.value)
editB.cateIds = []
let ids: any[] = getParentIds(obj.cateId)
if (ids?.length > 0) {
ids = ids.reverse()
// ids.push(obj.cateId)
editB.value.cateIds = ids
console.log('🚀 ~ file: Process.vue:248 ~ ids:', ids)
}
shomkB.value = true shomkB.value = true
} }
const deleteClickB = async (row: any) => { const deleteClickB = async (row: any) => {
@ -726,13 +750,15 @@ async function getAuth() {
type: 1 type: 1
}) })
setUpload.value = uploadUser.length > 0 setUpload.value = uploadUser.length > 0
hasUpload.value = uploadUser.findIndex((x:any) => x.userId === store.user?.id) > -1 hasUpload.value =
uploadUser.findIndex((x: any) => x.userId === store.user?.id) > -1
const { data: reviewUser = [] } = await fetchdbAuthGetInfo({ const { data: reviewUser = [] } = await fetchdbAuthGetInfo({
cateId: cateIds.value, cateId: cateIds.value,
type: 2 type: 2
}) })
setReview.value = reviewUser.length > 0 setReview.value = reviewUser.length > 0
hasReview.value = reviewUser.findIndex((x:any) => x.userId === store.user?.id) > -1 hasReview.value =
reviewUser.findIndex((x: any) => x.userId === store.user?.id) > -1
} }
const handleClick = () => { const handleClick = () => {
@ -742,6 +768,17 @@ const handleClick = () => {
const handTooltip = (data: any[] = []) => { const handTooltip = (data: any[] = []) => {
return data.map((item: any) => item.nickName)?.join(', ') || undefined return data.map((item: any) => item.nickName)?.join(', ') || undefined
} }
// ID ID
function getParentIds(id: number, list: any[] = tableData.value): any {
if (!id) return
for (let i in list) {
if (list[i].id == id) return [list[i].id]
if (list[i].childList) {
let node = getParentIds(id, list[i].childList)
if (node !== undefined) return node.concat(list[i].id)
}
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
::-webkit-scrollbar { ::-webkit-scrollbar {

View File

@ -1,6 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
import { timeStat,externalTimeStat } from '@/api/daikin/base' import {
timeStat,
externalTimeStat,
fetchmoduleStatExternalPage
} from '@/api/daikin/base'
import { formatDate } from '@/utils/format' import { formatDate } from '@/utils/format'
import { Chart1 } from './indexData' import { Chart1 } from './indexData'
import zhCn from 'element-plus/lib/locale/lang/zh-cn' import zhCn from 'element-plus/lib/locale/lang/zh-cn'
@ -13,18 +17,51 @@ const value1 = ref<[Date, Date]>([
]) ])
const states = reactive<any>({ const states = reactive<any>({
startTime: formatDate(value1.value[0]).substring(0, 10), startTime: formatDate(value1.value[0]).substring(0, 10),
endTime: formatDate(value1.value[1]).substring(0,10), endTime: formatDate(value1.value[1]).substring(0, 10)
// timeType:2, // timeType:2,
}) })
const chartRef1 = ref() const chartRef1 = ref()
const chartRef2 = ref() const chartRef2 = ref()
const chartOption1 = ref({}); const chartOption1 = ref({})
const chartOption2 = ref({}); const chartOption2 = ref({})
const primary = ref(1) const primary = ref(1)
const primarys = ref(2) const primarys = ref(2)
const activeName = ref('inside') const activeName = ref('inside')
const pageInfo = reactive({
currentPage: 1,
pageSize: 10,
total: 10
})
const moduleCode = ref()
const visitDay = ref()
const waibuKd = ref()
const inseideDetail = ref([])
const outDetail = ref([])
const getInsideListPage = async () => {
const res: any = await fetchmoduleStatExternalPage({
waibuKd: waibuKd.value,
visitDay: visitDay.value,
moduleCode: moduleCode.value,
pageNum: pageInfo.currentPage,
pageSize: pageInfo.pageSize
})
inseideDetail.value = res?.rows || []
pageInfo.total = res?.total || 0
}
const getListPage = async () => {
const res: any = await fetchmoduleStatExternalPage({
waibuKd: waibuKd.value,
visitDay: visitDay.value,
moduleCode: moduleCode.value,
pageNum: pageInfo.currentPage,
pageSize: pageInfo.pageSize
})
outDetail.value = res?.rows || []
pageInfo.total = res?.total || 0
}
getListPage()
// getInsideListPage()
const clickButton = (id) => { const clickButton = (id) => {
primary.value = id primary.value = id
@ -56,7 +93,7 @@ const getDat = async () => {
dataList.value = data dataList.value = data
let xAxisData: any[] = [] let xAxisData: any[] = []
let siomesData: any[] = [] let siomesData: any[] = []
data.forEach((item: { moduleName: any; visitCount: any; })=>{ data.forEach((item: { moduleName: any; visitCount: any }) => {
xAxisData.push(item.moduleName) xAxisData.push(item.moduleName)
siomesData.push(item.visitCount) siomesData.push(item.visitCount)
}) })
@ -64,15 +101,19 @@ const getDat = async () => {
} }
const externalList = ref<any>([]) const externalList = ref<any>([])
const externalObj = ref<any>({})
const getExternalTimeStat = async () => { const getExternalTimeStat = async () => {
const { data } = await externalTimeStat(state) const { data } = await externalTimeStat(state)
externalList.value = data externalList.value = data
let xAxisData: any[] = [] let xAxisData: any[] = []
let siomesData: any[] = [] let siomesData: any[] = []
data.forEach((item: { moduleName: any; visitCount: any; })=>{ data.forEach(
(item: { moduleName: any; visitCount: any; moduleCode: any }) => {
externalObj.value[item.moduleCode] = item.moduleName
xAxisData.push(item.moduleName) xAxisData.push(item.moduleName)
siomesData.push(item.visitCount) siomesData.push(item.visitCount)
}) }
)
chartOption2.value = Chart1(xAxisData, siomesData) chartOption2.value = Chart1(xAxisData, siomesData)
// chartOption2.value.height=3000 // chartOption2.value.height=3000
// chartOption2.value.width=1000 // chartOption2.value.width=1000
@ -91,7 +132,6 @@ watch(
onMounted(() => { onMounted(() => {
// getDat() // getDat()
// console.log(formatDate(value1.value[0]).substring(0, 10)) // console.log(formatDate(value1.value[0]).substring(0, 10))
}) })
const shortcuts = [ const shortcuts = [
{ {
@ -167,8 +207,13 @@ const shortcuts = [
] ]
const handleClick = ({ paneName }: any) => { const handleClick = ({ paneName }: any) => {
pageInfo.currentPage = 1
pageInfo.pageSize = 10
pageInfo.total = 0
paneName === 'out' && getExternalTimeStat() paneName === 'out' && getExternalTimeStat()
paneName === 'inside' && getDat() paneName === 'inside' && getDat()
paneName === 'out-detail' && getListPage()
paneName === 'inside-detail' && getInsideListPage()
} }
const selValue = ref('') const selValue = ref('')
@ -176,30 +221,65 @@ const selValue =ref('')
<template> <template>
<HomeHead class="top"></HomeHead> <HomeHead class="top"></HomeHead>
<div class="w-full h-834px mt30px rd-20px bg-#fff p30px overflow-hidden"> <div class="w-full h-850px mt30px rd-20px bg-#fff p30px overflow-hidden">
<div class="min-h-30px "> <div class="min-h-30px flex items-center">
<span class="text-#000">日期: </span> <span class="text-#000 mr-10px">日期: </span>
<el-config-provider :locale="zhCn"> <div class="max-w-350px flex items-center">
<el-date-picker <el-date-picker
v-if="['inside', 'out'].includes(activeName)"
v-model="value1" v-model="value1"
type="daterange" type="daterange"
range-separator="到" range-separator="到"
start-placeholder="开始时间" start-placeholder="开始时间"
end-placeholder="结束时间" end-placeholder="结束时间"
size="small"
@change="timenFirst" @change="timenFirst"
:shortcuts="shortcuts" :shortcuts="shortcuts"
/> />
</el-config-provider> <el-date-picker
v-else
v-model="visitDay"
type="date"
value-format="YYYY-MM-DD"
placeholder="选择日期"
/>
</div>
<div class="mx-4 flex items-center">
<span class="text-#000 mr-10px">模块: </span>
<el-select
v-if="'out-detail' === activeName"
v-model="moduleCode"
placeholder="选择模块"
>
<el-option
v-for="item in externalList"
:key="item.id"
:label="item.moduleName"
:value="item.moduleCode"
/>
</el-select>
</div>
<div class="flex items-center">
<span class="text-#000 mr-10px w-50px">供方: </span>
<el-input
v-model="waibuKd"
placeholder="请输入供方昵称或代码"
></el-input>
</div>
<el-button <el-button
type="primary" type="primary"
:icon="Search" :icon="Search"
size="small" size="small"
class="ml20px mt--5px" class="ml20px mt--5px"
>搜素</el-button @click="handleClick({ paneName: activeName })"
>搜索</el-button
> >
<template v-if="activeName !== 'inside' && false"> <template v-if="activeName !== 'inside' && false">
<el-select v-model="selValue" class="ml-20px mt-[-4px]" placeholder="Select" size="small"> <el-select
v-model="selValue"
class="ml-20px mt-[-4px]"
placeholder="Select"
size="small"
>
<el-option <el-option
v-for="item in externalList" v-for="item in externalList"
:key="item.moduleCode" :key="item.moduleCode"
@ -248,14 +328,133 @@ const selValue =ref('')
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="外部足迹" name="out"> <el-tab-pane v-if="false" label="本部足迹-明细" name="inside-detail">
<div v-if="activeName === 'inside-detail'" class="h-720px">
<div class="w100% h-full overflow-auto">
<el-table
:data="inseideDetail"
style="width: 100%; margin-bottom: 20px"
row-key="id"
border
default-expand-all
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
lineHeight: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
>
<el-table-column prop="deptName" label="排序" />
<el-table-column
prop="cateName"
label="所属分类"
show-overflow-tooltip
>
<template #default="scope">
<span v-if="scope"></span>
</template>
</el-table-column>
<el-table-column
prop="title"
label="标题名称"
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="userIdList">
<template #default="scope">
<el-button type="primary" class="button" @click=""
>查看范围</el-button
>
</template>
</el-table-column>
</el-table>
</div>
<div class="absolute bottom-2px right-30px z-20 bg-#fff">
<el-pagination
v-model:current-page="pageInfo.currentPage"
v-model:page-size="pageInfo.pageSize"
layout="prev, pager, next, jumper"
:total="pageInfo.total"
@size-change="getInsideListPage"
@current-change="getInsideListPage"
/>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="外部足迹" name="out"> </el-tab-pane>
<el-tab-pane label="外部足迹-明细" name="out-detail">
<div class="h-720px">
<div class="w100% h-full overflow-auto">
<el-table
:data="outDetail"
style="width: 100%; margin-bottom: 20px"
row-key="id"
border
default-expand-all
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
lineHeight: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
>
<el-table-column prop="userId" label="供方ID" />
<el-table-column
prop="nickName"
label="供方昵称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="title"
label="访问模块"
show-overflow-tooltip
>
<template #default="{ row }">
<span>{{ externalObj[row.moduleCode] || '' }}</span>
</template>
</el-table-column>
<el-table-column
label="访问计数"
prop="visitCount"
show-overflow-tooltip
/>
<el-table-column
label="访问时间"
prop="visitDay"
show-overflow-tooltip
/>
</el-table>
</div>
<div class="absolute bottom-2px right-30px z-20 bg-#fff">
<el-pagination
v-model:current-page="pageInfo.currentPage"
v-model:page-size="pageInfo.pageSize"
layout="prev, pager, next, jumper"
:total="pageInfo.total"
@size-change="getListPage"
@current-change="getListPage"
/>
</div>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div> <div>
<div class="mt20px w-full"> <div class="mt20px w-full">
<span <span
class="cardfoot text-#000 p30px mx10px my10px text-center text-18px font-bold" class="cardfoot text-#000 p30px mx10px my10px text-center text-18px font-bold"
v-if="dataList" v-if="externalList"
v-for="i in externalList" v-for="i in externalList"
> >
<span>{{ i.moduleName }}</span <span>{{ i.moduleName }}</span
@ -266,18 +465,6 @@ const selValue =ref('')
</div> </div>
<div class="mt10px w-full"> <div class="mt10px w-full">
<!-- <div class="relative w-full h-50px flex">
<el-button :type="primarys == 2 ? 'primary' : ''" :icon="Search" class="!ml30px mt--5px"
@click="clickButtons(2)">本周</el-button>
<el-button :type="primarys == 3 ? 'primary' : ''" :icon="Search" class="!ml30px mt--5px"
@click="clickButtons(3)">本月</el-button>
<div class="absolute right-60px w300px ">
<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> -->
<div class="w-full h-400px"> <div class="w-full h-400px">
<VChart key="xxxx" ref="chartRef2" :option="chartOption2" /> <VChart key="xxxx" ref="chartRef2" :option="chartOption2" />
</div> </div>

View File

@ -1,6 +1,6 @@
<!-- 外部情报 --> <!-- 外部情报 -->
<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 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";
@ -15,7 +15,7 @@ import {
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";
@ -28,7 +28,7 @@ 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<FormInst | null>(null); const formRef = ref<any | null>(null);
const message = useMessage(); const message = useMessage();
const formValue: any = ref({ const formValue: any = ref({

View File

@ -1,6 +1,6 @@
<!-- 市况 --> <!-- 市况 -->
<script setup lang="ts"> <script setup lang="ts">
import { Chart1, Chart2, Chart3, Chart4, Chart5, Chart6 } from './MarketData' import { Chart1, Chart3, Chart4, Chart5, Chart6 } from './MarketData'
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
import AppBlock from '@/components/AppBlock.vue' import AppBlock from '@/components/AppBlock.vue'
import AppNewsBox from '@/components/AppNewsBox.vue' import AppNewsBox from '@/components/AppNewsBox.vue'

View File

@ -1,62 +1,71 @@
import { fileURLToPath, URL } from "node:url"; import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from "vite"; import { defineConfig } from 'vite'
import vue from "@vitejs/plugin-vue"; import vue from '@vitejs/plugin-vue'
import vueJsx from "@vitejs/plugin-vue-jsx"; import vueJsx from '@vitejs/plugin-vue-jsx'
import Unocss from "unocss/vite"; import Unocss from 'unocss/vite'
import { presetUno } from "unocss"; import { presetUno } from 'unocss'
import AutoImport from "unplugin-auto-import/vite"; import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'; import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'; import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import ViteCompression from 'vite-plugin-compression'; import ViteCompression from 'vite-plugin-compression'
import PurgeIcons from 'vite-plugin-purge-icons'; import PurgeIcons from 'vite-plugin-purge-icons'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/test-api': '/test-api': {
{ target: 'http://admin.echo.mteam01.com/openApi/',
target:"http://admin.echo.mteam01.com/openApi/",
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径 rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径
},} }
}
}, },
resolve: { resolve: {
alias: { alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)), '@': fileURLToPath(new URL('./src', import.meta.url))
}, }
}, },
plugins: [ plugins: [
vue(), vue(),
vueJsx(), vueJsx(),
Unocss({ Unocss({
presets: [presetUno()], presets: [presetUno()]
}), }),
AutoImport({ AutoImport({
imports: ["vue", "vue-router", "@vueuse/core"], // 自动导入vue和vue-router相关函数 imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数
dts: "src/types/auto-import.d.ts", dts: 'src/types/auto-import.d.ts',
// eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912 // eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912
eslintrc: { eslintrc: {
enabled: false, // Default `false` enabled: false, // Default `false`
filepath: "./.eslintrc-auto-import.json", // Default `./.eslintrc-auto-import.json` filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
globalsPropValue: true, // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
}, },
resolvers: [ resolvers: [ElementPlusResolver()]
ElementPlusResolver(),
],
}), }),
Components({ Components({
resolvers: [ ElementPlusResolver(), resolvers: [ElementPlusResolver()]
],
}), }),
PurgeIcons(), PurgeIcons(),
ViteCompression({ ViteCompression({
algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli' algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli'
ext: '.gz', // 压缩后文件的扩展名 ext: '.gz', // 压缩后文件的扩展名
}), verbose: false
})
], ],
build: {
}); chunkSizeWarningLimit: 4000,
sourcemap: false, // Builds sourcemaps for better debugging but could be disabled for performance
minify: 'esbuild', // Use 'terser' for minimizing your codes, it could be 'esbuild' but 'terser' is more accurate
rollupOptions: {
treeshake: true // Enable tree-shaking
},
terserOptions: {
compress: {
// pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build
}
}
}
})