main
wwl 2024-05-05 21:57:08 +08:00
parent 3734a770dd
commit 21a629b4fb
7 changed files with 2625 additions and 2849 deletions

View File

@ -112,9 +112,7 @@ service.interceptors.response.use(
code: 200
}
if (response.headers['content-disposition']) {
const fileName = response.headers['content-disposition']
?.split(';')[1]
?.split('=')[1]
const fileName = response.headers['content-disposition']?.split(';')[1]?.split('=')[1]
} else {
return Promise.reject('没有访问权限')
}
@ -128,7 +126,7 @@ service.interceptors.response.use(
}
if (![0, 200].includes(code)) {
// if(errMsg==='用户未登录')
if (errMsg === '用户未登录') return Promise.reject(errMsg)
// { message.error(errMsg);}
// else if(errMsg==='密码不正确'){
// message.error(errMsg);

View File

@ -40,9 +40,7 @@ const userCode = ref(false)
const shormA = ref(false)
const shormB = ref(false)
watchEffect(() => {
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].includes(
store.user.roleCode
)
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].includes(store.user.roleCode)
console.log(isUpPwds.value, userCode.value)
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
console.log(isUpPwds.value, 'xiaolu0000222')
@ -76,8 +74,7 @@ const fromtB = ref({
})
const addClickA = async () => {
const { question1, question2, question3, question4, type, id, number } =
fromtA.value
const { question1, question2, question3, question4, type, id, number } = fromtA.value
if (type === 'edit') {
const { code, msg } = await faqWithdraw({
addList: [
@ -193,15 +190,11 @@ onMounted(async () => {
timeA.value = lastUTime
timeB.value = _lastUTime
if (isUpPwds.value) {
ElMessageBox.alert(
'为了您的帐号安全,首次登录必须更改初始密码',
'重要提醒',
{
ElMessageBox.alert('为了您的帐号安全,此次登录必须更改密码', '重要提醒', {
confirmButtonText: 'OK',
showClose: false,
showCancelButton: false
}
).then(() => {
}).then(() => {
push({ name: 'modify' })
})
}
@ -392,8 +385,7 @@ async function setModule(codes: any) {
const handleVisitsScoll = () => {
const container = visitsScoll.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (visitPum < visitLength) {
++visitPum
@ -406,8 +398,7 @@ const handleVisitsScoll = () => {
const handleInvScoll = () => {
const container = invsScoll.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (invPum < invLength) {
++invPum
@ -420,8 +411,7 @@ const handleInvScoll = () => {
const handleTabScoll = () => {
const container = tabScll.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (tabPume < tabLength) {
++tabPume
@ -435,8 +425,7 @@ const handleTabScoll = () => {
const handlePrScoll = () => {
const container = portant.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (prpum < pLenght) {
++prpum
@ -450,8 +439,7 @@ const handlePrScoll = () => {
const handleNewScoll = () => {
const container = newsSoll.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (newPum < newLength) {
++newPum
@ -465,8 +453,7 @@ const handleNewScoll = () => {
const handleMsgScoll = () => {
const container = msgScoll.value
if (container) {
const isAtBottom =
container.scrollHeight - container.scrollTop === container.clientHeight
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
if (isAtBottom) {
if (psgPum < maxMsgLingth) {
++psgPum
@ -583,9 +570,7 @@ const demandWithdraws = async (obj) => {
<template>
<div class="page w-1920px h-1080px p30px flex flex-col">
<div class="w300px -mr-1px flex flex-col shrink-0">
<div class="text-20px text-#fff font-600 mt6px">
大金中国调达本部 HOMEPAGE
</div>
<div class="text-20px text-#fff font-600 mt6px">大金中国调达本部 HOMEPAGE</div>
<!-- @dblclick="toggle" -->
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
</div>
@ -628,12 +613,7 @@ const demandWithdraws = async (obj) => {
>+ 新增</el-button
>
<span
style="
border: #417bef 1px solid;
color: #417bef;
border-radius: 5px;
height: 30px;
"
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
class="mr15px mt17px flex px5px pt6px"
@click="toList(7)"
>更多<el-icon> <DArrowRight class="" /> </el-icon
@ -645,15 +625,8 @@ const demandWithdraws = async (obj) => {
<ArrowRightBold />
</el-icon> -->
</div>
<div
ref="newsSoll"
class="p20px w100% h355px cent_box overflow-y-auto"
>
<div
v-if="newsList"
class="text-#152242 truncate-box text-18px"
v-for="i in newsList"
>
<div ref="newsSoll" class="p20px w100% h355px cent_box overflow-y-auto">
<div v-if="newsList" class="text-#152242 truncate-box text-18px" v-for="i in newsList">
<div class="truncate" @click="toDetail(i, 'App_E_News')">
<img
v-if="i.tag === 'New'"
@ -665,16 +638,12 @@ const demandWithdraws = async (obj) => {
class="text-#fff bg-red p5px text-18px rounded-5px mr-5px badge-24"
>置顶</span
>
<span
:style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''"
:title="i.title"
>{{ i.title }}</span
>
<span :style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''" :title="i.title">{{
i.title
}}</span>
</div>
<div
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0"
>
<div class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0">
{{ i.createTime.substring(0, 10) }}
</div>
</div>
@ -688,9 +657,7 @@ const demandWithdraws = async (obj) => {
<div class="icons w20px h20px mt15px absolute right-20px top-0"></div>
</div> -->
</div>
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">
重要通知
</div>
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">重要通知</div>
<div class="flex">
<el-button
v-if="userCode"
@ -699,30 +666,18 @@ const demandWithdraws = async (obj) => {
@click="push({ path: '/external/Process', query: { cate: '8' } })"
>流程列表</el-button
>
<el-button
v-if="userCode"
type="primary"
class="mt0px mr10px"
@click="toDetail2(8)"
<el-button v-if="userCode" type="primary" class="mt0px mr10px" @click="toDetail2(8)"
>+ 新增</el-button
>
<span
style="
border: #417bef 1px solid;
color: #417bef;
border-radius: 5px;
height: 30px;
"
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
class="mr15px mt2px flex px5px pt6px"
@click="toList(8)"
>更多<el-icon> <DArrowRight class="" /> </el-icon
></span>
</div>
<div
ref="portant"
class="p20px pt0px w100% h355px cent_box overflow-y-auto"
>
<div ref="portant" class="p20px pt0px w100% h355px cent_box overflow-y-auto">
<div
v-if="portantList"
class="text-#152242 truncate-box text-18px"
@ -740,16 +695,12 @@ const demandWithdraws = async (obj) => {
class="text-#fff bg-red p5px text-14px rounded-5px mr-5px badge-24"
>置顶</span
>
<span
:style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''"
:title="i.title"
>{{ i.title }}</span
>
<span :style="i.isRead === 2 ? 'color:#0058E5;font-weight' : ''" :title="i.title">{{
i.title
}}</span>
</div>
<div
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0"
>
<div class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0">
{{ i.createTime.substring(0, 10) }}
</div>
</div>
@ -762,9 +713,7 @@ const demandWithdraws = async (obj) => {
</div> -->
</div>
</div>
<div
class="cards w64% h800px !shadow-none !bg-transparent page-wrapper"
>
<div class="cards w64% h800px !shadow-none !bg-transparent page-wrapper">
<div class="cards w760px h385px cursor-pointer">
<div class="cards_title">市况汇率每日更新</div>
<div class="cards_nav cards_nav2 !top--3px !right--1px">
@ -807,11 +756,7 @@ const demandWithdraws = async (obj) => {
>
<td>{{ it.channel }}</td>
<td>{{ it.negAmount }}</td>
<td
:class="
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
"
>
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
{{ displayDiffValue(it.diffValue) }}
</td>
</tr>
@ -844,11 +789,7 @@ const demandWithdraws = async (obj) => {
>
<td>{{ it.channel }}</td>
<td>{{ it.negAmount }}</td>
<td
:class="
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
"
>
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
{{ displayDiffValue(it.diffValue) }}
</td>
</tr>
@ -885,15 +826,9 @@ const demandWithdraws = async (obj) => {
:key="index"
:class="index % 2 !== 0 ? 'bg-#f9f9f9' : ''"
>
<td>
{{ it.currencyCodeFrom }}-{{ it.currencyNameTo }}
</td>
<td>{{ it.currencyCodeFrom }}-{{ it.currencyNameTo }}</td>
<td>{{ it.negAmount }}</td>
<td
:class="
it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'
"
>
<td :class="it.diffValue < 0 ? 'text-#63BF8D' : 'text-red'">
{{ displayDiffValue(it.diffValue) }}
</td>
</tr>
@ -927,10 +862,7 @@ const demandWithdraws = async (obj) => {
>
<span
@click="
openNewWindow(
'App_E_Link_GPROC',
'https://edi.daikin.net.cn:8443/gproc/'
)
openNewWindow('App_E_Link_GPROC', 'https://edi.daikin.net.cn:8443/gproc/')
"
class="text-#142142"
>
@ -944,12 +876,7 @@ const demandWithdraws = async (obj) => {
>2</span
>
<span
@click="
openNewWindow(
'App_E_Link_DELTA',
'https://edi.daikin.net.cn'
)
"
@click="openNewWindow('App_E_Link_DELTA', 'https://edi.daikin.net.cn')"
class="text-#142142"
>
DELTA</span
@ -981,10 +908,7 @@ const demandWithdraws = async (obj) => {
>
<span
@click="
openNewWindow(
'App_E_Link_DaiKin_Site',
'https://www.daikin-china.com.cn/'
)
openNewWindow('App_E_Link_DaiKin_Site', 'https://www.daikin-china.com.cn/')
"
class="text-#142142"
>
@ -1001,9 +925,7 @@ const demandWithdraws = async (obj) => {
@click="openNewWindow('App_E_Link_DaiKin_CAN', 'shorm')"
class="text-#142142"
>
<a target="_blank" style="color: inherit"
>大金空调中国相关</a
></span
<a target="_blank" style="color: inherit">大金空调中国相关</a></span
>
</div>
</div>
@ -1085,26 +1007,10 @@ const demandWithdraws = async (obj) => {
'font-size': '18px'
}"
>
<el-table-column
property="title"
label="调查表名称"
align="left"
/>
<el-table-column
property="fillCTime"
label="填表日期"
align="center"
/>
<el-table-column
property="fillRangeDate"
label="填表期间"
align="center"
/>
<el-table-column
property="status"
label="填报状态"
align="center"
/>
<el-table-column property="title" label="调查表名称" align="left" />
<el-table-column property="fillCTime" label="填表日期" align="center" />
<el-table-column property="fillRangeDate" label="填表期间" align="center" />
<el-table-column property="status" label="填报状态" align="center" />
</el-table>
</div>
</div>
@ -1170,13 +1076,7 @@ const demandWithdraws = async (obj) => {
<!-- lujinli -->
<span v-if="flgs == 1" class="text-18px">{{ i.number }}</span>
<span v-if="flgs == 2" class="text-18px">{{
i.demand +
' ' +
i.location +
' ' +
i.remark +
': ' +
i.usdObj
i.demand + ' ' + i.location + ' ' + i.remark + ': ' + i.usdObj
}}</span>
<span v-if="flgs == 3" class="text-18px">{{ i.title }}</span>
</div>
@ -1216,9 +1116,7 @@ const demandWithdraws = async (obj) => {
@click="deleteMSG(i)"
/>
</div>
<span v-if="flgs == 3" class="absolute right-0px top-18px">{{
i.createTime
}}</span>
<span v-if="flgs == 3" class="absolute right-0px top-18px">{{ i.createTime }}</span>
<span v-if="flgs == 2" class="absolute right-80px top-10px">{{
i.procureTime
}}</span>
@ -1239,61 +1137,28 @@ const demandWithdraws = async (obj) => {
<div v-if="!msgList?.length" class="text-#808696 w515px">
<div>
<!-- lujinli -->
<span
v-if="flgs == 1"
class="text-18px"
style="margin-left: 40%; display: flex"
>
<div
v-if="userCode"
class="flex items-center justify-center flex-col"
>
<img
src="./images/zanwly.png"
alt=""
style="margin-right: 50px"
/>
<p style="text-align: center; color: #dde5fd">
暂无供方留言
</p>
<span v-if="flgs == 1" class="text-18px" style="margin-left: 40%; display: flex">
<div v-if="userCode" class="flex items-center justify-center flex-col">
<img src="./images/zanwly.png" alt="" style="margin-right: 50px" />
<p style="text-align: center; color: #dde5fd">暂无供方留言</p>
</div>
<div
v-else
class="flex items-center justify-center flex-col"
>
<div v-else class="flex items-center justify-center flex-col">
<img src="./images/zanwly2.png" alt="" />
<span
style="display: flex; margin: 5px auto; color: #dde5fd"
<span style="display: flex; margin: 5px auto; color: #dde5fd"
>您暂未留言</span
>
</div>
</span>
<span
v-if="flgs == 2"
class="text-18px"
style="margin-left: 40%; display: flex"
>
<div
v-if="userCode"
class="flex items-center justify-center flex-col"
>
<img
src="./images/zanwly.png"
alt=""
style="margin-right: 50px"
/>
<span
style="display: flex; margin: 5px auto; color: #dde5fd"
<span v-if="flgs == 2" class="text-18px" style="margin-left: 40%; display: flex">
<div v-if="userCode" class="flex items-center justify-center flex-col">
<img src="./images/zanwly.png" alt="" style="margin-right: 50px" />
<span style="display: flex; margin: 5px auto; color: #dde5fd"
>暂无提供方留言</span
>
</div>
<div
v-else
class="flex items-center justify-center flex-col"
>
<div v-else class="flex items-center justify-center flex-col">
<img src="./images/zanwly2.png" alt="" />
<span
style="display: flex; margin: 5px auto; color: #dde5fd"
<span style="display: flex; margin: 5px auto; color: #dde5fd"
>您暂未留言</span
>
</div>
@ -1307,10 +1172,7 @@ const demandWithdraws = async (obj) => {
</div>
</div>
<n-modal
v-model:show="shormA"
class="w-940px h740px rd-20px relative bg-#fff"
>
<n-modal v-model:show="shormA" class="w-940px h740px rd-20px relative bg-#fff">
<div>
<div
style="
@ -1330,13 +1192,7 @@ const demandWithdraws = async (obj) => {
<div
size="40"
color="#ccc"
style="
font-size: 20px;
margin: 10px;
width: 18.09px;
height: 18.21px;
color: #b2b2b2;
"
style="font-size: 20px; margin: 10px; width: 18.09px; height: 18.21px; color: #b2b2b2"
@click="close1"
>
<svg
@ -1353,12 +1209,7 @@ const demandWithdraws = async (obj) => {
</div>
<!-- 内容区 -->
<div
style="
border-top: 1px solid #e1e1e1;
width: 100%;
padding-top: 38px;
padding-left: 38px;
"
style="border-top: 1px solid #e1e1e1; width: 100%; padding-top: 38px; padding-left: 38px"
>
<span
style="
@ -1487,12 +1338,7 @@ const demandWithdraws = async (obj) => {
<span
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
@click="shormA = false"
style="
width: 100px;
height: 38px;
border-radius: 5px 5px 5px 5px;
background: #ffffff;
"
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #ffffff"
>
<div
style="
@ -1511,12 +1357,7 @@ const demandWithdraws = async (obj) => {
</span>
<span
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
style="
width: 100px;
height: 38px;
border-radius: 5px 5px 5px 5px;
background: #3870e5;
"
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #3870e5"
@click="addClickA"
>
<div
@ -1568,13 +1409,7 @@ const demandWithdraws = async (obj) => {
<div
size="40"
color="#ccc"
style="
font-size: 20px;
margin: 10px;
width: 18.09px;
height: 18.21px;
color: #b2b2b2;
"
style="font-size: 20px; margin: 10px; width: 18.09px; height: 18.21px; color: #b2b2b2"
@click="close1"
>
<svg
@ -1589,9 +1424,7 @@ const demandWithdraws = async (obj) => {
</svg>
</div>
</div>
<div
style="border-top: 1px solid #e1e1e1; width: 100%; padding-left: 38px"
>
<div style="border-top: 1px solid #e1e1e1; width: 100%; padding-left: 38px">
<div
style="
font-weight: 700;
@ -1738,12 +1571,7 @@ const demandWithdraws = async (obj) => {
<span
class="inline-block w80px h25px text-#bfbfbf border border-solid text-center rounded-5px cursor-pointer"
@click="shormB = false"
style="
width: 100px;
height: 38px;
border-radius: 5px 5px 5px 5px;
background: #ffffff;
"
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #ffffff"
>
<div
style="
@ -1762,12 +1590,7 @@ const demandWithdraws = async (obj) => {
</span>
<span
class="inline-block w80px h25px text-#fff bg-#236EED ml5px text-center rounded-5px cursor-pointer"
style="
width: 100px;
height: 38px;
border-radius: 5px 5px 5px 5px;
background: #3870e5;
"
style="width: 100px; height: 38px; border-radius: 5px 5px 5px 5px; background: #3870e5"
@click="addClickB"
>
<div
@ -1793,11 +1616,7 @@ const demandWithdraws = async (obj) => {
<div class="w700px h430px bg-#fff rd-15px">
<div
class="py5px px15px"
style="
border-bottom: 1px solid #dadada;
font-weight: bold;
color: #494a63;
"
style="border-bottom: 1px solid #dadada; font-weight: bold; color: #494a63"
>
大金空调中国相关
<img
@ -1809,17 +1628,13 @@ const demandWithdraws = async (obj) => {
<div class="flex mt70px text-center">
<div class="w-full text-center">
<img src="@/assets/images/ewm1@2x.png" class="w200px" />
<div
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
>
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
大金空调中国视频号
</div>
</div>
<div class="w-full">
<img src="@/assets/images/ewm2@2x.png" class="w200px" />
<div
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
>
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
大金空调抖音号
</div>
</div>

View File

@ -168,7 +168,7 @@ onMounted(async () => {
addDISH3.value > 0 ? (addDISH3.value = addDISH3.value.toFixed(2)) : 0
}
if (isUpPwds.value) {
ElMessageBox.alert('为了您的帐号安全,首次登录必须更改初始密码', '重要提醒', {
ElMessageBox.alert('为了您的帐号安全,此次登录必须更改密码', '重要提醒', {
confirmButtonText: 'OK',
showClose: false,
showCancelButton: false

View File

@ -13,7 +13,7 @@ const query = ref<any>({
})
const year = new Date().getFullYear()
const month = new Date().getMonth()
const jpMonth = (month < 3 ? year - 1 : year) + ''
const jpMonth = (month < 4 ? year - 1 : year) + ''
query.value.year = jpMonth
const calendar = [4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3]
const calendarShow = new Date().getMonth() + 1
@ -43,8 +43,11 @@ const getCsrSupplier = () => {
try {
csrSupplier.value = resData.length
? resData.map((key) => {
const obj = data[key] || {}
const month = String(key).split('-')?.[1] || ''
const arr = String(key).split('-')
const month = arr?.[1] || ''
// const year = arr?.[0] || ''
const obj =
data[+month < 4 ? +req.year + 1 + '-' + month : req.year + '-' + month] || {}
Object.assign(csrSupplierObj.value[month], obj)
return {
key,
@ -173,19 +176,17 @@ getCsrSupplierTaskInfo()
<el-col :span="8" v-for="(it, i) in months" :key="i">
<div
v-show="!loading"
:class="i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'"
:class="csrSupplierObj[it]?.submitedCount !== undefined ? 'times' : 'time'"
@click="handleMonth(i)"
>
<div
v-if="i > nowIndexMonth || query.year != jpMonth"
v-if="csrSupplierObj[it]?.submitedCount === undefined"
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
>
<span class="text-60px">{{ +it }}</span
>
</div>
<template
v-if="i <= nowIndexMonth && (query.year == jpMonth || !!csrSupplierObj[it])"
>
<template v-if="csrSupplierObj[it]?.submitedCount !== undefined">
<div class="text-#fff text-18px font-bold absolute left-40% top-24px">
<span class="text-24px">{{ +it }}</span
>

View File

@ -1,13 +1,6 @@
<!-- 差别化云空间 -->
<script setup lang="ts">
import {
NIcon,
NModal,
useMessage,
NPopover,
NCarousel,
NCarouselItem
} from 'naive-ui'
import { NIcon, NModal, useMessage, NPopover, NCarousel, NCarouselItem } from 'naive-ui'
import { ChevronBack, ChevronForward } from '@vicons/ionicons5'
import AppBlock from '@/components/AppBlock.vue'
import AppAlert from '@/components/AppAlert.vue'
@ -26,9 +19,7 @@ import { isNotOneWeekAgo } from '@/utils'
const store = useUserStore()
const myStore = useMyStore()
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(
store.user.roleCode
)
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(store.user.roleCode)
const message = useMessage()
const showDropdown1 = ref(false)
@ -199,9 +190,7 @@ const openUrl = async (url) => {
return
}
srcType.value = getLastSubstring(url)
if (
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
) {
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
// src.value = filePath
// pdfShow.value = true
url = 'https://view.xdocin.com/view?src=' + url
@ -210,19 +199,10 @@ const openUrl = async (url) => {
window.open(
url,
'',
'width=' +
screenWidth +
',height=' +
screenHeight +
',top=' +
0 +
',left=' +
0
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
)
} else {
message.error(
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'"
)
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'")
}
}
function getLastSubstring(str: string): string {
@ -278,9 +258,7 @@ const handleSelect = (data: { id: any }) => {
message.info('没有访问权限')
return
}
form.value.lable1 = dataLeft.value.find(
(it: { id: any }) => it.id === data.id
)
form.value.lable1 = dataLeft.value.find((it: { id: any }) => it.id === data.id)
}
const handleClick = () => {
if (leftContentIsSelects.value === 2) {
@ -295,9 +273,7 @@ const handleSelect2 = (data: { id: any }) => {
return
}
console.log(dataRight.value)
form.value.lable2 = dataRight.value.find(
(it: { id: any }) => it.id === data.id
)
form.value.lable2 = dataRight.value.find((it: { id: any }) => it.id === data.id)
}
const handleClick2 = () => {
// console.log(dataBlist.value)
@ -396,9 +372,7 @@ async function downs() {
originalFilename = dataBlist.value.originalFilename
} else {
url = dataBlist.value.map((ite) => ite.response.url)
originalFilename = dataBlist.value.map(
(ite) => ite.response.originalFilename
)
originalFilename = dataBlist.value.map((ite) => ite.response.originalFilename)
}
}
@ -437,9 +411,7 @@ const title = (tit) => {
<img src="./images/logo.svg" class="h56px mr21px" />
<div class="text-36px">差别化研究</div>
</div>
<div
class="w-full flex-1 flex flex-col mt17px text-#142142 gap-30px h-896px"
>
<div class="w-full flex-1 flex flex-col mt17px text-#142142 gap-30px h-896px">
<AppBlock class="w-full h241px box !b-0">
<!-- @click="swipeRef && swipeRef.slideNext()" -->
<div class="w1500px px68px relative" v-if="showSwiper">
@ -499,19 +471,16 @@ const title = (tit) => {
<!-- <div class="text-16px mt6px">{{ i.time }}</div> -->
<n-popover trigger="hover" placement="top-start">
<template #trigger>
<div
class="text-20px truncate leading-40px flex items-center"
>
<div class="text-20px truncate leading-40px flex items-center">
<img
v-if="isNotOneWeekAgo(i.createTime)"
src="@/assets/images/NEW.gif"
class="!h-20px !w-auto mr-2"
alt=""
/>
<span
class="overflow-hidden text-ellipsis truncate flex flex-1"
>{{ title(i) + '' + i.title }}</span
>
<span class="overflow-hidden text-ellipsis truncate flex flex-1">{{
title(i) + '' + i.title
}}</span>
</div>
</template>
<div class="max-w500px text-12px">{{ i.title }}</div>
@ -524,25 +493,14 @@ const title = (tit) => {
</div>
</AppBlock>
<div class="flex-1 flex gap-26px">
<AppBlock
class="box w-379px h-full relative !overflow-initial"
v-if="form"
>
<img
:src="form.lable1.url"
class="w-full h-full absolute left-0 top-0 rounded-18px"
/>
<AppBlock class="box w-379px h-full relative !overflow-initial" v-if="form">
<img :src="form.lable1.url" class="w-full h-full absolute left-0 top-0 rounded-18px" />
<div
class="mt20px mx10px h60px flex items-center justify-center rd-30px text-24px text-#fff bg-#000/45"
>
<p
:alt="form.lable1.title"
style="
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
style="width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
<n-popover trigger="hover" placement="top-start">
<template #trigger>
@ -563,9 +521,7 @@ const title = (tit) => {
<div
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
>
<span class="text-#000 text-18px flex-1 font-600">{{
form.lable1.titles
}}</span>
<span class="text-#000 text-18px flex-1 font-600">{{ form.lable1.titles }}</span>
<el-icon
v-if="showDropdown1 === true"
@ -588,9 +544,7 @@ const title = (tit) => {
</div>
<div class="bottomclom" v-if="showDropdown1">
<div v-if="dataLeft" v-for="item in dataLeft">
<span class="container" @click="handleSelect(item)">{{
item.title
}}</span>
<span class="container" @click="handleSelect(item)">{{ item.title }}</span>
<el-dropdown max-height="100px" @command="down">
<el-icon size="25">
<CaretBottom />
@ -620,12 +574,7 @@ const title = (tit) => {
>
<p
:alt="form.lable1.title"
style="
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
"
style="width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
>
<n-popover trigger="hover" placement="top-start">
<template #trigger>
@ -647,9 +596,7 @@ const title = (tit) => {
<div
class="absolute bottom-0 left-0 w-full h48px px28px flex items-center bg-#fff/67 cursor-pointer"
>
<span class="text-#000 text-18px flex-1 font-600">{{
form.lable2.titles
}}</span>
<span class="text-#000 text-18px flex-1 font-600">{{ form.lable2.titles }}</span>
<el-icon
v-if="showDropdown2 === true"
size="25"
@ -671,9 +618,7 @@ const title = (tit) => {
</div>
<div class="bottomclom" v-if="showDropdown2">
<div v-if="dataRight" v-for="item in dataRight">
<span class="container" @click="handleSelect2(item)">{{
item.title
}}</span>
<span class="container" @click="handleSelect2(item)">{{ item.title }}</span>
<el-dropdown max-height="100px" @command="down">
<el-icon size="25">
<CaretBottom />
@ -705,14 +650,7 @@ const title = (tit) => {
</AppAlert>
<div class="h95px w100% min-h-125px" v-if="shutList1">
<swiper
:autoplay="
shutList1.length > 4
? {
delay: 1000,
disableOnInteraction: false
}
: false
"
:autoplay="false"
:slides-per-view="3"
:slides-per-group="1"
:loopAdditionalSlides="3"
@ -725,9 +663,7 @@ const title = (tit) => {
style="height: 120px; width: 100%"
>
<swiper-slide v-for="i in shutList1" :key="i.id">
<div
class="w-full px12px line flex h40px flex items-center justify-between"
>
<div class="w-full px12px line flex h40px flex items-center justify-between">
<div
class="min-w67% max-w70% truncate text-left leading-40px h40px"
@click="downClicks1(i)"
@ -740,9 +676,7 @@ const title = (tit) => {
class="!h-20px !w-auto"
alt=""
/>
<div
class="min-w23% max-w30% text-right leading-40px h40px"
>
<div class="min-w23% max-w30% text-right leading-40px h40px">
{{ i.createTime }}
</div>
</div>
@ -759,17 +693,11 @@ const title = (tit) => {
</div> -->
<div
class="h95px w100% min-h125px max-h125px overflow-y-auto"
v-if="shutList2"
>
<div class="h95px w100% min-h125px max-h125px overflow-y-auto" v-if="shutList2">
<swiper
id="swiperList2"
:slides-per-view="3"
:autoplay="{
delay: 1000,
disableOnInteraction: false
}"
:autoplay="false"
:speed="500"
:space-between="1"
:direction="'vertical'"
@ -779,9 +707,7 @@ const title = (tit) => {
style="height: 120px; width: 100%"
>
<swiper-slide v-for="(i, index) in shutList2" :key="index">
<div
class="w-full px12px line flex h40px flex items-center justify-between"
>
<div class="w-full px12px line flex h40px flex items-center justify-between">
<div
class="min-w67% max-w70% truncate text-left leading-40px h40px"
@click="downClicks1(i)"
@ -794,9 +720,7 @@ const title = (tit) => {
class="!h-20px !w-auto"
alt=""
/>
<div
class="min-w23% max-w30% text-right leading-40px h40px"
>
<div class="min-w23% max-w30% text-right leading-40px h40px">
{{ i.createTime }}
</div>
</div>
@ -808,17 +732,11 @@ const title = (tit) => {
<span class="flex-shrink" @click="bottomClick(3)"></span>
<!-- <span class="flex-shrink" ></span> -->
</AppAlert>
<div
class="h145px w100% min-h135px max-h145px overflow-y-auto"
v-if="shutList3"
>
<div class="h145px w100% min-h135px max-h145px overflow-y-auto" v-if="shutList3">
<swiper
id="swiperList3"
:slides-per-view="3"
:autoplay="{
delay: 1000,
disableOnInteraction: false
}"
:autoplay="false"
:speed="500"
:space-between="1"
:direction="'vertical'"
@ -828,9 +746,7 @@ const title = (tit) => {
style="height: 120px; width: 100%"
>
<swiper-slide v-for="(i, index) in shutList3" :key="index">
<div
class="w-full px12px line flex h40px flex items-center justify-between"
>
<div class="w-full px12px line flex h40px flex items-center justify-between">
<div
class="min-w67% max-w70% truncate text-left leading-40px h40px"
@click="downClicks1(i)"
@ -843,9 +759,7 @@ const title = (tit) => {
class="!h-20px !w-auto"
alt=""
/>
<div
class="min-w23% max-w30% text-right leading-40px h40px"
>
<div class="min-w23% max-w30% text-right leading-40px h40px">
{{ i.createTime }}
</div>
</div>
@ -863,11 +777,7 @@ const title = (tit) => {
class="my30px text-center text-12px text-#2c3e50"
v-for="item in dogList"
>
<img
:src="item.url"
class="w100px !border-0 dog_log"
@click="handleSelectPor"
/>
<img :src="item.url" class="w100px !border-0 dog_log" @click="handleSelectPor" />
<div class="mt12px">姓名{{ item.title }}</div>
<div class="my8px">职位{{ item.time }}</div>

View File

@ -1,9 +1,10 @@
<!-- 外部情报 -->
<script setup lang="ts">
// import Vue3Tinymce from '@jsdawn/vue3-tinymce';
import HomeHead from "@/views/home/components/HomeHead.vue";
import HomeHead from '@/views/home/components/HomeHead.vue'
import UserPage from '../../../home/intelligence/process/UserPages.vue'
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import { useDate } from "@/views/home/hooks/useDate";
import { useDate } from '@/views/home/hooks/useDate'
import {
NModal,
NForm,
@ -14,37 +15,37 @@ import {
NSelect,
NSpace,
NRadioGroup,
useMessage,
useMessage
// FormInst,
} from "naive-ui";
import { saveArticle, trendsDetail } from "@/api/daikin/base";
import Editor from "../components/TinyECE.vue";
import { useUserStore } from "@/stores/modules/user";
import { useRoute } from "vue-router";
const { day, week } = useDate();
const { push } = useRouter();
const store = useUserStore();
let route = useRoute();
let cate = ref(1);
const fileList = ref<[]>();
const editorContent = ref("");
const formRef = ref<any | null>(null);
const message = useMessage();
} from 'naive-ui'
import { saveArticle, trendsDetail } from '@/api/daikin/base'
import Editor from '../components/TinyECE.vue'
import { useUserStore } from '@/stores/modules/user'
import { useRoute } from 'vue-router'
const { day, week } = useDate()
const { push } = useRouter()
const store = useUserStore()
let route = useRoute()
let cate = ref(1)
const fileList = ref<[]>()
const editorContent = ref('')
const formRef = ref<any | null>(null)
const message = useMessage()
const formValue: any = ref({
type: "1",
cate: "1",
title: "",
tag: "",
source: "",
content: "",
reviewSource: "2",
});
type: '1',
cate: '1',
title: '',
tag: '',
source: '',
content: '',
reviewSource: '2'
})
if (route.query.id) {
trendsDetail(route.query.id).then((res) => {
let data = res.data;
console.log(res);
let data = res.data
console.log(res)
formValue.value = {
type: data.type,
cate: data.cate,
@ -52,34 +53,34 @@ if (route.query.id) {
tag: data.tag,
source: data.source,
content: unescapeHTML(data.content),
reviewSource: data.reviewSource,
};
editorContent.value = unescapeHTML(data.content);
reviewSource: data.reviewSource
}
editorContent.value = unescapeHTML(data.content)
if (data.type === 2) {
cate.value = 3;
cate.value = 3
} else {
}
console.log(cate.value, data.cate);
console.log(cate.value, data.cate)
rules = {
title: {
required: false,
message: "请输入标题",
trigger: "blur",
message: '请输入标题',
trigger: 'blur'
},
tag: {
required: true,
message: "请输入标题",
trigger: "blur",
message: '请输入标题',
trigger: 'blur'
},
content: {
required: false,
message: "请输入内容",
trigger: "blur",
},
};
});
message: '请输入内容',
trigger: 'blur'
}
}
})
}
let rules: any = {
// cate: {
@ -89,123 +90,143 @@ let rules: any = {
// },
title: {
required: false,
message: "请输入标题",
trigger: "blur",
message: '请输入标题',
trigger: 'blur'
},
tag: {
required: true,
message: "请输入标题",
trigger: "blur",
message: '请输入标题',
trigger: 'blur'
},
content: {
required: false,
message: "请输入内容",
trigger: "blur",
},
};
message: '请输入内容',
trigger: 'blur'
}
}
function change(i: any) {
// console.log(i)
cate.value = i;
cate.value = i
// console.log(formValue.cate)
formValue.cate = i;
formValue.cate = i
// console.log(formValue.cate)
}
function sure(e: MouseEvent) {
e.preventDefault();
e.preventDefault()
formRef.value?.validate((errors) => {
if (!errors) {
formValue.value.cate = cate.value;
formValue.value.cate = cate.value
if (!formValue.value.type) {
message.success("请选择类型");
return;
message.success('请选择类型')
return
}
// console.log('555555', editorContent.value);
save();
save()
} else {
console.log(errors);
message.error("请输入完整");
console.log(errors)
message.error('请输入完整')
}
});
})
}
function escapeHTML(html: string): string {
const tempElement = document.createElement("div");
tempElement.textContent = html;
return tempElement.innerHTML;
const tempElement = document.createElement('div')
tempElement.textContent = html
return tempElement.innerHTML
}
function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, "text/html");
return doc.documentElement.textContent;
const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent
}
const header = { token: store.user.token };
const header = { token: store.user.token }
// console.log(store.user.token)
const dialogImageUrl = ref("");
const dialogVisible = ref(false);
const dialogImageUrl = ref('')
const dialogVisible = ref(false)
const handleRemove: UploadProps["onRemove"] = (
uploadFile: any,
uploadFiles: any
) => {
const handleRemove: UploadProps['onRemove'] = (uploadFile: any, uploadFiles: any) => {
// console.log(dialogImageUrl,dialogVisible)
};
}
const handlePictureCardPreview: UploadProps["onPreview"] = (uploadFile: {
url: string;
}) => {
dialogImageUrl.value = uploadFile.url!;
dialogVisible.value = true;
const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile: { url: string }) => {
dialogImageUrl.value = uploadFile.url!
dialogVisible.value = true
// console.log(dialogImageUrl.value)
};
}
async function save() {
const cont = editorContent.value;
const content = escapeHTML(cont);
const reviewSource = 2;
const cont = editorContent.value
const content = escapeHTML(cont)
const reviewSource = 2
// console.log(fileList.value)
let bannerImg;
let bannerImg
if (fileList.value && fileList.value.length > 0) {
bannerImg = fileList.value.map((item) => item.response.url).join("");
bannerImg = fileList.value.map((item) => item.response.url).join('')
} else {
}
console.log(formValue.value);
let userIdList: any[] = []
if (dataList.value?.length > 0) {
dataList.value.forEach((i: { userId: any }) => {
userIdList.push(i.userId)
})
}
const { title, tag, source, cate, type } = formValue.value;
console.log(cate);
const { title, tag, source, cate, type } = formValue.value
console.log(cate)
const { msg, code } = await saveArticle({
title,
tag: "",
tag: '',
reviewSource,
source,
cate: formValue.cate || formValue.value.cate,
type,
content,
bannerImg,
});
userIdList
})
if (code === 200) {
message.success("新增成功");
message.success('新增成功')
// window.location.reload();
history.back();
history.back()
} else {
message.success(msg);
message.success(msg)
}
}
//
const handleChild = (data: string) => {
editorContent.value = data;
};
editorContent.value = data
}
const radios = (e: any) => {
console.log(e.srcElement.value);
if (e.srcElement.value === "1") {
cate.value = 1;
console.log(e.srcElement.value)
if (e.srcElement.value === '1') {
cate.value = 1
} else {
cate.value = 4;
cate.value = 4
}
};
const showModal = ref(false);
}
const showModal = ref(false)
const showModal1 = ref(false)
const setUserList = ref()
const dataList = ref()
const thisClick = () => {
showModal1.value = true
setUserList.value = dataList.value || []
}
const CloseThis = (data: boolean) => {
showModal1.value = data
}
const handleChild1 = (data: any) => {
const { showModal: show, multipleSelection } = data
showModal1.value = unref(show)
dataList.value = unref(multipleSelection)
}
const handleClose = (tag: any) => {
dataList.value.splice(dataList.value.indexOf(tag), 1)
}
</script>
<template>
@ -332,16 +353,33 @@ const showModal = ref(false);
<n-input v-model:value="formValue.source" placeholder="" />
</n-form-item>
<n-form-item label="情报内容" path="content">
<Editor
@getChildData="handleChild"
v-model="formValue.content"
></Editor>
<Editor @getChildData="handleChild" v-model="formValue.content"></Editor>
</n-form-item>
<n-button @click="thisClick"> </n-button>
<div class="mt15px h150px overflow-y-auto">
<el-tag
v-for="i in dataList"
:key="i"
class="mx-1 my5px"
closable
:disable-transitions="false"
@close="handleClose(i)"
type="info"
size="large"
>
{{ i.nickName }}
</el-tag>
</div>
<n-form-item>
<div>
<n-button @click="showModal = true"> 文本内容预览</n-button>
</div>
</n-form-item>
<!-- <n-form-item>
<div>
<el-button type="primary" @click="thisClick"> {{''}}</el-button>
</div>
</n-form-item> -->
</n-form>
<n-button
attr-type="button"
@ -354,12 +392,19 @@ const showModal = ref(false);
</div>
<n-modal v-model:show="showModal">
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
<div
class="overflow-y-auto h800px container"
v-html="editorContent"
></div>
<div class="overflow-y-auto h800px container" v-html="editorContent"></div>
</div>
</n-modal>
<n-modal v-model:show="showModal1">
<!-- <n-card style="width:1100px; height: 800px;" title="调达中心" :bordered="false" size="huge" role="dialog"
aria-modal="true"> -->
<UserPage
:userDataList="setUserList"
@clickChild="handleChild1"
@CloseThis="CloseThis"
></UserPage>
<!-- </n-card> -->
</n-modal>
</template>
<style scoped lang="less">

View File

@ -68,9 +68,17 @@ const num = ['', '第一周', '第二周', '第三周', '第四周', '第五周'
function groupDatesByWeek(dates = [], weekStartDay = 1) {
return dates.reduce((acc: any, item: any) => {
const date = dayjs(item.createTime)
const weekStart = date.startOf('week').add(weekStartDay, 'day').format('MM月DD日')
const weekday = date.day() // 01
//
const mondayDistance = (weekday + 6) % 7
//
const sundayDistance = 7 - mondayDistance - 1
//
const weekStart = date.subtract(mondayDistance, 'day').format('MM月DD日')
const weekEnd = date.add(sundayDistance, 'day').format('MM月DD日')
// const weekStart = date.startOf('week').add(weekStartDay, 'day').format('MMDD')
// const weekEnd = date.endOf('week').add(weekStartDay, 'day').format('MMDD')
item.date = date.format('YYYY-MM-DD')
const weekEnd = date.endOf('week').add(weekStartDay, 'day').format('MM月DD日')
const week = getWeekOfMonth(date)
const month = date.format('MM')
const key = `${+month}${num[week]} ${weekStart} - ${weekEnd} `
@ -132,7 +140,6 @@ const codePath = {
const goModule = (item, type) => {
const { moduleCode, id, cateId } = item
const { modulePath, path } = codePath[moduleCode]
console.log('🚀 ~ file: News.vue:128 ~ modulePath, path:', modulePath, path)
if (modulePath) {
if (type === 'module') {
push(modulePath)