|
@@ -2,7 +2,7 @@
|
|
|
<hc-card id="node-card-plan">
|
|
|
<template #header>
|
|
|
<div class="w-32">
|
|
|
- <el-select v-model="searchForm.key1" clearable block placeholder="填写类型">
|
|
|
+ <el-select v-model="searchForm.fileInType" clearable block placeholder="填写类型" @change="getTableData">
|
|
|
<el-option v-for="item in fillType" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -10,17 +10,17 @@
|
|
|
<HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
|
|
|
</div>
|
|
|
<div class="ml-3 w-32">
|
|
|
- <el-select v-model="searchForm.key2" clearable block placeholder="状态">
|
|
|
+ <el-select v-model="searchForm.status" clearable block placeholder="状态 " @change="getTableData">
|
|
|
<el-option v-for="item in tasksStatus" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-3 w-32">
|
|
|
- <el-select v-model="searchForm.key3" clearable block placeholder="编写人">
|
|
|
+ <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-select>
|
|
|
</div>
|
|
|
<div class="ml-3 w-32">
|
|
|
- <el-select v-model="searchForm.key4" clearable block placeholder="发送人">
|
|
|
+ <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-select>
|
|
|
</div>
|
|
@@ -37,7 +37,7 @@
|
|
|
</template>
|
|
|
|
|
|
|
|
|
- <hc-table :column="tableColumn" :datas="tableData">
|
|
|
+ <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoad ">
|
|
|
<template #key3="{ row }">
|
|
|
<el-tag
|
|
|
v-if="row?.key3"
|
|
@@ -63,7 +63,12 @@
|
|
|
<script setup>
|
|
|
import { nextTick, ref, watch } from 'vue'
|
|
|
import fromDrawer from './fromDrawer.vue'
|
|
|
-
|
|
|
+import dataApi from '~api/systemService/service'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import { arrToId, getArrValue } from 'js-fast-way'
|
|
|
+const store = useAppStore()
|
|
|
+const projectId = ref(store.getProjectId)
|
|
|
+const contractId = ref(store.getContractId)
|
|
|
//搜索表单
|
|
|
const searchForm = ref({
|
|
|
key1: null, ke2: null, key3: null, key4: null, startTimeValue: null, endTimeValue: null,
|
|
@@ -93,19 +98,21 @@ const postList = ref([
|
|
|
const betweenTime = ref(null)
|
|
|
const betweenTimeUpdate = ({ val, arr }) => {
|
|
|
betweenTime.value = arr
|
|
|
- searchForm.value.startTimeValue = val['start']
|
|
|
- searchForm.value.endTimeValue = val['end']
|
|
|
+ searchForm.value.planStartTime = val['start']
|
|
|
+ searchForm.value.planEndTime = val['end']
|
|
|
+ getTableData()
|
|
|
+
|
|
|
}
|
|
|
const searchClick = ()=>{
|
|
|
|
|
|
}
|
|
|
const tableColumn = [
|
|
|
- { key: 'key1', name: '服务完成确认单' },
|
|
|
+ { key: 'fileInType', name: '服务完成确认单' },
|
|
|
{ key: 'key2', name: '计划时间' },
|
|
|
- { key: 'key3', name: '状态' },
|
|
|
- { key: 'key4', name: '编写人' },
|
|
|
- { key: 'key5', name: '创建时间' },
|
|
|
- { key: 'key6', name: '发送人员' },
|
|
|
+ { key: 'status', name: '状态' },
|
|
|
+ { key: 'createUser', name: '编写人' },
|
|
|
+ { key: 'createTime', name: '创建时间' },
|
|
|
+ { key: 'sendUser', name: '发送人员' },
|
|
|
{ key: 'action', name: '操作', width:150 },
|
|
|
]
|
|
|
const tableData = ref([
|
|
@@ -117,7 +124,28 @@ const tableData = ref([
|
|
|
const pageChange = ({ current, size }) => {
|
|
|
searchForm.value.current = current
|
|
|
searchForm.value.size = size
|
|
|
- // getTableData()
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
+
|
|
|
+const tableLoad = ref(false)
|
|
|
+const getTableData = async () => {
|
|
|
+ tableLoad.value = true
|
|
|
+ const { error, code, data } = await dataApi.getPage({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ ...searchForm.value,
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+ tableLoad.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ tableData.value = getArrValue(data['list'])
|
|
|
+
|
|
|
+ } else {
|
|
|
+ tableData.value = []
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
const isShowForm = ref(false)
|
|
|
const createMonthPlan = ()=>{
|