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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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