main
wwl 2024-04-24 11:11:04 +08:00
parent 6537b15aca
commit 3734a770dd
6 changed files with 2358 additions and 2335 deletions

View File

@ -1050,6 +1050,19 @@ export async function marketPreADD(data: any) {
export async function badartAdd(data: any) { export async function badartAdd(data: any) {
return http.post(`/quality/badartAdd`, data) return http.post(`/quality/badartAdd`, data)
} }
/**---
*
* http://127.0.0.1:8811/openApi/quality/badartAdd
*/
export async function badartAddUser(data: any) {
return http.post(`/quality/addUser`, data)
}
/**-
* http://127.0.0.1:8811/openApi/quality/badartDel?id=3
*/
export async function badartGetUser(params: { indexId: any }) {
return http.get(`/quality/getUser`, { params })
}
/**- /**-
* http://127.0.0.1:8811/openApi/quality/badartDel?id=3 * http://127.0.0.1:8811/openApi/quality/badartDel?id=3
*/ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,6 @@ async function getTree() {
if (data && data != 'null' && data.length > 0) { if (data && data != 'null' && data.length > 0) {
treeData.value = data treeData.value = data
} }
console.log(data)
} }
const props = defineProps({ const props = defineProps({
@ -67,11 +66,13 @@ async function getUserPage() {
}, 150) }, 150)
} }
function selection(list = props.userDataList) { function selection(list = uniqBy(props.userDataList, 'userId')) {
console.log('🚀 ~ file: UserPages.vue:79 ~ list:', toRaw(list))
if (userData.value && list) { if (userData.value && list) {
const commonItems = userData.value.filter((item1: { userId: any }) => const commonItems = userData.value.filter((item1: { userId: any }) =>
list.some((item2) => item2.userId === item1.userId) list.some((item2) => item2.userId === item1.userId)
) )
toggleSelection(commonItems) toggleSelection(commonItems)
} }
} }
@ -108,7 +109,7 @@ const multipleSelection = ref<[]>([])
const multipleSelectionObj: any = {} const multipleSelectionObj: any = {}
const handleSelectionChange = (val) => { const handleSelectionChange = (val) => {
console.log(val) // console.log(val, 'val-')
multipleSelectionObj[da.deptId] = val multipleSelectionObj[da.deptId] = val
multipleSelection.value = uniqBy(Object.values(multipleSelectionObj).flat(), 'userId') multipleSelection.value = uniqBy(Object.values(multipleSelectionObj).flat(), 'userId')
} }
@ -210,7 +211,7 @@ const addGroupList = () => {
showModal2.value = true showModal2.value = true
} }
const deleteGroupp = (i: any) => { const deleteGroupp = (i: any) => {
console.log(i) // console.log(i)
deleteGroups(i.id) deleteGroups(i.id)
} }
async function deleteGroups(id) { async function deleteGroups(id) {

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,28 @@
<script setup lang="ts"> <script setup lang="ts">
import AppBlock from '@/components/AppBlock.vue' import AppBlock from '@/components/AppBlock.vue'
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
import {formatDate} from '@/utils/format' import { formatDate } from '@/utils/format'
import { useMessage, NModal,NSelect} from 'naive-ui' import { useMessage, NModal, NSelect } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user' import { useUserStore } from '@/stores/modules/user'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import { topList, actList, highList, badartList, topAdd, topDel, actAdd, highAdd, badartAdd, badartDel, highDel, actDel } from '@/api/daikin/base' import {
topList,
actList,
highList,
badartList,
topAdd,
topDel,
actAdd,
highAdd,
badartAdd,
badartDel,
highDel,
actDel,
fetchdbAuthGetInfo,
badartGetUser,
badartAddUser
} from '@/api/daikin/base'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
const message = useMessage() const message = useMessage()
const store = useUserStore() const store = useUserStore()
const header = { 'token': store.user.token } const header = { 'token': store.user.token }
@ -22,7 +39,6 @@ const editC = ref()
const editD = ref() const editD = ref()
const editE = ref() const editE = ref()
const shomkA = ref(false) const shomkA = ref(false)
const shomkB = ref(false) const shomkB = ref(false)
const shomkC = ref(false) const shomkC = ref(false)
@ -36,8 +52,8 @@ async function gettopList() {
dataA.value = _rowA.map((i: { filePathList: { name: any; originalFileName: any }[] }) => { dataA.value = _rowA.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) { if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => { i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
} }
return i return i
}) })
@ -52,8 +68,8 @@ async function getbadartList() {
dataB.value = _rowB.map((i: { filePathList: { name: any; originalFileName: any }[] }) => { dataB.value = _rowB.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) { if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => { i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
} }
return i return i
}) })
@ -68,8 +84,8 @@ async function getactList() {
dataD.value = _rowD.map((i: { filePathList: { name: any; originalFileName: any }[] }) => { dataD.value = _rowD.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) { if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => { i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
} }
return i return i
}) })
@ -84,8 +100,8 @@ async function gethighList() {
dataC.value = _rowC.map((i: { filePathList: { name: any; originalFileName: any }[] }) => { dataC.value = _rowC.map((i: { filePathList: { name: any; originalFileName: any }[] }) => {
if (i.filePathList && i.filePathList.length > 0) { if (i.filePathList && i.filePathList.length > 0) {
i.filePathList.forEach((file: { name: any; originalFileName: any }) => { i.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
} }
return i return i
}) })
@ -93,35 +109,52 @@ async function gethighList() {
} }
onMounted(async () => { onMounted(async () => {
getactList(); getactList()
getbadartList(); getbadartList()
gettopList(); gettopList()
gethighList(); gethighList()
}) })
async function onSubmitA(row: {
filePathList?: any
id?: any
async function onSubmitA(row: { filePathList?: any; id?: any; indexId?: any; title?: any; proportion?: any; partSum?: any; badSum?: any }) { indexId?: any
title?: any
proportion?: any
partSum?: any
badSum?: any
}) {
console.log(row) console.log(row)
const { id, indexId, title, partSum, badSum,monthDate } = row const { id, indexId, title, partSum, badSum, monthDate } = row
let filePathArr = [] let filePathArr = []
if (row.fileList && row.fileList.length > 0) { if (row.fileList && row.fileList.length > 0) {
row.fileList.map(item => { row.fileList.map((item) => {
if (item.response) filePathArr.push(item.response.url); if (item.response) filePathArr.push(item.response.url)
else filePathArr.push(item.url); else filePathArr.push(item.url)
}) })
} }
let filePath = filePathArr.join(',') let filePath = filePathArr.join(',')
const cate = cateValue.value const cate = cateValue.value
console.log(monthDate,formatDate(monthDate)) console.log(monthDate, formatDate(monthDate))
const time = formatDate(monthDate).substring(0,7) const time = formatDate(monthDate).substring(0, 7)
const { code, msg } = await topAdd({ id, indexId, title, partSum, badSum, filePath,cate,monthDate:time}) const { code, msg } = await topAdd({
if (code === 200) { message.success("修改成功!") } id,
else { message.error(msg) } indexId,
title,
partSum,
badSum,
filePath,
cate,
monthDate: time
})
if (code === 200) {
message.success('修改成功!')
} else {
message.error(msg)
}
shomkA.value = false shomkA.value = false
gettopList(); gettopList()
} }
async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) { async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?: any }) {
@ -129,19 +162,22 @@ async function onSubmitB(row: { filePathList?: any; id?: any; cate?: any; title?
let filePathArr = [] let filePathArr = []
if (row.fileList && row.fileList.length > 0) { if (row.fileList && row.fileList.length > 0) {
row.fileList.map(item => { row.fileList.map((item) => {
if (item.response) filePathArr.push(item.response.url); if (item.response) filePathArr.push(item.response.url)
else filePathArr.push(item.url); else filePathArr.push(item.url)
}) })
} }
let filePath = filePathArr.join(',') let filePath = filePathArr.join(',')
const { code, msg } = await badartAdd({ id, cate, title, filePath }) const { code, msg } = await badartAdd({ id, cate, title, filePath })
if (code === 200) { message.success("修改成功!") } if (code === 200) {
else { message.error(msg) } message.success('修改成功!')
} else {
message.error(msg)
}
shomkB.value = false shomkB.value = false
getbadartList(); 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 }) {
@ -150,16 +186,17 @@ async function onSubmitC(row: { filePathList?: any; id?: any; source?: any; titl
let filePathArr = [] let filePathArr = []
if (row.fileList && row.fileList.length > 0) { if (row.fileList && row.fileList.length > 0) {
row.fileList.map(item => { row.fileList.map((item) => {
if (item.response) filePathArr.push(item.response.url); if (item.response) filePathArr.push(item.response.url)
else filePathArr.push(item.url); else filePathArr.push(item.url)
}) })
} }
let filePath = filePathArr.join(',') let filePath = filePathArr.join(',')
const { code, msg } = await highAdd({ id, source, title, filePath }) const { code, msg } = await highAdd({ id, source, title, filePath })
if (code === 200) { message.success("修改成功!") } if (code === 200) {
else message.error(msg) message.success('修改成功!')
} else message.error(msg)
shomkC.value = false shomkC.value = false
gethighList() gethighList()
} }
@ -169,41 +206,38 @@ async function onSubmitD(row: { filePathList?: any; id?: any; title?: any }) {
let filePathArr = [] let filePathArr = []
if (row.fileList && row.fileList.length > 0) { if (row.fileList && row.fileList.length > 0) {
row.fileList.map(item => { row.fileList.map((item) => {
if (item.response) filePathArr.push(item.response.url); if (item.response) filePathArr.push(item.response.url)
else filePathArr.push(item.url); else filePathArr.push(item.url)
}) })
} }
let filePath = filePathArr.join(',') let filePath = filePathArr.join(',')
const { code, msg } = await actAdd({ id, title, filePath }) const { code, msg } = await actAdd({ id, title, filePath })
if (code === 200) { message.success("修改成功!") } if (code === 200) {
else { message.success('修改成功!')
} else {
message.error(msg) message.error(msg)
} }
shomkD.value = false shomkD.value = false
getactList() getactList()
} }
const handleEditA = (index: number, row: any) => { const handleEditA = (index: number, row: any) => {
if (row && row.filePathList) { if (row && row.filePathList) {
if (row.filePathList.length > 0) { if (row.filePathList.length > 0) {
if (row.filePathList && row.filePathList.length > 0) { if (row.filePathList && row.filePathList.length > 0) {
row.filePathList.forEach((file: { name: any; originalFileName: any }) => { row.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
row.fileList = row.filePathList row.fileList = row.filePathList
} }
} } else if (row.files && row.files.length > 0) {
else if (row.files && row.files.length > 0) { row.files.map((i) => {
row.files.map(i => {
i.url = i.response.url i.url = i.response.url
}) })
} }
} } else {
else {
editA.value = { editA.value = {
indexId: '', indexId: '',
title: '', title: '',
@ -211,7 +245,7 @@ const handleEditA = (index: number, row: any) => {
partSum: '', partSum: '',
badSum: '', badSum: '',
fileList: [], fileList: [],
monthDate:'' monthDate: ''
} }
} }
shomkA.value = true shomkA.value = true
@ -221,21 +255,18 @@ const handleEditA = (index: number, row: any) => {
const handleEditB = (index: number, row: any) => { const handleEditB = (index: number, row: any) => {
if (row && row.filePathList) { if (row && row.filePathList) {
if (row.filePathList.length > 0) { if (row.filePathList.length > 0) {
if (row.filePathList && row.filePathList.length > 0) { if (row.filePathList && row.filePathList.length > 0) {
row.filePathList.forEach((file: { name: any; originalFileName: any }) => { row.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
row.fileList = row.filePathList row.fileList = row.filePathList
} }
} } else if (row.files && row.files.length > 0) {
else if (row.files && row.files.length > 0) { row.files.map((i) => {
row.files.map(i => {
i.url = i.response.url i.url = i.response.url
}) })
} }
} } else {
else {
editB.value = { editB.value = {
title: '', title: '',
cate: '', cate: '',
@ -249,25 +280,22 @@ const handleEditB = (index: number, row: any) => {
const handleEditC = (index: number, row: any) => { const handleEditC = (index: number, row: any) => {
if (row && row.filePathList) { if (row && row.filePathList) {
if (row.filePathList.length > 0) { if (row.filePathList.length > 0) {
if (row.filePathList && row.filePathList.length > 0) { if (row.filePathList && row.filePathList.length > 0) {
row.filePathList.forEach((file: { name: any; originalFileName: any }) => { row.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
row.fileList = row.filePathList row.fileList = row.filePathList
} }
} } else if (row.files && row.files.length > 0) {
else if (row.files && row.files.length > 0) { row.files.map((i) => {
row.files.map(i => {
i.url = i.response.url i.url = i.response.url
}) })
} }
} } else {
else {
editC.value = { editC.value = {
title: '', title: '',
source: '', source: '',
fileList: [], fileList: []
} }
} }
shomkC.value = true shomkC.value = true
@ -277,25 +305,22 @@ const handleEditC = (index: number, row: any) => {
const handleEditD = (index: number, row: any) => { const handleEditD = (index: number, row: any) => {
if (row && row.filePathList) { if (row && row.filePathList) {
if (row.filePathList.length > 0) { if (row.filePathList.length > 0) {
if (row.filePathList && row.filePathList.length > 0) { if (row.filePathList && row.filePathList.length > 0) {
row.filePathList.forEach((file: { name: any; originalFileName: any }) => { row.filePathList.forEach((file: { name: any; originalFileName: any }) => {
file.name = file.originalFileName; file.name = file.originalFileName
}); })
row.fileList = row.filePathList row.fileList = row.filePathList
} }
} } else if (row.files && row.files.length > 0) {
else if (row.files && row.files.length > 0) { row.files.map((i) => {
row.files.map(i => {
i.url = i.response.url i.url = i.response.url
}) })
} }
} } else {
else {
editD.value = { editD.value = {
title: '', title: '',
source: '', source: '',
fileList: [], fileList: []
} }
} }
shomkD.value = true shomkD.value = true
@ -303,59 +328,105 @@ const handleEditD = (index: number, row: any) => {
editD.value = row editD.value = row
} }
async function handleDeleteA(index: number, row: any) { async function handleDeleteA(index: number, row: any) {
const { id } = row const { id } = row
if (!id) return if (!id) return
const { code, msg } = await topDel({ id }) const { code, msg } = await topDel({ id })
if (code === 200) { message.success("删除成功!") } if (code === 200) {
else { message.error(msg) } message.success('删除成功!')
gettopList(); } else {
message.error(msg)
}
gettopList()
} }
async function handleDeleteB(index: number, row: any) { async function handleDeleteB(index: number, row: any) {
const { id } = row const { id } = row
if (!id) return if (!id) return
const { code, msg } = await badartDel({ id }) const { code, msg } = await badartDel({ id })
if (code === 200) { message.success("删除成功!") } if (code === 200) {
else { message.error(msg) } message.success('删除成功!')
} else {
message.error(msg)
}
getbadartList(); getbadartList()
} }
async function handleDeleteC(index: number, row: any) { async function handleDeleteC(index: number, row: any) {
const { id } = row const { id } = row
if (!id) return if (!id) return
const { code, msg } = await highDel({ id }) const { code, msg } = await highDel({ id })
if (code === 200) { message.success("删除成功!") } if (code === 200) {
else { message.error(msg) } message.success('删除成功!')
} else {
message.error(msg)
}
gethighList() gethighList()
} }
async function handleDeleteD(index: number, row: any) { async function handleDeleteD(index: number, row: any) {
const { id } = row const { id } = row
if (!id) return if (!id) return
const { code, msg } = await actDel({ id }) const { code, msg } = await actDel({ id })
if (code === 200) { message.success("删除成功!") } if (code === 200) {
else { message.error(msg) } message.success('删除成功!')
getactList(); } else {
message.error(msg)
}
getactList()
} }
const optt = ref([ const optt = ref([
{ {
lable:'新品', lable: '新品',
id:'1' id: '1'
}, },
{ {
lable:'累进变更品', lable: '累进变更品',
id:'2' id: '2'
}, },
{ {
lable:'现行品', lable: '现行品',
id:'3' id: '3'
} }
]) ])
const activeName = ref("first") const activeName = ref('first')
const cateValue = ref('新品') const cateValue = ref('新品')
const showModal = ref(false)
const userData = ref(false)
const flg = ref<any>({})
const setUserList = ref<any>([])
const selIndex = ref(0) // 1- 2- 3- 4-
async function getUser(indexId: any) {
showModal.value = !showModal.value
if (typeof indexId === 'number') {
selIndex.value = indexId
const { data: userArr } = await badartGetUser({
indexId
})
setUserList.value = userArr
}
}
const handleChild = async (data: any) => {
const { showModal: show, multipleSelection } = data
showModal.value = unref(show) || false
let userIdList: any[] = []
multipleSelection.value.forEach((i: { userId: any; nickName: string }) => {
userIdList.push(i.userId)
})
if (userIdList.length > 0) {
const res = await badartAddUser({
indexId: selIndex.value,
userIdList
})
if (res.code == 200) {
message.success('设置成功!')
}
}
}
const CloseThiss = (data: any) => {
showModal.value = data
}
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
@ -368,20 +439,28 @@ const cateValue = ref('新品')
<!-- <img src="./images/logo.svg" class="h56px mr21px" /> --> <!-- <img src="./images/logo.svg" class="h56px mr21px" /> -->
<div class="text-36px text-#000">品质内容管理</div> <div class="text-36px text-#000">品质内容管理</div>
</div> </div>
<el-tabs type="card" v-model="activeName" class="demo-tabs mt30px text-20px" @tab-click="handleClick"> <el-tabs type="card" v-model="activeName" class="demo-tabs mt30px text-20px" @tab-click="">
<el-tab-pane name="first"> <el-tab-pane name="first">
<template #label> <template #label>
<span class="custom-tabs-label"> <span class="custom-tabs-label">
<span class="text-20px">不良情报模块</span> <span class="text-20px">不良情报模块</span>
</span> </span>
</template> </template>
<div class=" cont relative w100% h800px overflow-y-auto"> <div class="cont relative w100% h800px overflow-y-auto">
<el-button type="primary" @click="handleEditB" class="my20px">不良情报新增</el-button> <el-button type="primary" @click="handleEditB" class="my20px">不良情报新增</el-button>
<el-table :data="dataB" style="width: 95%" <el-button type="primary" @click="getUser(3)" class="my20px">查看范围</el-button>
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }" <el-table
:cell-style="{ 'text-align': 'center', 'font-size': '16px' }"> :data="dataB"
style="width: 95%"
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'font-size': '16px' }"
>
<el-table-column label="时间" prop="createTime" /> <el-table-column label="时间" prop="createTime" />
<el-table-column label="类别" prop="cate" /> <el-table-column label="类别" prop="cate" />
<el-table-column label="详情" prop="title" /> <el-table-column label="详情" prop="title" />
@ -391,12 +470,18 @@ const cateValue = ref('新品')
{{ it.name }} {{ it.name }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180px"> <el-table-column label="操作" width="180px">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="handleEditB(scope.$index, scope.row)">编辑</el-button> <el-button size="small" @click="handleEditB(scope.$index, scope.row)"
<el-button size="small" type="danger" @click="handleDeleteB(scope.$index, scope.row)">删除</el-button> >编辑</el-button
>
<el-button
size="small"
type="danger"
@click="handleDeleteB(scope.$index, scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -411,9 +496,19 @@ const cateValue = ref('新品')
</template> </template>
<div> <div>
<el-button type="primary" @click="handleEditA" class="my20px">不良统计新增</el-button> <el-button type="primary" @click="handleEditA" class="my20px">不良统计新增</el-button>
<el-table :data="dataA" style="width: 95%" <el-button type="primary" @click="getUser(2)" class="my20px">查看范围</el-button>
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }" <el-table
:cell-style="{ 'text-align': 'center' , 'font-size': '16px'}"> :data="dataA"
style="width: 95%"
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'font-size': '16px' }"
>
<el-table-column label="时间" prop="monthDate" width="180px" /> <el-table-column label="时间" prop="monthDate" width="180px" />
<el-table-column label="供应商" prop="indexId" width="220px" /> <el-table-column label="供应商" prop="indexId" width="220px" />
<!-- <el-table-column label="计件数" prop="partSum" width="150px"/> <!-- <el-table-column label="计件数" prop="partSum" width="150px"/>
@ -431,8 +526,15 @@ const cateValue = ref('新品')
</el-table-column> --> </el-table-column> -->
<el-table-column label="操作" width="180px"> <el-table-column label="操作" width="180px">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="handleEditA(scope.$index, scope.row)">编辑</el-button> <el-button size="small" @click="handleEditA(scope.$index, scope.row)"
<el-button size="small" type="danger" @click="handleDeleteA(scope.$index, scope.row)">删除</el-button> >编辑</el-button
>
<el-button
size="small"
type="danger"
@click="handleDeleteA(scope.$index, scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -442,16 +544,25 @@ const cateValue = ref('新品')
<el-tab-pane name="third"> <el-tab-pane name="third">
<template #label> <template #label>
<span class="custom-tabs-label"> <span class="custom-tabs-label">
<span class="text-20px">品质情报模块</span> <span class="text-20px">品质情报模块</span>
</span> </span>
</template> </template>
<div> <div>
<el-button type="primary" @click="handleEditC" class="my20px">品质情报新增</el-button> <el-button type="primary" @click="handleEditC" class="my20px">品质情报新增</el-button>
<el-table :data="dataC" style="width: 95%" <el-button type="primary" @click="getUser(4)" class="my20px">查看范围</el-button>
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }" <el-table
:cell-style="{ 'text-align': 'center' , 'font-size': '16px'}"> :data="dataC"
style="width: 95%"
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'font-size': '16px' }"
>
<el-table-column label="时间" prop="createTime" /> <el-table-column label="时间" prop="createTime" />
<el-table-column label="详情" prop="title" /> <el-table-column label="详情" prop="title" />
<el-table-column label="来源" prop="source" /> <el-table-column label="来源" prop="source" />
@ -461,12 +572,18 @@ const cateValue = ref('新品')
{{ it.name }} {{ it.name }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180px"> <el-table-column label="操作" width="180px">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="handleEditC(scope.$index, scope.row)">编辑</el-button> <el-button size="small" @click="handleEditC(scope.$index, scope.row)"
<el-button size="small" type="danger" @click="handleDeleteC(scope.$index, scope.row)">删除</el-button> >编辑</el-button
>
<el-button
size="small"
type="danger"
@click="handleDeleteC(scope.$index, scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -481,11 +598,19 @@ const cateValue = ref('新品')
</template> </template>
<div> <div>
<el-button type="primary" @click="handleEditD" class="my20px">活动进展新增</el-button> <el-button type="primary" @click="handleEditD" class="my20px">活动进展新增</el-button>
<el-table :data="dataD" style="width: 95%" <el-button type="primary" @click="getUser(1)" class="my20px">查看范围</el-button>
:header-cell-style="{ background: '#2A7BF7', color: '#fff', height: '60px', textAlign: 'center', 'font-size': '24px' }" <el-table
:cell-style="{ 'text-align': 'center' , 'font-size': '16px'}"> :data="dataD"
style="width: 95%"
:header-cell-style="{
background: '#2A7BF7',
color: '#fff',
height: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{ 'text-align': 'center', 'font-size': '16px' }"
>
<el-table-column label="时间" prop="createTime" /> <el-table-column label="时间" prop="createTime" />
<el-table-column label="详情" prop="title" /> <el-table-column label="详情" prop="title" />
<el-table-column label="活动追踪" prop="filePathList"> <el-table-column label="活动追踪" prop="filePathList">
@ -494,56 +619,69 @@ const cateValue = ref('新品')
{{ it.name }} {{ it.name }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180px"> <el-table-column label="操作" width="180px">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="handleEditD(scope.$index, scope.row)">编辑</el-button> <el-button size="small" @click="handleEditD(scope.$index, scope.row)"
<el-button size="small" type="danger" @click="handleDeleteD(scope.$index, scope.row)">删除</el-button> >编辑</el-button
>
<el-button
size="small"
type="danger"
@click="handleDeleteD(scope.$index, scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-form-item> <el-form-item> </el-form-item>
</el-form-item>
</AppBlock> </AppBlock>
<n-modal v-model:show="shomkA"> <n-modal v-model:show="shomkA">
<div class="bg-#FFF p30px"> <div class="bg-#FFF p30px">
<el-form :model="editA" label-width="120px" :inline="true"> <el-form :model="editA" label-width="120px" :inline="true">
<el-form-item label="时间"> <el-form-item label="时间">
<el-config-provider :locale="locale"> <el-config-provider :locale="locale">
<el-date-picker v-model="editA.monthDate" type="month" placeholder="时间选择" size="large" /> <el-date-picker
</el-config-provider> v-model="editA.monthDate"
type="month"
placeholder="时间选择"
size="large"
/>
</el-config-provider>
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="供应商"> <el-form-item label="供应商">
<el-input v-model="editA.indexId" /> <el-input v-model="editA.indexId" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="数量"> <el-form-item label="数量">
<el-input v-model="editA.partSum" type="number" min="0" /> <el-input v-model="editA.partSum" type="number" min="0" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="类型"> <el-form-item label="类型">
<n-select class="w220px" size="large" v-if="optt" :show-arrow="false" :show-checkmark="false" v-model:value="cateValue" :options="optt" <n-select
value-field="lable" label-field="lable" /> class="w220px"
size="large"
v-if="optt"
:show-arrow="false"
:show-checkmark="false"
v-model:value="cateValue"
:options="optt"
value-field="lable"
label-field="lable"
/>
</el-form-item> </el-form-item>
<br> <br />
<br> <br />
<el-form-item label="详情"> <el-form-item label="详情">
<el-input type="textarea" v-model="editA.title" /> <el-input type="textarea" v-model="editA.title" />
</el-form-item> </el-form-item>
<br> <br />
<!-- <el-form-item label="不良内容"> <!-- <el-form-item label="不良内容">
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header" <el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
action="/test-api/common/upload" multiple> action="/test-api/common/upload" multiple>
@ -552,7 +690,7 @@ const cateValue = ref('新品')
</el-upload> </el-upload>
</el-form-item> --> </el-form-item> -->
</el-form> </el-form>
<hr class="mb15px border-#f1f1f1"> <hr class="mb15px border-#f1f1f1" />
<el-button class="flex-center" type="primary" @click="onSubmitA(editA)"></el-button> <el-button class="flex-center" type="primary" @click="onSubmitA(editA)"></el-button>
</div> </div>
@ -564,20 +702,24 @@ const cateValue = ref('新品')
<el-input v-model="editB.title" /> <el-input v-model="editB.title" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="类别"> <el-form-item label="类别">
<el-input v-model="editB.cate" /> <el-input v-model="editB.cate" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="文件"> <el-form-item label="文件">
<el-upload v-model:file-list="editB.fileList" class="upload-demo" :headers="header" <el-upload
action="/test-api/common/upload" multiple> v-model:file-list="editB.fileList"
class="upload-demo"
:headers="header"
action="/test-api/common/upload"
multiple
>
<el-button type="primary">选择文件</el-button> <el-button type="primary">选择文件</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<hr class="mb15px border-#f1f1f1"> <hr class="mb15px border-#f1f1f1" />
<el-button class="flex-center" type="primary" @click="onSubmitB(editB)"></el-button> <el-button class="flex-center" type="primary" @click="onSubmitB(editB)"></el-button>
</div> </div>
@ -585,26 +727,28 @@ const cateValue = ref('新品')
<n-modal v-model:show="shomkC"> <n-modal v-model:show="shomkC">
<div class="bg-#FFF p30px"> <div class="bg-#FFF p30px">
<el-form :model="editC" label-width="120px" :inline="true"> <el-form :model="editC" label-width="120px" :inline="true">
<el-form-item label="详情"> <el-form-item label="详情">
<el-input v-model="editC.title" /> <el-input v-model="editC.title" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="来源"> <el-form-item label="来源">
<el-input v-model="editC.source" /> <el-input v-model="editC.source" />
</el-form-item> </el-form-item>
<br> <br />
<el-form-item label="文件"> <el-form-item label="文件">
<el-upload v-model:file-list="editC.fileList" class="upload-demo" :headers="header" <el-upload
action="/test-api/common/upload"> v-model:file-list="editC.fileList"
class="upload-demo"
:headers="header"
action="/test-api/common/upload"
>
<el-button type="primary">选择文件</el-button> <el-button type="primary">选择文件</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<hr class="mb15px border-#f1f1f1"> <hr class="mb15px border-#f1f1f1" />
<el-button class="flex-center" type="primary" @click="onSubmitC(editC)"></el-button> <el-button class="flex-center" type="primary" @click="onSubmitC(editC)"></el-button>
</div> </div>
@ -615,25 +759,31 @@ const cateValue = ref('新品')
<el-form-item label="详情"> <el-form-item label="详情">
<el-input v-model="editD.title" /> <el-input v-model="editD.title" />
</el-form-item> </el-form-item>
<br />
<br>
<el-form-item label="文件"> <el-form-item label="文件">
<el-upload v-model:file-list="editD.fileList" class="upload-demo" :headers="header" <el-upload
action="/test-api/common/upload" multiple> v-model:file-list="editD.fileList"
class="upload-demo"
:headers="header"
action="/test-api/common/upload"
multiple
>
<el-button type="primary">选择文件</el-button> <el-button type="primary">选择文件</el-button>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<hr class="mb15px border-#f1f1f1"> <hr class="mb15px border-#f1f1f1" />
<el-button class="flex-center" type="primary" @click="onSubmitD(editD)"></el-button> <el-button class="flex-center" type="primary" @click="onSubmitD(editD)"></el-button>
</div> </div>
</n-modal> </n-modal>
<n-modal v-model:show="showModal" :z-index="99999">
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
</n-modal>
</template> </template>
<style lang="less"> <style lang="less">
.demo-tabs>.el-tabs__content { .demo-tabs > .el-tabs__content {
color: #6b778c; color: #6b778c;
font-size: 32px; font-size: 32px;
font-weight: 600; font-weight: 600;
@ -650,4 +800,4 @@ const cateValue = ref('新品')
justify-content: center; justify-content: center;
margin: 0 auto; margin: 0 auto;
} }
</style> </style>