diff --git a/components.d.ts b/components.d.ts
index c789d9a..0ffb117 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -39,6 +39,7 @@ declare module 'vue' {
ElRow: typeof import('element-plus/es')['ElRow']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
+ ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
diff --git a/src/utils/index.ts b/src/utils/index.ts
index ccd5606..e3f74ae 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -4,10 +4,51 @@ dayjs.extend(isSameOrAfter)
// dayjs.extend(isBefore)
function isNotOneWeekAgo(date: any) {
- if (!date) return false
- const oneWeekAgo = dayjs().subtract(1, 'week')
- // console.log('🚀 ~ oneWeekAgo:', oneWeekAgo.format('YYYY-MM-DD'))
- return dayjs(date).isSameOrAfter(oneWeekAgo, 'day')
+ if (!date) return false
+ const oneWeekAgo = dayjs().subtract(1, 'week')
+ // console.log('🚀 ~ oneWeekAgo:', oneWeekAgo.format('YYYY-MM-DD'))
+ return dayjs(date).isSameOrAfter(oneWeekAgo, 'day')
}
-export { isNotOneWeekAgo }
+const pickerOptions = {
+ disabledDate(time) {
+ return time.getTime() < Date.now()
+ },
+ valueFormat: 'YYYY-MM-dd HH:mm:ss',
+ shortcuts: [
+ {
+ text: '3天后',
+ value: () => {
+ const date = new Date()
+ date.setTime(date.getTime() + 3600 * 1000 * 24 * 3)
+ return date
+ }
+ },
+ {
+ text: '5天后',
+ value: () => {
+ const date = new Date()
+ date.setTime(date.getTime() + 3600 * 1000 * 24 * 5)
+ return date
+ }
+ },
+ {
+ text: '7天后',
+ value: () => {
+ const date = new Date()
+ date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
+ return date
+ }
+ },
+ {
+ text: '10天后',
+ value: () => {
+ const date = new Date()
+ date.setTime(date.getTime() + 3600 * 1000 * 24 * 10)
+ return date
+ }
+ }
+ ]
+}
+
+export { isNotOneWeekAgo, pickerOptions }
diff --git a/src/views/extermal/Board/index.vue b/src/views/extermal/Board/index.vue
index 40542e9..e6f9cee 100755
--- a/src/views/extermal/Board/index.vue
+++ b/src/views/extermal/Board/index.vue
@@ -39,7 +39,9 @@
- 情报公开范围
+
+ 情报公开范围
+
文本内容预览
+
+
+
+
+
+ (formValue.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
提交
@@ -99,6 +133,7 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
import { noticeld } from '@/stores/modules/noticeId'
import { saveArticle, trendsAdd } from '@/api/daikin/base'
import { useDate } from '@/views/home/hooks/useDate'
+import { pickerOptions } from '@/utils/date'
const editorContent = ref()
const { push } = useRouter()
const message = useMessage()
@@ -116,7 +151,9 @@ let formValue: any = ref({
content: '',
reviewSource: '3',
isTop: 'N',
- treeSource: '3'
+ treeSource: '3',
+ isPublish: 0,
+ publishTime: ''
})
function escapeHTML(html: string): string {
const tempElement = document.createElement('div')
@@ -131,7 +168,8 @@ async function save() {
let userIdList: any[] = []
const cont = editorContent.value
const content = escapeHTML(cont)
- const { title, reviewSource, tag, treeSource, source, type, isTop } = formValue.value
+ const { title, reviewSource, tag, treeSource, source, type, isTop, isPublish, publishTime } =
+ formValue.value
const cate = not.article.cate
// console.log(formValue.value, content,cate)
if (dataList.value) {
@@ -161,7 +199,9 @@ async function save() {
cate,
type,
content,
- userIdList
+ userIdList,
+ isPublish,
+ publishTime
})
if (code === 200) {
message.success('新增成功')
diff --git a/src/views/home/bcp/modify.vue b/src/views/home/bcp/modify.vue
index 306f7ba..9724715 100755
--- a/src/views/home/bcp/modify.vue
+++ b/src/views/home/bcp/modify.vue
@@ -6,7 +6,15 @@ import { useMessage, NModal } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
-import { getBPCUser, BPCSaveUser, getBPCEditList,updateBPC,updateBPCOne,delBPCActList, BPCDownload } from '@/api/daikin/base'
+import {
+ getBPCUser,
+ BPCSaveUser,
+ getBPCEditList,
+ updateBPC,
+ updateBPCOne,
+ delBPCActList,
+ BPCDownload
+} from '@/api/daikin/base'
const message = useMessage()
const store = useUserStore()
@@ -24,7 +32,6 @@ const editC = ref()
const editD = ref()
const editE = ref()
-
const shomkA = ref(false)
const shomkB = ref(false)
const shomkC = ref(false)
@@ -36,8 +43,8 @@ async function setDataFiles(arr, _row) {
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
- file.name = file.originalFileName;
- });
+ file.name = file.originalFileName
+ })
}
return i
})
@@ -45,168 +52,180 @@ async function setDataFiles(arr, _row) {
}
async function getDataA() {
- const {rows: dataArr} = await getBPCEditList({moduleId: 1})
- dataA.value = dataArr
- setDataFiles(dataArr);
+ const { rows: dataArr } = await getBPCEditList({ moduleId: 1 })
+ dataA.value = dataArr
+ setDataFiles(dataArr)
}
async function getDataB() {
- const {rows: dataBrr} = await getBPCEditList({moduleId: 2})
- dataB.value = dataBrr
- setDataFiles(dataBrr);
+ const { rows: dataBrr } = await getBPCEditList({ moduleId: 2 })
+ dataB.value = dataBrr
+ setDataFiles(dataBrr)
}
async function getDataC() {
- const {rows: dataCrr} = await getBPCEditList({moduleId: 3})
- dataC.value = dataCrr
- setDataFiles(dataCrr);
+ const { rows: dataCrr } = await getBPCEditList({ moduleId: 3 })
+ dataC.value = dataCrr
+ setDataFiles(dataCrr)
}
async function getDataD() {
- const {rows: dataDrr} = await getBPCEditList({moduleId: 4})
- dataD.value = dataDrr
- setDataFiles(dataDrr);
+ const { rows: dataDrr } = await getBPCEditList({ moduleId: 4 })
+ dataD.value = dataDrr
+ setDataFiles(dataDrr)
}
async function getDataE() {
- const {rows: dataErr} = await getBPCEditList({moduleId: 5})
- dataE.value = dataErr
- setDataFiles(dataErr);
+ const { rows: dataErr } = await getBPCEditList({ moduleId: 5 })
+ dataE.value = dataErr
+ setDataFiles(dataErr)
}
onMounted(async () => {
- getDataA();
- getDataB();
- getDataC();
- getDataD();
- getDataE();
+ getDataA()
+ getDataB()
+ getDataC()
+ getDataD()
+ getDataE()
})
function computedName(title) {
- let index = title.indexOf(".");
+ let index = title.indexOf('.')
if (index > -1) {
- return title.slice(0, index - 1);
+ return title.slice(0, index - 1)
}
- return title;
+ return title
}
-async function onSubmitA(row: { filePathList?: any; id?: any; indexId?: any; title?: any; proportion?: any; partSum?: any; badSum?: any }) {
+async function onSubmitA(row: {
+ filePathList?: any
+ id?: any
+ indexId?: any
+ title?: any
+ proportion?: any
+ partSum?: any
+ badSum?: any
+}) {
console.log(row, 444)
const { id, status, title, type } = row
- let moduleId = 1;
+ let moduleId = 1
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
+ }
shomkA.value = false
- getDataA();
+ getDataA()
}
async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 2;
+ let moduleId = 2
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
+ }
shomkB.value = false
- getDataB();
+ getDataB()
}
async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 3;
+ let moduleId = 3
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else message.error(msg)
+ if (code === 200) {
+ message.success('修改成功!')
+ } else message.error(msg)
shomkC.value = false
getDataC()
}
async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 4;
+ let moduleId = 4
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else {
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
message.error(msg)
}
shomkD.value = false
@@ -214,53 +233,54 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
}
async function onSubmitE(row: { filePathList?: any; id?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 5;
+ let moduleId = 5
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else {
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
message.error(msg)
}
shomkE.value = false
getDataE()
}
-
const handleEditA = (type: string, row: any) => {
editA.value = {
type: type,
status: '紧急',
title: '',
- fileList: [],
+ fileList: []
}
shomkA.value = true
if (!row) return
editA.value = row
- editA.value.type = type;
- editA.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editA.value.type = type
+ editA.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// BPCDownload({ id: row.id }).then(res => {
// editA.value.fileList = [res.data]
// })
@@ -269,17 +289,19 @@ const handleEditB = (type: string, row: any) => {
editB.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkB.value = true
if (!row) return
editB.value = row
- editB.value.type = type;
- editB.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editB.value.type = type
+ editB.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// editB.value.fileList = [row.filePath]
// BPCDownload({ id: row.id }).then(res => {
// editB.value.fileList = [res.data]
@@ -289,17 +311,19 @@ const handleEditC = (type: string, row: any) => {
editC.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkC.value = true
if (!row) return
editC.value = row
- editC.value.type = type;
- editC.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editC.value.type = type
+ editC.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// editC.value.fileList = [row.filePath]
// BPCDownload({ id: row.id }).then(res => {
// editC.value.fileList = [res.data]
@@ -309,17 +333,19 @@ const handleEditD = (type: string, row: any) => {
editD.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkD.value = true
if (!row) return
editD.value = row
- editD.value.type = type;
- editD.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editD.value.type = type
+ editD.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// BPCDownload({ id: row.id }).then(res => {
// editD.value.fileList = [res.data]
// })
@@ -328,99 +354,142 @@ const handleEditE = (type: string, row: any) => {
editE.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkE.value = true
if (!row) return
editE.value = row
- editE.value.type = type;
- editE.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editE.value.type = type
+ editE.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// BPCDownload({ id: row.id }).then(res => {
// editE.value.fileList = [res.data]
// })
}
-
async function handleDeleteA(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataA();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataA()
}
async function handleDeleteB(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
-
- getDataB();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+
+ getDataB()
}
async function handleDeleteC(index: number, row: any) {
-
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
getDataC()
}
async function handleDeleteD(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataD();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataD()
}
async function handleDeleteE(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataE();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataE()
}
-const activeName = ref("first")
+const activeName = ref('first')
const userList = ref()
const showModal = ref(false)
const flg = ref()
-const setUserList =ref()
+const setUserList = ref()
async function getUser(moduleId: any) {
showModal.value = !showModal.value
flg.value = moduleId
- const {data: userArr} = await getBPCUser({moduleId})
+ const { data: userArr } = await getBPCUser({ moduleId })
setUserList.value = userArr
-
}
- // 获取子组件传过来的值
- const handleChild = (data: any) => {
- console.log(data, 444);
- const { showModal: show, multipleSelection } = data
- showModal.value = unref(show)
- // userList.value = multipleSelection
- let userIdList: any[] =[]
- multipleSelection.value.forEach((i: { userId: any })=>{
- // console.log(dataList.value)
- userIdList.push(i.userId)
- })
-
- BPCSaveUser({
- moduleId: flg.value,
- userIdList: userIdList
- })
- }
- const CloseThiss = (data: boolean)=>{
- showModal.value = data
- }
+// 获取子组件传过来的值
+const handleChild = (data: any) => {
+ console.log(data, 444)
+ const { showModal: show, multipleSelection } = data
+ showModal.value = unref(show)
+ // userList.value = multipleSelection
+ let userIdList: any[] = []
+ multipleSelection.value.forEach((i: { userId: any }) => {
+ // console.log(dataList.value)
+ userIdList.push(i.userId)
+ })
+ BPCSaveUser({
+ moduleId: flg.value,
+ userIdList: userIdList
+ })
+}
+const CloseThiss = (data: boolean) => {
+ showModal.value = data
+}
+
+const pickerOptions = {
+ disabledDate(time) {
+ return time.getTime() > Date.now()
+ },
+ shortcuts: [
+ {
+ text: '今天',
+ onClick(picker) {
+ picker.$emit('pick', new Date())
+ }
+ },
+ {
+ text: '昨天',
+ onClick(picker) {
+ const date = new Date()
+ date.setTime(date.getTime() - 3600 * 1000 * 24)
+ picker.$emit('pick', date)
+ }
+ },
+ {
+ text: '一周前',
+ onClick(picker) {
+ const date = new Date()
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
+ picker.$emit('pick', date)
+ }
+ }
+ ]
+}
@@ -433,23 +502,38 @@ async function getUser(moduleId: any) {
BCP内容管理
-
-
-
-
-
- BCP今日简报模块
-
-
-
- BCP今日简报新增
- 查看范围
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
-
-
-
- 运营守则模块
-
-
-
- 运营守则新增
- 查看范围
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
- 供方SCM模块
-
-
+
+
+
+ 供方SCM模块
+
+
-
- 供方SCM新增
- 查看范围
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
-
-
-
- BCP情报模块
-
-
-
- BCP情报新增
- 查看范围
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
-
-
-
- 底部滚动数据
-
-
-
- 底部滚动新增
- 查看范围
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
-
+
紧急
重点
New
-
+
-
+
-
+
选择文件
-
-
+
+
确认
@@ -639,15 +794,22 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
+
确认
@@ -658,15 +820,22 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
+
确认
@@ -677,17 +846,53 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
确认
@@ -697,23 +902,60 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
确认
-
+
@@ -733,4 +975,4 @@ async function getUser(moduleId: any) {
justify-content: center;
margin: 0 auto;
}
-
\ No newline at end of file
+
diff --git a/src/views/home/bcp/modify_new.vue b/src/views/home/bcp/modify_new.vue
index de6e678..2bc2760 100755
--- a/src/views/home/bcp/modify_new.vue
+++ b/src/views/home/bcp/modify_new.vue
@@ -6,8 +6,21 @@ import { useMessage, NModal } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
import Editor from '@/views/home/intelligence/components/TinyECE.vue'
+import { pickerOptions } from '@/utils/date'
-import { getBPCUser, BPCSaveUser, getBPCEditList,updateBPC,updateBPCOne,delBPCActList, delActCate, BPCDownload, getCateTreeList, getBPCActList, updateActCate } from '@/api/daikin/base'
+import {
+ getBPCUser,
+ BPCSaveUser,
+ getBPCEditList,
+ updateBPC,
+ updateBPCOne,
+ delBPCActList,
+ delActCate,
+ BPCDownload,
+ getCateTreeList,
+ getBPCActList,
+ updateActCate
+} from '@/api/daikin/base'
import { computed } from 'vue'
const editorContent = ref()
const handleEditorChild = (data: string) => {
@@ -30,7 +43,6 @@ const editC = ref()
const editD = ref()
const editE = ref()
-
const shomkA = ref(false)
const shomkB = ref(false)
const shomkC = ref(false)
@@ -42,8 +54,8 @@ async function setDataFiles(arr, _row) {
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
- file.name = file.originalFileName;
- });
+ file.name = file.originalFileName
+ })
}
return i
})
@@ -51,98 +63,111 @@ async function setDataFiles(arr, _row) {
}
function getFileName(url) {
- if (!url) return "";
- let lastSplashIndex = url.lastIndexOf("/");
- let lastDotIndex = url.lastIndexOf(".");
- return url.slice(lastSplashIndex + 1, lastDotIndex);
+ if (!url) return ''
+ let lastSplashIndex = url.lastIndexOf('/')
+ let lastDotIndex = url.lastIndexOf('.')
+ return url.slice(lastSplashIndex + 1, lastDotIndex)
}
async function getDataA() {
- const {rows: dataArr} = await getBPCActList({moduleId: 1,pageSize:100})
- dataA.value = dataArr.map(item => {
- return {
- ...item,
- fileName: item.fileName || getFileName(item.filePath),
- briefName: item.briefName || getFileName(item.briefingPath),
- }
- })
- setDataFiles(dataArr);
-}
-async function getDataB() {
- const {rows: dataBrr} = await getBPCActList({moduleId: 4,pageSize:100})
- dataB.value = dataBrr
- setDataFiles(dataBrr);
-}
-async function getDataC() {
- const {rows: dataCrr} = await getBPCActList({moduleId: 3,pageSize:100})
- dataC.value = dataCrr
- setDataFiles(dataCrr);
-}
-function computedTreeNode(item) {
- console.log(item);
- let childList = item.childList || []
- let fileList = item.fileList || [];
- item.childList = [].concat(childList).concat(fileList).map(item => {
+ const { rows: dataArr } = await getBPCActList({ moduleId: 1, pageSize: 100 })
+ dataA.value = dataArr.map((item) => {
return {
...item,
- name: item.name || item.title
+ fileName: item.fileName || getFileName(item.filePath),
+ briefName: item.briefName || getFileName(item.briefingPath)
}
- }).map(item => computedTreeNode(item));
- return item;
+ })
+ setDataFiles(dataArr)
+}
+async function getDataB() {
+ const { rows: dataBrr } = await getBPCActList({ moduleId: 4, pageSize: 100 })
+ dataB.value = dataBrr
+ setDataFiles(dataBrr)
+}
+async function getDataC() {
+ const { rows: dataCrr } = await getBPCActList({ moduleId: 3, pageSize: 100 })
+ dataC.value = dataCrr
+ setDataFiles(dataCrr)
+}
+function computedTreeNode(item) {
+ console.log(item)
+ let childList = item.childList || []
+ let fileList = item.fileList || []
+ item.childList = []
+ .concat(childList)
+ .concat(fileList)
+ .map((item) => {
+ return {
+ ...item,
+ name: item.name || item.title
+ }
+ })
+ .map((item) => computedTreeNode(item))
+ return item
}
async function getDataD() {
- const {data: dataDrr} = await getCateTreeList({});
- dataD.value = dataDrr.map(item => computedTreeNode(item));
- console.log(dataD);
- setDataFiles(dataDrr);
+ const { data: dataDrr } = await getCateTreeList({})
+ dataD.value = dataDrr.map((item) => computedTreeNode(item))
+ console.log(dataD)
+ setDataFiles(dataDrr)
}
async function getDataE() {
- const {rows: dataErr} = await getBPCEditList({moduleId: 5})
- dataE.value = dataErr
- setDataFiles(dataErr);
+ const { rows: dataErr } = await getBPCEditList({ moduleId: 5 })
+ dataE.value = dataErr
+ setDataFiles(dataErr)
}
onMounted(async () => {
- getDataA();
- getDataB();
- getDataC();
- getDataD();
-// getDataE();
+ getDataA()
+ getDataB()
+ getDataC()
+ getDataD()
+ // getDataE();
})
function computedName(title) {
- let index = title.indexOf(".");
+ let index = title.indexOf('.')
if (index > -1) {
- return title.slice(0, index - 1);
+ return title.slice(0, index - 1)
}
- return title;
+ return title
}
-async function onSubmitA(row: { jfileList ? : any; filePathList?: any; id?: any; indexId?: any; title?: any; proportion?: any; partSum?: any; badSum?: any }) {
+async function onSubmitA(row: {
+ jfileList?: any
+ filePathList?: any
+ id?: any
+ indexId?: any
+ title?: any
+ proportion?: any
+ partSum?: any
+ badSum?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
const { id, title, type, content } = row
- let moduleId = 1;
+ let moduleId = 1
let sendData: any[] = []
- let url: any[] =[]
- let obj = { id,moduleId };
+ let url: any[] = []
+ let obj = { id, moduleId }
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
-
- if(item.response) {
+ row.fileList.map((item) => {
+ if (item.response) {
url.push(item.response.url)
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
url.push(item.url)
- obj.title = title || computedName(item.originalFilename);
+ obj.title = title || computedName(item.originalFilename)
}
obj.filePath = url
sendData.push(obj)
})
- }
- else {
+ } else {
obj.title = title
- obj.filePath=[]
+ obj.filePath = []
sendData.push(obj)
}
// else {
@@ -151,13 +176,13 @@ async function onSubmitA(row: { jfileList ? : any; filePathList?: any; id?: any;
// }
if (row.jfileList && row.jfileList.length > 0) {
- sendData[0].briefingPath = row.jfileList[0].url || row.jfileList[0].response.url;
+ sendData[0].briefingPath = row.jfileList[0].url || row.jfileList[0].response.url
}
- let editorValue = content || editorContent.value;
+ let editorValue = content || editorContent.value
+ // lujinli
+ sendData[0].content = editorValue
+ console.log(sendData)
// lujinli
- sendData[0].content = editorValue;
-console.log(sendData)
-// lujinli
// if (editorValue) {
// // console.log(editorValue)
// sendData[0].content = editorValue;
@@ -166,31 +191,44 @@ console.log(sendData)
// message.error("内容字段为必填")
// return;
// }
- sendData[0].cateId = 0;
-var { code, msg } = await updateBPC(sendData[0])
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
+ sendData[0].cateId = 0
+ sendData[0].isPublish = row.isPublish
+ sendData[0].publishTime = row.publishTime
+ sendData[0].isTop = row.isTop
+ var { code, msg } = await updateBPC(sendData[0])
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
+ }
shomkA.value = false
- getDataA();
+ getDataA()
}
-async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
+async function onSubmitB(row: {
+ filePathList?: any
+ id?: any
+ cate?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
const { id, title, type } = row
- let moduleId = 4;
+ let moduleId = 4
let sendData = []
- let url: any[] =[]
- let obj
+ let url: any[] = []
+ let obj = {}
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- obj = { id, moduleId };
- if(item.response) {
+ row.fileList.map((item) => {
+ obj = { id, moduleId }
+ if (item.response) {
url.push(item.response.url)
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
url.push(item.url)
- obj.title = title || computedName(item.originalFilename);
+ obj.title = title || computedName(item.originalFilename)
}
// if(item.response){
// url.push(item.response.url)
@@ -198,67 +236,79 @@ async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?
// else{
// url.push(item.url)
// }
-
+
obj.filePath = url
-
+
// sendData.push(obj)
})
}
-
+ obj.isPublish = row.isPublish
+ obj.publishTime = row.publishTime
+ obj.isTop = row.isTop
+
var { code, msg } = await updateBPC(obj)
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
+ }
shomkB.value = false
- getDataB();
+ getDataB()
}
async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 3;
+ let moduleId = 3
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else message.error(msg)
+ if (code === 200) {
+ message.success('修改成功!')
+ } else message.error(msg)
shomkC.value = false
getDataC()
}
-async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
+async function onSubmitD(row: {
+ filePathList?: any
+ id?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
const { id, title, type, pid } = row
- let moduleId = 4;
+ let moduleId = 4
let sendData = []
- let url: any[] =[]
- let obj
+ let url: any[] = []
+ let obj
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- obj ={ id, status, moduleId, cateId: pid };
- if(item.response) {
+ row.fileList.map((item) => {
+ obj = { id, status, moduleId, cateId: pid }
+ if (item.response) {
url.push(item.response.url)
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
url.push(item.url)
- obj.title = title || computedName(item.originalFilename);
+ obj.title = title || computedName(item.originalFilename)
}
// if(item.response){
// url.push(item.response.url)
@@ -266,17 +316,21 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
// else{
// url.push(item.url)
// }
-
+
obj.filePath = url
-
+
// sendData.push(obj)
})
}
+ obj.isPublish = row.isPublish
+ obj.publishTime = row.publishTime
+ obj.isTop = row.isTop
// if(type == 'add') {
- var { code, msg } = await updateBPC(obj)
+ var { code, msg } = await updateBPC(obj)
// }
- if (code === 200) { message.success("修改成功!") }
- else {
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
message.error(msg)
}
shomkD.value = false
@@ -284,70 +338,76 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
}
async function onSubmitE(row: { filePathList?: any; id?: any; title?: any }) {
const { id, title, type } = row
- let moduleId = 5;
+ let moduleId = 5
let sendData = []
if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
- let obj = { id, status, moduleId };
- if(item.response) {
- obj.filePath = item.response.url;
- obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- obj.filePath = item.url;
- obj.title = title || computedName(item.originalFilename);
+ row.fileList.map((item) => {
+ let obj = { id, status, moduleId }
+ if (item.response) {
+ obj.filePath = item.response.url
+ obj.title = title || computedName(item.response.originalFilename)
+ } else {
+ obj.filePath = item.url
+ obj.title = title || computedName(item.originalFilename)
}
sendData.push(obj)
})
}
-
- if(type == 'add') {
+
+ if (type == 'add') {
var { code, msg } = await updateBPC(sendData)
- }else {
+ } else {
var { code, msg } = await updateBPCOne(sendData[0])
}
- if (code === 200) { message.success("修改成功!") }
- else {
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
message.error(msg)
}
shomkE.value = false
getDataE()
}
-
const handleEditA = (type: string, row: any) => {
- console.log("xiaolu");
- console.log(row,"xiaolu");
-
+ console.log('xiaolu')
+ console.log(row, 'xiaolu')
+
editA.value = {
type: type,
// status: '紧急',
title: '',
- content: "",
+ content: '',
fileList: [],
jfileList: []
}
shomkA.value = true
if (!row) return
editA.value = row
- editA.value.type = type;
- console.log(editA.value,"xiaolu")
- if(row.filePath!=''){
- editA.value.fileList = [{
- name: getFileName(row.filePath),
- originalFilename: row.filePath,
- url: row.filePath,
- }]
- console.log(editA.value,"xiaolu")
+ editA.value.type = type
+ console.log(editA.value, 'xiaolu')
+ if (row.filePath != '') {
+ editA.value.fileList = [
+ {
+ name: getFileName(row.filePath),
+ originalFilename: row.filePath,
+ url: row.filePath
+ }
+ ]
+ console.log(editA.value, 'xiaolu')
}
- if(row.briefingPath!=''){
- editA.value.jfileList = [{
- name: getFileName(row.briefingPath),
- originalFilename: getFileName(row.briefingPath),
- url: row.briefingPath,
- }]
- console.log(editA.value,"xiaolu")
+ if (row.briefingPath != '') {
+ editA.value.jfileList = [
+ {
+ name: getFileName(row.briefingPath),
+ originalFilename: getFileName(row.briefingPath),
+ url: row.briefingPath
+ }
+ ]
+ console.log(editA.value, 'xiaolu')
}
+ editA.value.isPublish = row.isPublish
+ editA.value.publishTime = row.publishTime
+ editA.value.isTop = row.isTop
// BPCDownload({ id: row.id }).then(res => {
// editA.value.fileList = [res.data]
@@ -357,17 +417,22 @@ const handleEditB = (type: string, row: any) => {
editB.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkB.value = true
if (!row) return
editB.value = row
- editB.value.type = type;
- editB.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editB.value.type = type
+ editB.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
+ editB.value.isPublish = row.isPublish
+ editB.value.publishTime = row.publishTime
+ editB.value.isTop = row.isTop
// editB.value.fileList = [row.filePath]
// BPCDownload({ id: row.id }).then(res => {
// editB.value.fileList = [res.data]
@@ -377,58 +442,64 @@ const handleEditC = (type: string, row: any) => {
editC.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkC.value = true
if (!row) return
editC.value = row
- editC.value.type = type;
- editC.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editC.value.type = type
+ editC.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
+ // editC.value.isPublish = row.isPublish
+ // editC.value.publishTime = row.publishTime
+ // editC.value.isTop = row.isTop
// editC.value.fileList = [row.filePath]
// BPCDownload({ id: row.id }).then(res => {
// editC.value.fileList = [res.data]
// })
}
// todo
-const editTreeD = ref();
-const shomTreekD = ref();
+const editTreeD = ref()
+const shomTreekD = ref()
const handleTreeEditD = (type, row) => {
- editTreeD.value = {
- name: ''
- }
- shomTreekD.value = true
- if (!row) return
- editTreeD.value = row
+ editTreeD.value = {
+ name: ''
+ }
+ shomTreekD.value = true
+ if (!row) return
+ editTreeD.value = row
}
const addSubD = (type, row) => {
- editTreeD.value = {
- name: '',
- pid: row.id
- }
- shomTreekD.value = true
+ editTreeD.value = {
+ name: '',
+ pid: row.id
+ }
+ shomTreekD.value = true
}
-const onSubmitTreeD = async(row) => {
+const onSubmitTreeD = async (row) => {
const { id, name, pid = 0 } = row
let sendData = { pid, id, name }
-
- var { code, msg } = await updateActCate(sendData);
- if (code === 200) { message.success("修改成功!") }
- else {
+
+ var { code, msg } = await updateActCate(sendData)
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
message.error(msg)
}
shomTreekD.value = false
getDataD()
}
-const handleEditSubD = async(typ,row) => {
+const handleEditSubD = async (typ, row) => {
editD.value = {
pid: row.id,
- title: "",
+ title: '',
fileList: [],
- type:typ
+ type: typ
}
shomkD.value = true
}
@@ -436,17 +507,22 @@ const handleEditD = (type: string, row: any) => {
editD.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkD.value = true
if (!row) return
editD.value = row
- editD.value.type = type;
- editD.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editD.value.type = type
+ editD.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
+ editD.value.isPublish = row.isPublish
+ editD.value.publishTime = row.publishTime
+ editD.value.isTop = row.isTop
// BPCDownload({ id: row.id }).then(res => {
// editD.value.fileList = [res.data]
// })
@@ -455,107 +531,123 @@ const handleEditE = (type: string, row: any) => {
editE.value = {
type: type,
title: '',
- fileList: [],
+ fileList: []
}
shomkE.value = true
if (!row) return
editE.value = row
- editE.value.type = type;
- editE.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
+ editE.value.type = type
+ editE.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
// BPCDownload({ id: row.id }).then(res => {
// editE.value.fileList = [res.data]
// })
}
-
async function handleDeleteA(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataA();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataA()
}
async function handleDeleteB(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
-
- getDataB();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+
+ getDataB()
}
async function handleDeleteC(index: number, row: any) {
-
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
getDataC()
}
async function handleDeleteD(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataD();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataD()
}
async function handleTreeDeleteD(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delActCate({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataD();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataD()
}
async function handleDeleteE(index: number, row: any) {
const { id } = row
if (!id) return
const { code, msg } = await delBPCActList({ id })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataE();
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataE()
}
-const activeName = ref("first")
+const activeName = ref('first')
const userList = ref()
const showModal = ref(false)
const flg = ref()
-const setUserList =ref()
+const setUserList = ref()
async function getUser(moduleId: any) {
showModal.value = !showModal.value
flg.value = moduleId
- const {data: userArr} = await getBPCUser({moduleId})
+ const { data: userArr } = await getBPCUser({ moduleId })
setUserList.value = userArr
-
}
- // 获取子组件传过来的值
- const handleChild = (data: any) => {
- console.log(data, 444);
- const { showModal: show, multipleSelection } = data
- showModal.value = unref(show)
- // userList.value = multipleSelection
- let userIdList: any[] =[]
- multipleSelection.value.forEach((i: { userId: any })=>{
- // console.log(dataList.value)
- userIdList.push(i.userId)
- })
-
- BPCSaveUser({
- moduleId: flg.value,
- userIdList: userIdList
- })
- }
- const CloseThiss = (data: boolean)=>{
- showModal.value = data
- }
+// 获取子组件传过来的值
+const handleChild = (data: any) => {
+ console.log(data, 444)
+ const { showModal: show, multipleSelection } = data
+ showModal.value = unref(show)
+ // userList.value = multipleSelection
+ let userIdList: any[] = []
+ multipleSelection.value.forEach((i: { userId: any }) => {
+ // console.log(dataList.value)
+ userIdList.push(i.userId)
+ })
+ BPCSaveUser({
+ moduleId: flg.value,
+ userIdList: userIdList
+ })
+}
+const CloseThiss = (data: boolean) => {
+ showModal.value = data
+}
@@ -568,54 +660,83 @@ async function getUser(moduleId: any) {
BCP内容管理
-
-
-
-
+
+
+
+
+ BCP信息模块
+
+
+
+ 新增
+ 查看范围
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
- BCP信息模块
-
-
-
- 新增
- 查看范围
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
-
- 运营守则模块
-
-
-
- 运营守则新增
- 查看范围
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
-
-
- BCP情报模块
-
-
-
- 新增分类
- 查看范围
-
-
-
-
-
- 新增文件
- 新增子级
- 编辑
- 编辑
- 删除
- 删除
-
-
-
-
-
+
+
+
+ BCP情报模块
+
+
+
+ 新增分类
+ 查看范围
+
+
+
+
+
+ 新增文件
+ 新增子级
+ 编辑
+ 编辑
+ 删除
+ 删除
+
+
+
+
+
-
-
-
- 底部滚动数据
-
-
-
- 底部滚动新增
- 查看范围
-
-
-
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
-
-
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
@@ -747,49 +928,138 @@ async function getUser(moduleId: any) {
New
-->
-
-
+
+
-
-
+
+
-
+
-
+
选择文件
-
+
-
+
+
选择文件
+
+
+
+
+
+
+ (editA.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
-
+
+
确认
-
-
+
+
-
+
-
+
选择文件
+
+
+
+
+
+
+ (editB.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
+
确认
@@ -800,15 +1070,8 @@ async function getUser(moduleId: any) {
-
-
-
- 选择文件
-
-
-
+
确认
@@ -819,30 +1082,72 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
+
+
+
+
+
+
+ (editD.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
-
+
+
确认
-
+
-
-
- 确认
+
+
+ 确认
@@ -851,23 +1156,29 @@ async function getUser(moduleId: any) {
-
+
-
+
选择文件
-
-
-
+
+
确认
-
+
@@ -887,4 +1198,4 @@ async function getUser(moduleId: any) {
justify-content: center;
margin: 0 auto;
}
-
\ No newline at end of file
+
diff --git a/src/views/home/components/New.vue b/src/views/home/components/New.vue
index 6e3ad21..7f20a5d 100755
--- a/src/views/home/components/New.vue
+++ b/src/views/home/components/New.vue
@@ -195,11 +195,11 @@ fetchNewDataList()
最近更新
-
+
{
const csrSupplierList = ref([])
const selMonth = ref('')
const getCsrSupplierList = (index?: any) => {
- const month = index || index === 0 ? query.value.year + '-' + months[index] : ''
+ const _m = +months[index]
+ const month =
+ index || index === 0
+ ? (_m < 4 ? +query.value.year + 1 : query.value.year) + '-' + months[index]
+ : ''
csrSupplierList.value = []
selMonth.value = ''
const req = { pageNum: 1, pageSize: 10, ...query.value, month }
+ req.year = _m < 4 ? +req.year + 1 : req.year
req.supplierName
? fetchCsrSupplierList(req).then((res: any) => {
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
})
- : fetchCsrSupplierTopList(req).then((res: any) => {
+ : fetchCsrSupplierTopList({ ...req }).then((res: any) => {
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
})
- selMonth.value = month ? +months[index] + '月' : ''
+ selMonth.value = month ? months[index] : ''
}
const getCsrSupplierTaskInfo = () => {
@@ -326,7 +331,9 @@ getCsrSupplierTaskInfo()
-
未提交供应商明细({{ query.year }}年{{ selMonth }})
+
+ 未提交供应商明细({{ +selMonth < 4 ? +query.year + 1 : query.year }}年{{ selMonth }}月)
+
更新时间:{{ updateTime }}
diff --git a/src/views/home/csr/modifyCSR2.vue b/src/views/home/csr/modifyCSR2.vue
index 22d9348..5628fb5 100755
--- a/src/views/home/csr/modifyCSR2.vue
+++ b/src/views/home/csr/modifyCSR2.vue
@@ -1,281 +1,280 @@
-
+
-
-
-
-
- 返回
-
-
-
- 新增
-
+
+
+
+
+ 返回
+
+
+ 新增
- {{ userData ? '已设置' : '查看范围设置' }}
+ {{ userData ? '已设置' : '查看范围设置' }}
-
-
-
-
-
-
-
![]()
-
-
-
+
+
+
+
+
+
+
![]()
+
+
+
-
-
- {{ i.originalFileName }}
-
-
-
-
-
- 编辑
+
+
+ {{ i.originalFileName }}
+
+
+
+
+
+ 编辑
-
- 删除
-
-
-
-
-
-
-
- 新增
-
+
+ 删除
+
+
+
+
+
+
+ 新增
- {{ userData ? '已设置' : '查看范围设置' }}
+ {{ userData ? '已设置' : '查看范围设置' }}
-
-
-
-
-
-
-
- {{ i.originalFileName }}
-
-
-
-
-
- 编辑
+
+
+
+
+ {{ i.originalFileName }}
+
+
+
+
+
+ 编辑
-
- 删除
-
-
-
-
-
-
-
+
+ 删除
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
- 选择文件
-
-
-
-
-
- 确认
-
-
-
-
+
+
+ 选择文件
+
+
+
+
+ 确认
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
- 选择文件
-
-
-
-
-
- 确认
-
-
-
-
+
+
+ 选择文件
+
+
+
+
+
+
+
+
+ (editB.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
+
+
+ 确认
+
+
+
+
-
-
-
+
+
+
diff --git a/src/views/home/database/modify.vue b/src/views/home/database/modify.vue
index fea8a2b..9734e07 100755
--- a/src/views/home/database/modify.vue
+++ b/src/views/home/database/modify.vue
@@ -393,6 +393,40 @@
+
+
+
+
+
+ (editB.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
+
确认
@@ -465,6 +499,7 @@ import {
import { NModal, useMessage, NSelect } from 'naive-ui'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
import { databaseld } from '@/stores/modules/database'
+import { pickerOptions } from '@/utils/date'
const { push } = useRouter()
const database = databaseld()
diff --git a/src/views/home/diffspace/fack.vue b/src/views/home/diffspace/fack.vue
index af19feb..1c31360 100755
--- a/src/views/home/diffspace/fack.vue
+++ b/src/views/home/diffspace/fack.vue
@@ -225,6 +225,40 @@
选择文件
+
+
+
+
+
+
+ (editC.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
@@ -342,6 +376,40 @@
选择文件
+
+
+
+
+
+
+ (editA.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
@@ -394,6 +462,40 @@
选择文件
+
+
+
+
+
+
+ (editB.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
@@ -420,6 +522,7 @@ import ModifyList from './component/modify.vue'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
const ids = ref('')
const { push } = useRouter()
+import { pickerOptions } from '@/utils/date'
const store = useUserStore()
const message = useMessage()
@@ -632,6 +735,9 @@ async function onSubmitB(row: {
time: string
files: never[]
fileList: never[]
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
}) {
// console.log(dataB.value, row.id)
dataB.value.map((obj) => {
diff --git a/src/views/home/diffspace/modifys.vue b/src/views/home/diffspace/modifys.vue
index d05a6cd..343ba50 100755
--- a/src/views/home/diffspace/modifys.vue
+++ b/src/views/home/diffspace/modifys.vue
@@ -1,9 +1,20 @@
-
-
+
@@ -345,7 +401,6 @@ const handleCurrentChange=(e)=>{
{{ it.name }}
-
@@ -375,16 +430,17 @@ const handleCurrentChange=(e)=>{
-
-
-
-
-
-
+
+
+
-
@@ -394,26 +450,72 @@ const handleCurrentChange=(e)=>{
外部调研报告
-
+
-
+
-
+
-
+
-
+
选择文件
-
+
+
+
+
+
+
+ (editList.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
+
确认
@@ -430,4 +532,4 @@ const handleCurrentChange=(e)=>{
right: 30px;
top: -92px;
}
-
\ No newline at end of file
+
diff --git a/src/views/home/intelligence/components/InfosEdit.vue b/src/views/home/intelligence/components/InfosEdit.vue
index 73ac361..9774fa2 100755
--- a/src/views/home/intelligence/components/InfosEdit.vue
+++ b/src/views/home/intelligence/components/InfosEdit.vue
@@ -21,6 +21,7 @@ import {
import { saveArticle, trendsDetail } from '@/api/daikin/base'
import Editor from '../components/TinyECE.vue'
import { useUserStore } from '@/stores/modules/user'
+import { pickerOptions } from '@/utils/date'
import { useRoute } from 'vue-router'
const { day, week } = useDate()
const { push } = useRouter()
@@ -172,7 +173,7 @@ async function save() {
})
}
- const { title, tag, source, cate, type } = formValue.value
+ const { title, tag, source, cate, type, isTop, isPublish, publishTime } = formValue.value
console.log(cate)
const { msg, code } = await saveArticle({
title,
@@ -183,7 +184,10 @@ async function save() {
type,
content,
bannerImg,
- userIdList
+ userIdList,
+ isTop,
+ isPublish,
+ publishTime
})
if (code === 200) {
message.success('新增成功')
@@ -370,6 +374,37 @@ const handleClose = (tag: any) => {
{{ i.nickName }}
+
+
+
+
+ (formValue.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
文本内容预览
diff --git a/src/views/home/intelligence/process/ProcessInfo.vue b/src/views/home/intelligence/process/ProcessInfo.vue
index 071f044..ab2712a 100755
--- a/src/views/home/intelligence/process/ProcessInfo.vue
+++ b/src/views/home/intelligence/process/ProcessInfo.vue
@@ -6,6 +6,7 @@ import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import UserPage from './UserPages.vue'
import { useDate } from '@/views/home/hooks/useDate'
import { getArticleDetail, review } from '@/api/daikin/base'
+import { pickerOptions } from '@/utils/date'
import {
NModal,
NCard,
@@ -59,6 +60,8 @@ let formValue: any = ref({
source: '',
content: '',
isTop: 'N',
+ isPublish: 0,
+ publishTime: '',
bannerImg: ''
})
@@ -422,6 +425,37 @@ const showModalRefs = ref(false)
{{ i.nickName }}
+
+
+ (formValue.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
diff --git a/src/views/home/market/modify.vue b/src/views/home/market/modify.vue
index c5bd507..c9a64e7 100755
--- a/src/views/home/market/modify.vue
+++ b/src/views/home/market/modify.vue
@@ -5,8 +5,9 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
import { useMessage, NModal } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
+import { pickerOptions } from '@/utils/date'
-import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
+import { getList, marketPreDelete, marketPreADD } from '@/api/daikin/base'
const message = useMessage()
const store = useUserStore()
@@ -15,7 +16,6 @@ const header = { 'token': store.user.token }
const dataA = ref([])
const editA = ref()
-
const shomkA = ref(false)
async function setDataFiles(arr, _row) {
@@ -23,136 +23,155 @@ async function setDataFiles(arr, _row) {
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
- file.name = file.originalFileName;
- });
+ file.name = file.originalFileName
+ })
}
return i
})
}
}
-const type =ref(2)
+const type = ref(2)
async function getDataA() {
- const {data} = await getList({type:2})
- dataA.value = data
- // setDataFiles(dataArr);
+ const { data } = await getList({ type: 2 })
+ dataA.value = data
+ // setDataFiles(dataArr);
}
-
onMounted(async () => {
- getDataA();
+ getDataA()
})
function computedName(title) {
- let index = title.indexOf(".");
+ let index = title.indexOf('.')
if (index > -1) {
- return title.slice(0, index - 1);
+ return title.slice(0, index - 1)
}
- return title;
+ return title
}
-async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
+async function onSubmitA(row: {
+ id: any
+ fileList?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
console.log(row, 555)
- const { id, title } = row
+ const { id, title, isTop, isPublish, publishTime } = row
// let moduleId = 1;
- let sendData= {}
- if(!row.id){
- sendData = { title,type:type.value,userIdList:userData.value };
- if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
-
- if(item.response) {
- sendData.filePath = item.response.url;
- // obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- sendData.filePath = item.url;
- // obj.title = title || computedName(item.originalFilename);
- }
-
- })
+ let sendData = {}
+ if (!row.id) {
+ sendData = {
+ title,
+ type: type.value,
+ userIdList: userData.value,
+ isTop,
+ isPublish,
+ publishTime
+ }
+ if (row.fileList && row.fileList.length > 0) {
+ row.fileList.map((item) => {
+ if (item.response) {
+ sendData.filePath = item.response.url
+ // obj.title = title || computedName(item.response.originalFilename);
+ } else {
+ sendData.filePath = item.url
+ // obj.title = title || computedName(item.originalFilename);
+ }
+ })
+ }
+ } else {
+ sendData = {
+ id,
+ title,
+ type: type.value,
+ userIdList: userData.value,
+ isTop,
+ isPublish,
+ publishTime
+ }
+ }
+ console.log(sendData)
+ const { code, msg } = await marketPreADD(sendData)
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
}
-}
-else{
- sendData = {id, title,type:type.value,userIdList:userData.value };
-}
-console.log(sendData)
-const {code,msg} = await marketPreADD(sendData)
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
shomkA.value = false
- getDataA();
+ getDataA()
}
-
-
const handleEditA = (type: string, row: any) => {
console.log(row)
editA.value = {
title: '',
- fileList: [],
+ fileList: []
}
- setUserList.value =[]
+ setUserList.value = []
shomkA.value = true
if (!row) return
editA.value = row
- editA.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
- setUserList.value =row.userIdList
+ editA.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
+ setUserList.value = row.userIdList
}
-
async function handleDeleteA(index: number, row: any) {
const { id } = row
if (!id) return
- const { code, msg } = await marketPreDelete({ id,type:type.value })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataA();
+ const { code, msg } = await marketPreDelete({ id, type: type.value })
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataA()
}
-
-const activeName = ref("first")
+const activeName = ref('first')
const userList = ref()
const showModal = ref(false)
const flg = ref()
-const setUserList =ref()
+const setUserList = ref()
async function getUser(row) {
console.log(row)
showModal.value = !showModal.value
flg.value = row
- if(row.id&&row.userIdList){
+ if (row.id && row.userIdList) {
setUserList.value = row.userIdList
}
// const {data: userArr} = await getBPCUser({moduleId})
// setUserList.value = userArr
-
}
- // 获取子组件传过来的值
- const userData = ref()
- const handleChild = (data: any) => {
- console.log(data, 444);
- const { showModal: show, multipleSelection } = data
- showModal.value = unref(show)
- let userIdList: any[] =[]
- multipleSelection.value.forEach((i: { userId: any })=>{
- userIdList.push(i.userId)
- })
- if(flg.value.id){
- flg.value.userIdList = userIdList
- marketPreADD(flg.value)
- getDataA();
- console.log(flg.value)
- }
- userData.value = userIdList
+// 获取子组件传过来的值
+const userData = ref()
+const handleChild = (data: any) => {
+ console.log(data, 444)
+ const { showModal: show, multipleSelection } = data
+ showModal.value = unref(show)
+ let userIdList: any[] = []
+ multipleSelection.value.forEach((i: { userId: any }) => {
+ userIdList.push(i.userId)
+ })
+ if (flg.value.id) {
+ flg.value.userIdList = userIdList
+ marketPreADD(flg.value)
+ getDataA()
+ console.log(flg.value)
}
- const CloseThiss = (data: boolean)=>{
- showModal.value = data
- }
-
+ userData.value = userIdList
+}
+const CloseThiss = (data: boolean) => {
+ showModal.value = data
+}
@@ -165,16 +184,25 @@ async function getUser(row) {
汇率内容管理
-
-
- 汇率内容新增
-
-
-
-
-
+
+
-
-
-
- {{it.nickName}}
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
+
+
+
+
+ {{ it.nickName }}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
@@ -212,30 +242,71 @@ async function getUser(row) {
New
-->
-
+
-
+
- 设置
+ 设置
-
+
-
+
选择文件
+
+
+
+
+
+
+ (editA.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
-
+
+
确认
-
+
@@ -255,4 +326,4 @@ async function getUser(row) {
justify-content: center;
margin: 0 auto;
}
-
\ No newline at end of file
+
diff --git a/src/views/home/market/modifys.vue b/src/views/home/market/modifys.vue
index f595943..e0c3f33 100755
--- a/src/views/home/market/modifys.vue
+++ b/src/views/home/market/modifys.vue
@@ -5,8 +5,8 @@ import HomeHead from '@/views/home/components/HomeHead.vue'
import { useMessage, NModal } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
-
-import { getList, marketPreDelete,marketPreADD } from '@/api/daikin/base'
+import { pickerOptions } from '@/utils/date'
+import { getList, marketPreDelete, marketPreADD } from '@/api/daikin/base'
const message = useMessage()
const store = useUserStore()
@@ -15,7 +15,6 @@ const header = { 'token': store.user.token }
const dataA = ref([])
const editA = ref()
-
const shomkA = ref(false)
async function setDataFiles(arr, _row) {
@@ -23,135 +22,154 @@ async function setDataFiles(arr, _row) {
arr.value = _row.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
- file.name = file.originalFileName;
- });
+ file.name = file.originalFileName
+ })
}
return i
})
}
}
-const type =ref(1)
+const type = ref(1)
async function getDataA() {
- const {data} = await getList({type:1})
- dataA.value = data
- // setDataFiles(dataArr);
+ const { data } = await getList({ type: 1 })
+ dataA.value = data
+ // setDataFiles(dataArr);
}
-
onMounted(async () => {
- getDataA();
+ getDataA()
})
function computedName(title) {
- let index = title.indexOf(".");
+ let index = title.indexOf('.')
if (index > -1) {
- return title.slice(0, index - 1);
+ return title.slice(0, index - 1)
}
- return title;
+ return title
}
-async function onSubmitA(row: { id: any; fileList?: any; title?: any }) {
+async function onSubmitA(row: {
+ id: any
+ fileList?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
console.log(row, 555)
- const { id, title } = row
+ const { id, title, isTop, isPublish, publishTime } = row
// let moduleId = 1;
- let sendData= {}
- if(!row.id){
- sendData = { title,type:type.value,userIdList:userData.value };
- if (row.fileList && row.fileList.length > 0) {
- row.fileList.map(item => {
-
- if(item.response) {
- sendData.filePath = item.response.url;
- // obj.title = title || computedName(item.response.originalFilename);
- }
- else {
- sendData.filePath = item.url;
- // obj.title = title || computedName(item.originalFilename);
- }
-
- })
+ let sendData = {}
+ if (!row.id) {
+ sendData = {
+ title,
+ type: type.value,
+ userIdList: userData.value,
+ isTop,
+ isPublish,
+ publishTime
+ }
+ if (row.fileList && row.fileList.length > 0) {
+ row.fileList.map((item) => {
+ if (item.response) {
+ sendData.filePath = item.response.url
+ // obj.title = title || computedName(item.response.originalFilename);
+ } else {
+ sendData.filePath = item.url
+ // obj.title = title || computedName(item.originalFilename);
+ }
+ })
+ }
+ } else {
+ sendData = {
+ id,
+ title,
+ type: type.value,
+ userIdList: userData.value,
+ isTop,
+ isPublish,
+ publishTime
+ }
+ }
+ console.log(sendData)
+ const { code, msg } = await marketPreADD(sendData)
+ if (code === 200) {
+ message.success('修改成功!')
+ } else {
+ message.error(msg)
}
-}
-else{
- sendData = {id, title,type:type.value,userIdList:userData.value };
-}
-console.log(sendData)
-const {code,msg} = await marketPreADD(sendData)
- if (code === 200) { message.success("修改成功!") }
- else { message.error(msg) }
shomkA.value = false
- getDataA();
+ getDataA()
}
-
-
const handleEditA = (type: string, row: any) => {
console.log(row)
editA.value = {
title: '',
- fileList: [],
+ fileList: []
}
- setUserList.value =[]
+ setUserList.value = []
shomkA.value = true
if (!row) return
editA.value = row
- editA.value.fileList = [{
- name: row.title,
- originalFilename: row.title,
- url: row.filePath,
- }]
- setUserList.value =row.userIdList
+ editA.value.fileList = [
+ {
+ name: row.title,
+ originalFilename: row.title,
+ url: row.filePath
+ }
+ ]
+ setUserList.value = row.userIdList
}
-
async function handleDeleteA(index: number, row: any) {
const { id } = row
if (!id) return
- const { code, msg } = await marketPreDelete({ id,type:type.value })
- if (code === 200) { message.success("删除成功!") }
- else { message.error(msg) }
- getDataA();
+ const { code, msg } = await marketPreDelete({ id, type: type.value })
+ if (code === 200) {
+ message.success('删除成功!')
+ } else {
+ message.error(msg)
+ }
+ getDataA()
}
-
-const activeName = ref("first")
+const activeName = ref('first')
const userList = ref()
const showModal = ref(false)
const flg = ref()
-const setUserList =ref()
+const setUserList = ref()
async function getUser(row) {
console.log(row)
showModal.value = !showModal.value
flg.value = row
- if(row.id&&row.userIdList){
+ if (row.id && row.userIdList) {
setUserList.value = row.userIdList
}
// const {data: userArr} = await getBPCUser({moduleId})
// setUserList.value = userArr
-
}
- // 获取子组件传过来的值
- const userData = ref()
- const handleChild = (data: any) => {
- console.log(data, 444);
- const { showModal: show, multipleSelection } = data
- showModal.value = unref(show)
- let userIdList: any[] =[]
- multipleSelection.value.forEach((i: { userId: any })=>{
- userIdList.push(i.userId)
- })
- if(flg.value.id){
- flg.value.userIdList = userIdList
- console.log(flg.value)
- marketPreADD(flg.value)
- }
- userData.value = userIdList
+// 获取子组件传过来的值
+const userData = ref()
+const handleChild = (data: any) => {
+ console.log(data, 444)
+ const { showModal: show, multipleSelection } = data
+ showModal.value = unref(show)
+ let userIdList: any[] = []
+ multipleSelection.value.forEach((i: { userId: any }) => {
+ userIdList.push(i.userId)
+ })
+ if (flg.value.id) {
+ flg.value.userIdList = userIdList
+ console.log(flg.value)
+ marketPreADD(flg.value)
}
- const CloseThiss = (data: boolean)=>{
- showModal.value = data
- }
-
+ userData.value = userIdList
+}
+const CloseThiss = (data: boolean) => {
+ showModal.value = data
+}
@@ -164,16 +182,25 @@ async function getUser(row) {
市况内容管理
-
-
- 市况内容新增
-
-
-
-
-
+
+
-
-
-
- {{it.nickName}}
-
-
-
-
- 编辑
- 删除
-
-
-
-
-
-
+
+
+
+ {{ it.nickName }}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
@@ -211,30 +240,71 @@ async function getUser(row) {
New
-->
-
+
-
+
- 设置
+ 设置
-
+
-
+
选择文件
+
+
+
+
+
+
+ (editA.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
-
+
+
确认
-
+
@@ -254,4 +324,4 @@ async function getUser(row) {
justify-content: center;
margin: 0 auto;
}
-
\ No newline at end of file
+
diff --git a/src/views/home/quality/modify.vue b/src/views/home/quality/modify.vue
index 1954836..9b89134 100755
--- a/src/views/home/quality/modify.vue
+++ b/src/views/home/quality/modify.vue
@@ -22,6 +22,7 @@ import {
badartGetUser,
badartAddUser
} from '@/api/daikin/base'
+import { pickerOptions } from '@/utils/date'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
const message = useMessage()
const store = useUserStore()
@@ -123,9 +124,13 @@ async function onSubmitA(row: {
proportion?: any
partSum?: any
badSum?: any
+ monthDate?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
}) {
console.log(row)
- const { id, indexId, title, partSum, badSum, monthDate } = row
+ const { id, indexId, title, partSum, badSum, monthDate, isTop, isPublish, publishTime } = row
let filePathArr = []
if (row.fileList && row.fileList.length > 0) {
@@ -146,7 +151,10 @@ async function onSubmitA(row: {
badSum,
filePath,
cate,
- monthDate: time
+ monthDate: time,
+ isTop,
+ isPublish,
+ publishTime
})
if (code === 200) {
message.success('修改成功!')
@@ -157,8 +165,16 @@ async function onSubmitA(row: {
gettopList()
}
-async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
- const { id, cate, title } = row
+async function onSubmitB(row: {
+ filePathList?: any
+ id?: any
+ cate?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
+ const { id, cate, title, isTop, isPublish, publishTime } = row
let filePathArr = []
if (row.fileList && row.fileList.length > 0) {
@@ -169,7 +185,15 @@ async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?
}
let filePath = filePathArr.join(',')
- const { code, msg } = await badartAdd({ id, cate, title, filePath })
+ const { code, msg } = await badartAdd({
+ id,
+ cate,
+ title,
+ filePath,
+ isTop,
+ isPublish,
+ publishTime
+ })
if (code === 200) {
message.success('修改成功!')
} else {
@@ -180,9 +204,17 @@ async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?
getbadartList()
}
-async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; title?: any }) {
+async function onSubmitC(row: {
+ filePathList?: any
+ id?: any
+ source?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
console.log(row)
- const { id, source, title } = row
+ const { id, source, title, isTop, isPublish, publishTime } = row
let filePathArr = []
if (row.fileList && row.fileList.length > 0) {
@@ -193,16 +225,31 @@ async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; titl
}
let filePath = filePathArr.join(',')
- const { code, msg } = await highAdd({ id, source, title, filePath })
+ const { code, msg } = await highAdd({
+ id,
+ source,
+ title,
+ filePath,
+ isTop,
+ isPublish,
+ publishTime
+ })
if (code === 200) {
message.success('修改成功!')
} else message.error(msg)
shomkC.value = false
gethighList()
}
-async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
+async function onSubmitD(row: {
+ filePathList?: any
+ id?: any
+ title?: any
+ isTop?: any
+ isPublish?: any
+ publishTime?: any
+}) {
console.log(row)
- const { id, title } = row
+ const { id, title, isTop, isPublish, publishTime } = row
let filePathArr = []
if (row.fileList && row.fileList.length > 0) {
@@ -213,7 +260,7 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
}
let filePath = filePathArr.join(',')
- const { code, msg } = await actAdd({ id, title, filePath })
+ const { code, msg } = await actAdd({ id, title, filePath, isTop, isPublish, publishTime })
if (code === 200) {
message.success('修改成功!')
} else {
@@ -681,6 +728,40 @@ const CloseThiss = (data: any) => {
+
+
+
+
+
+
+ (editA.publishTime = val ? pickerOptions.day : '')"
+ >
+
+
+
+
+
+
-
+
+

个人日程