| | |
| | | <el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="记录名称" prop="name" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" /> |
| | | <el-table-column label="记录名称" prop="recordName" align="center"></el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('review',scope.row)" >查看</el-button> |
| | |
| | | import {generateWordDocument} from "@/utils/exportWord"; |
| | | import {delTable, getTable} from "@/api/qualityObjectives/table"; |
| | | import {delNeedDiscren, getNeedDiscren} from "@/api/need/need"; |
| | | import {delCustomerCommunicate, getCustomerCommunicate} from "@/api/customerCommunicate"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | companyList: [], |
| | | isAdmin: false, |
| | | dialogVisible: false, |
| | | methodsList: [ |
| | | { |
| | | id: 1, |
| | | name: '面谈' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '电话' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '信函' |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: '邮件' |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: '其他:' |
| | | }, |
| | | ], |
| | | typeList: [ |
| | | { |
| | | id: 1, |
| | | name: '建议' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '咨询' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '反馈' |
| | | }, |
| | | { |
| | | id: 4, |
| | | name: '抱怨' |
| | | }, |
| | | { |
| | | id: 5, |
| | | name: '其他:' |
| | | }, |
| | | ] |
| | | }); |
| | | const dataList = ref([]); |
| | | const total = ref(0); |
| | |
| | | } |
| | | }); |
| | | const getList = async () => { |
| | | // loading.value = true; |
| | | // const res = await getNeedDiscren(data.queryParams); |
| | | // if(res.code === 200){ |
| | | // dataList.value = res.data.list |
| | | // total.value = res.data.total |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | // loading.value = false; |
| | | dataList.value = [{}] |
| | | loading.value = true; |
| | | const res = await getCustomerCommunicate(data.queryParams); |
| | | if(res.code === 200){ |
| | | dataList.value = res.data.list |
| | | total.value = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false; |
| | | } |
| | | |
| | | const searchClick = () => { |
| | |
| | | } |
| | | const templatePath = ref('/customerCommunicateExample.docx') |
| | | const startGeneration = async () => { |
| | | const data = JSON.parse(JSON.stringify(choosedData.value)) |
| | | data.forEach(item => { |
| | | |
| | | |
| | | const dataX = JSON.parse(JSON.stringify(choosedData.value)) |
| | | dataX.forEach(item => { |
| | | item.methodList = data.methodsList.map(i => { |
| | | return { |
| | | ...i, |
| | | checked: item.comMethod.split(',').map(Number).includes(i.id), |
| | | name: i.id == 5 ? i.name + item.methodMess : i.name |
| | | } |
| | | }) |
| | | item.typeList = data.typeList.map(i => { |
| | | return { |
| | | ...i, |
| | | checked: item.comType.split(',').map(Number).includes(i.id), |
| | | name: i.id == 5 ? i.name + item.typeMess : i.name |
| | | } |
| | | }) |
| | | console.log('xxx',item.tableData) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_相关方期望和需求识别表.docx`); |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_顾客沟通记录表.docx`); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delNeedDiscren(val.id); |
| | | const res = await delCustomerCommunicate(val.id); |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |