main
王文龙 2023-12-07 11:39:38 +08:00
parent 9a040f9627
commit fa7ed63104
7 changed files with 774 additions and 469 deletions

View File

@ -1315,15 +1315,46 @@ export async function fetchMaterialAddInfo(data?: any){
/**
* https://console-docs.apipost.cn/preview/d9d2c859db1009cd/18265d950ad924e4?target_id=4c25a720-44f2-472e-be82-c2eaf41d9a43
*/
*/
export async function fetchGetViewScope(params?: any){
return http.get(`/common/getViewScope`,{params})
}
/**
* DB/ https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchdbAuthAdd(data?: any){
return http.post(`/dbAuth/add`,data)
}
/**
* DB/ https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchdbAuthGetInfo(params?: any){
return http.get(`/dbAuth/getInfo`,{params})
}
/**
* DB https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchdbWithdraw(params?: any){
return http.get(`/db/withdraw`,{params})
}
/**
* DB https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchdbReview(params?: any){
return http.get(`/db/review`,{params})
}
/**
* DB https://console-docs.apipost.cn/preview/9ac14c51f96ce4d8/75274687248efb1c?target_id=a11153dc-ab84-41ca-aa1c-45fda68c4156
*/
export async function fetchdbReviewFileList(params?: any){
return http.get(`/dbAuth/reviewFileList`,{params})
}

View File

@ -83,6 +83,9 @@ const goModeuls = (obj) => {
case 7:
push({ name: "Diffspace" });
break;
case 9:
push({ name: "DataBaseReview" });
break;
default:
push("/Home/intelligence");
break;

View File

@ -507,6 +507,11 @@ const router = createRouter({
name: 'DataBase',
component: () => import('@/views/home/database/guize/index.vue')
},
{
path: '/DataBase/review',
name: 'DataBaseReview',
component: () => import('@/views/home/database/Process.vue')
},
{
path: '/DataBase/Modify',
name: 'DataBaseModify',

View File

@ -31,6 +31,7 @@ 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;
@ -48,6 +49,7 @@ 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"}) //
@ -72,10 +74,12 @@ onMounted(async () => {
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)
@ -85,7 +89,6 @@ onMounted(async () => {
addDIS1.value -= _disList[0].budget
addDIS1.value >0? addDIS1.value = addDIS1.value.toFixed(2):0
}
console.log("🚀 ~ file: Home.vue:86 ~ addDIS1:", addDIS1)
addDSZ1.value = _dszList.reduce((previousValue: any, currentValue: { budget: any }) => {
const sum = parseFloat(currentValue.budget) +parseFloat(previousValue)
return sum>0 ? sum.toFixed(2):0
@ -160,6 +163,9 @@ onMounted(async () => {
push({ name: 'modifys' })
})
}
}catch (error) {
}
})
const { push } = useRouter()
const route = useRoute()
@ -363,7 +369,7 @@ function formatNumber(num = 0) {
<td>年初予算</td>
<!-- <td>{{month_2}}</td> -->
<td>改订</td>
<td>{{month_1}}</td>
<td>{{+month_1}}</td>
</tr>
<tr>
<th colspan="2">合计</th>
@ -418,7 +424,7 @@ function formatNumber(num = 0) {
<td>年初予算</td>
<!-- <td>{{month_2}}</td> -->
<td>改订</td>
<td>{{month_1}}</td>
<td>{{+month_2}}</td>
</tr>
<tr>
<th colspan="2">合计</th>
@ -473,7 +479,7 @@ function formatNumber(num = 0) {
<td>年初予算</td>
<!-- <td>{{month_2}}</td> -->
<td>改订</td>
<td>{{month_1}}</td>
<td>{{+month_3}}</td>
</tr>
<tr>
<th colspan="2">合计</th>

View File

@ -5,13 +5,13 @@ import { useUserStore } from '@/stores/modules/user'
import { useMessage,NModal } from 'naive-ui'
const store = useUserStore()
const message = useMessage()
const userCode = ['admin','database_dandang','tech_service'].includes(store.user.roleCode)
const userCode = ['admin','database_dandang','tech_service'].includes(store.user.roleCode) || !!store.user?.isDbUpload || !!store.user?.isDbReview
const { push } = useRouter();
const title = ref("大金集团经营理念")
const prop = defineProps({
cateId:String,
cateId: Number,
title:String
})
const pageInfo = reactive({
@ -56,15 +56,18 @@ async function getTree() {
// // message.error('', error);
// }
// }
async function downloads(row) {
console.log(row)
async function downloads(row:any) {
console.log(row,'!!!!!!!!!!xiazai')
const {isSelect,filePath} = row
if(isSelect === 2) {
message.info("没有访问权限")
return
}
window.open(filePath)
try{
downloadFile(filePath)
}catch(error){
window.open(filePath)
}
}
const lazyState = computed(() => [pageInfo.currentPage])
watch(
@ -121,7 +124,22 @@ function getLastSubstring(str: string): string {
return '';
}
}
function downloadFile(url: any) {
fetch(url)
.then((response) => response.blob())
.then((blob) => {
const downloadUrl = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = downloadUrl
link.download = getFileName(url)
link.click()
})
}
function getFileName(url: string) {
let lastSplashIndex = url.lastIndexOf('/')
let lastDotIndex = url.lastIndexOf('.')
return url.slice(lastSplashIndex + 1, lastDotIndex)
}
</script>
<template>

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,7 @@ import { saveArticle } from '@/api/daikin/base'
import { useUserStore } from '@/stores/modules/user'
const store =useUserStore()
console.log("🚀 ~ file: Layout.vue:15 ~ store:", store.user)
const { day, week } = useDate()
const { push } = useRouter()
@ -29,10 +30,10 @@ const { push } = useRouter()
<div class="text-36px">外部情报</div>
<div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px flex-1">{{ week }}</div>
<div style="margin-right: 8px" v-if="store.user.isPublish === 1">
<div style="margin-right: 8px" v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'">
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
</div>
<div style="margin-right: 8px" v-if="store.user.isPublish ===1">
<div style="margin-right: 8px" v-if="store.user.isPublish ===1 || store.user.roleCode === 'zhuxi'">
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})"></div>
</div>
<div v-if="store.user.isPublish ===1">