|
@@ -38,16 +38,20 @@
|
|
|
|
|
|
|
|
|
|
<hc-table :column="tableColumn" :datas="tableData" :loading="tableLoad ">
|
|
<hc-table :column="tableColumn" :datas="tableData" :loading="tableLoad ">
|
|
- <template #key3="{ row }">
|
|
|
|
|
|
+ <template #fileInType="{ row }">
|
|
|
|
+ <span>{{ row.fileInType === 1 ? '月度服务计划' : '服务完成确认单' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <template #statusValue="{ row }">
|
|
<el-tag
|
|
<el-tag
|
|
- v-if="row?.key3"
|
|
|
|
- :type="`${row.key3 === '已计划' ? 'success' : row.key3 === '计划中' ? 'info' : 'warning'}`" class="mx-1" effect="dark"
|
|
|
|
|
|
+ v-if="row?.statusValue"
|
|
|
|
+ :type="`${row.statusValue === '已计划' ? 'success' : row.statusValue === '计划中' ? 'info' : 'warning'}`" class="mx-1" effect="dark"
|
|
>
|
|
>
|
|
- {{ row.key3 }}
|
|
|
|
|
|
+ {{ row.statusValue }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</template>
|
|
</template>
|
|
<template #action="{ row }">
|
|
<template #action="{ row }">
|
|
- <el-link type="primary">编辑</el-link>
|
|
|
|
|
|
+ <el-link type="primary" @click="editRow(row)">编辑</el-link>
|
|
<el-link type="success">查看</el-link>
|
|
<el-link type="success">查看</el-link>
|
|
<el-link type="warning">删除</el-link>
|
|
<el-link type="warning">删除</el-link>
|
|
</template>
|
|
</template>
|
|
@@ -56,16 +60,20 @@
|
|
<template #action>
|
|
<template #action>
|
|
<HcPages :pages="searchForm" @change="pageChange" />
|
|
<HcPages :pages="searchForm" @change="pageChange" />
|
|
</template>
|
|
</template>
|
|
- <fromDrawer v-model="isShowForm" :type="typeVal" />
|
|
|
|
|
|
+ <fromDrawer v-model="isShowForm" :type="typeVal" :data-id="dataId" />
|
|
</hc-card>
|
|
</hc-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { nextTick, ref, watch } from 'vue'
|
|
|
|
|
|
+import { nextTick, onMounted, ref } from 'vue'
|
|
import fromDrawer from './fromDrawer.vue'
|
|
import fromDrawer from './fromDrawer.vue'
|
|
import dataApi from '~api/systemService/service'
|
|
import dataApi from '~api/systemService/service'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { arrToId, getArrValue } from 'js-fast-way'
|
|
import { arrToId, getArrValue } from 'js-fast-way'
|
|
|
|
+
|
|
|
|
+onMounted(()=>{
|
|
|
|
+ getTableData()
|
|
|
|
+})
|
|
const store = useAppStore()
|
|
const store = useAppStore()
|
|
const projectId = ref(store.getProjectId)
|
|
const projectId = ref(store.getProjectId)
|
|
const contractId = ref(store.getContractId)
|
|
const contractId = ref(store.getContractId)
|
|
@@ -79,9 +87,10 @@ const fillType = ref([
|
|
{ dictKey: '2', dictValue: '服务完成确认单' },
|
|
{ dictKey: '2', dictValue: '服务完成确认单' },
|
|
])
|
|
])
|
|
const tasksStatus = ref([
|
|
const tasksStatus = ref([
|
|
- { dictKey: '1', dictValue: '待审核' },
|
|
|
|
- { dictKey: '2', dictValue: '已审核' },
|
|
|
|
- { dictKey: '3', dictValue: '退回' },
|
|
|
|
|
|
+ { dictKey: '1', dictValue: '计划中' },
|
|
|
|
+ { dictKey: '2', dictValue: '协同中-甲方' },
|
|
|
|
+ { dictKey: '3', dictValue: '协同中-系统' },
|
|
|
|
+ { dictKey: '4', dictValue: '已计划' },
|
|
])
|
|
])
|
|
const preparedList = ref([
|
|
const preparedList = ref([
|
|
{ id: 1, name: '张三' },
|
|
{ id: 1, name: '张三' },
|
|
@@ -107,9 +116,9 @@ const searchClick = ()=>{
|
|
|
|
|
|
}
|
|
}
|
|
const tableColumn = [
|
|
const tableColumn = [
|
|
- { key: 'fileInType', name: '服务完成确认单' },
|
|
|
|
- { key: 'key2', name: '计划时间' },
|
|
|
|
- { key: 'status', name: '状态' },
|
|
|
|
|
|
+ { key: 'fileInType', name: '填写类型' },
|
|
|
|
+ { key: 'planTime', name: '计划时间' },
|
|
|
|
+ { key: 'statusValue', name: '状态' },
|
|
{ key: 'createUser', name: '编写人' },
|
|
{ key: 'createUser', name: '编写人' },
|
|
{ key: 'createTime', name: '创建时间' },
|
|
{ key: 'createTime', name: '创建时间' },
|
|
{ key: 'sendUser', name: '发送人员' },
|
|
{ key: 'sendUser', name: '发送人员' },
|
|
@@ -140,7 +149,7 @@ const getTableData = async () => {
|
|
//处理数据
|
|
//处理数据
|
|
tableLoad.value = false
|
|
tableLoad.value = false
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
- tableData.value = getArrValue(data['list'])
|
|
|
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
|
|
|
} else {
|
|
} else {
|
|
tableData.value = []
|
|
tableData.value = []
|
|
@@ -150,7 +159,14 @@ const getTableData = async () => {
|
|
const isShowForm = ref(false)
|
|
const isShowForm = ref(false)
|
|
const typeVal = ref('')
|
|
const typeVal = ref('')
|
|
const createMonthPlan = (type)=>{
|
|
const createMonthPlan = (type)=>{
|
|
|
|
+ dataId.value = ''
|
|
isShowForm.value = true
|
|
isShowForm.value = true
|
|
typeVal.value = type
|
|
typeVal.value = type
|
|
}
|
|
}
|
|
|
|
+const dataId = ref(null)
|
|
|
|
+const editRow = (row)=>{
|
|
|
|
+ isShowForm.value = true
|
|
|
|
+ typeVal.value = row.fileInType
|
|
|
|
+ dataId.value = row.id
|
|
|
|
+}
|
|
</script>
|
|
</script>
|