|
@@ -16,12 +16,12 @@
|
|
|
</div>
|
|
|
<div class="ml-3 w-32">
|
|
|
<el-select v-model="searchForm.createUser" clearable block placeholder="编写人" @change="getTableData">
|
|
|
- <el-option v-for="item in preparedList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ <el-option v-for="item in preparedList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-3 w-32">
|
|
|
<el-select v-model="searchForm.sendUser" placeholder="发送人" clearable multiple block @change="getTableData">
|
|
|
- <el-option v-for="item in postList" :key="item.batch" :label="item.name" :value="item.id" />
|
|
|
+ <el-option v-for="item in postList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -52,7 +52,7 @@
|
|
|
</template>
|
|
|
<template #action="{ row }">
|
|
|
<el-link v-if="row.status !== 4" type="primary" @click="editRow(row)">编辑</el-link>
|
|
|
- <el-link type="success">查看</el-link>
|
|
|
+ <el-link v-if="row.status !== 1 " type="success" @click="viewPlan(row)">查看</el-link>
|
|
|
<el-link v-if="row.status === 1 " v-del-com:[handleDelete]="row" type="warning">删除</el-link>
|
|
|
</template>
|
|
|
</hc-table>
|
|
@@ -70,6 +70,7 @@ import fromDrawer from './fromDrawer.vue'
|
|
|
import dataApi from '~api/systemService/service'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import { arrToId, getArrValue } from 'js-fast-way'
|
|
|
+import { toPdfPage } from '~uti/btn-auth'
|
|
|
|
|
|
onMounted(()=>{
|
|
|
getTableData()
|
|
@@ -115,9 +116,9 @@ const tableColumn = [
|
|
|
{ key: 'fileInType', name: '填写类型' },
|
|
|
{ key: 'planTime', name: '计划时间' },
|
|
|
{ key: 'statusValue', name: '状态' },
|
|
|
- { key: 'createUser', name: '编写人' },
|
|
|
+ { key: 'writeUserName', name: '编写人' },
|
|
|
{ key: 'createTime', name: '创建时间' },
|
|
|
- { key: 'sendUser', name: '发送人员' },
|
|
|
+ { key: 'sendUserName', name: '发送人员' },
|
|
|
{ key: 'action', name: '操作', width:150 },
|
|
|
]
|
|
|
const tableData = ref([
|
|
@@ -162,8 +163,8 @@ const getPreparedList = async (id) => {
|
|
|
})
|
|
|
//判断状态
|
|
|
if (!error && code === 200) {
|
|
|
- preparedList.value = getArrValue(data['records'])
|
|
|
- postList.value = getArrValue(data['records'])
|
|
|
+ preparedList.value = getArrValue(data['writeUser'])
|
|
|
+ postList.value = getArrValue(data['sendUser'])
|
|
|
|
|
|
} else {
|
|
|
preparedList.value = []
|
|
@@ -179,7 +180,8 @@ const createMonthPlan = (type)=>{
|
|
|
}
|
|
|
const closeDrawer = ()=>{
|
|
|
isShowForm.value = false
|
|
|
- // getTableData()
|
|
|
+ getTableData()
|
|
|
+ getPreparedList()
|
|
|
}
|
|
|
const dataId = ref(null)
|
|
|
const editRow = (row)=>{
|
|
@@ -187,6 +189,16 @@ const editRow = (row)=>{
|
|
|
typeVal.value = row.fileInType
|
|
|
dataId.value = row.id
|
|
|
}
|
|
|
+const viewPlan = (row)=>{
|
|
|
+ const { pdfUrl } = row
|
|
|
+ if (pdfUrl) {
|
|
|
+ toPdfPage(pdfUrl)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ window?.$message?.error('暂无预览文件')
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
const handleDelete = async ({ item }, resolve) => {
|
|
|
await delData(item.id)
|
|
|
resolve()
|