|
@@ -48,10 +48,10 @@
|
|
<hc-card-item class="year-detail" :class="isDrawerType === 'edit' ? 'edit' : ''">
|
|
<hc-card-item class="year-detail" :class="isDrawerType === 'edit' ? 'edit' : ''">
|
|
<template #header>
|
|
<template #header>
|
|
<div class="flex-1 text-center text-[14px]">
|
|
<div class="flex-1 text-center text-[14px]">
|
|
- <HcDropdown v-model="yearKey" :datas="yearData" text="年" :props="{ key: 'year', label: 'year' }" @change="yearChange" />
|
|
|
|
|
|
+ <HcDropdown v-model="yearKey" :datas="yearData.table" text="年" :props="{ key: 'year', label: 'year' }" @change="yearChange" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <el-table :data="tableYearData" border class="w-full">
|
|
|
|
|
|
+ <el-table v-if="yearData.table && yearData.table.length > 0" :data="yearData.table[yearIndex].data" border class="w-full">
|
|
<el-table-column prop="month" class-name="line" width="120" align="center">
|
|
<el-table-column prop="month" class-name="line" width="120" align="center">
|
|
<template #header>
|
|
<template #header>
|
|
<div class="hc-table-th-line">
|
|
<div class="hc-table-th-line">
|
|
@@ -60,46 +60,46 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="key1" label="进展情况" align="center">
|
|
|
|
|
|
+ <el-table-column prop="schedule" label="进展情况" align="center">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
<hc-body v-if="isDrawerType === 'edit'">
|
|
<hc-body v-if="isDrawerType === 'edit'">
|
|
- <hc-table-input v-model="row.key1" type="textarea" resize="none" />
|
|
|
|
|
|
+ <hc-table-input v-model="row.schedule" type="textarea" resize="none" />
|
|
</hc-body>
|
|
</hc-body>
|
|
- <span v-else>{{ row.key1 }}</span>
|
|
|
|
|
|
+ <span v-else>{{ row.schedule }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="key2" label="累计进展情况" align="center">
|
|
|
|
|
|
+ <el-table-column prop="progress" label="累计进展情况" align="center">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
<hc-body v-if="isDrawerType === 'edit'">
|
|
<hc-body v-if="isDrawerType === 'edit'">
|
|
- <hc-table-input v-model="row.key2" type="textarea" resize="none" />
|
|
|
|
|
|
+ <hc-table-input v-model="row.progress" type="textarea" resize="none" />
|
|
</hc-body>
|
|
</hc-body>
|
|
- <span v-else>{{ row.key2 }}</span>
|
|
|
|
|
|
+ <span v-else>{{ row.progress }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <hc-info-table class="mt-[-1px]">
|
|
|
|
|
|
+ <hc-info-table v-if="yearData.table && yearData.table.length > 0" class="mt-[-1px]">
|
|
<tr>
|
|
<tr>
|
|
<hc-info-table-td is-title width="10%" center>存在问题</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>存在问题</hc-info-table-td>
|
|
<hc-info-table-td center width="40%">
|
|
<hc-info-table-td center width="40%">
|
|
- <span v-if="isDrawerType === 'view'">{{ testValue }}</span>
|
|
|
|
- <el-input v-else v-model="testValue" type="textarea" resize="none" />
|
|
|
|
|
|
+ <span v-if="isDrawerType === 'view'">{{ yearData.table[yearIndex].problemInfo }}</span>
|
|
|
|
+ <el-input v-else v-model="yearData.table[yearIndex].problemInfo" type="textarea" resize="none" />
|
|
</hc-info-table-td>
|
|
</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>工作建议</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>工作建议</hc-info-table-td>
|
|
<hc-info-table-td center width="40%">
|
|
<hc-info-table-td center width="40%">
|
|
- <span v-if="isDrawerType === 'view'">{{ testValue }}</span>
|
|
|
|
- <el-input v-else v-model="testValue" type="textarea" resize="none" />
|
|
|
|
|
|
+ <span v-if="isDrawerType === 'view'">{{ yearData.table[yearIndex].workSug }}</span>
|
|
|
|
+ <el-input v-else v-model="yearData.table[yearIndex].workSug" type="textarea" resize="none" />
|
|
</hc-info-table-td>
|
|
</hc-info-table-td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<hc-info-table-td is-title width="10%" center>填报单位</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>填报单位</hc-info-table-td>
|
|
<hc-info-table-td center width="40%">
|
|
<hc-info-table-td center width="40%">
|
|
- <span v-if="isDrawerType === 'view'">{{ testValue }}</span>
|
|
|
|
- <el-input v-else v-model="testValue" />
|
|
|
|
|
|
+ <span v-if="isDrawerType === 'view'">{{ yearData.table[yearIndex].unitInfo }}</span>
|
|
|
|
+ <el-input v-else v-model="yearData.table[yearIndex].unitInfo" />
|
|
</hc-info-table-td>
|
|
</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>联系人及联系方式</hc-info-table-td>
|
|
<hc-info-table-td is-title width="10%" center>联系人及联系方式</hc-info-table-td>
|
|
<hc-info-table-td center width="40%">
|
|
<hc-info-table-td center width="40%">
|
|
- <span v-if="isDrawerType === 'view'">{{ testValue }}</span>
|
|
|
|
- <el-input v-else v-model="testValue" />
|
|
|
|
|
|
+ <span v-if="isDrawerType === 'view'">{{ yearData.table[yearIndex].linkInfo }}</span>
|
|
|
|
+ <el-input v-else v-model="yearData.table[yearIndex].linkInfo" />
|
|
</hc-info-table-td>
|
|
</hc-info-table-td>
|
|
</tr>
|
|
</tr>
|
|
</hc-info-table>
|
|
</hc-info-table>
|
|
@@ -120,7 +120,7 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { ref, watch } from 'vue'
|
|
import { ref, watch } from 'vue'
|
|
import mainApi from '~api/project/gist'
|
|
import mainApi from '~api/project/gist'
|
|
-import { newDownBlob } from 'js-fast-way'
|
|
|
|
|
|
+import { getArrValue, getObjValue, newDownBlob } from 'js-fast-way'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
isAdmin: {
|
|
isAdmin: {
|
|
@@ -182,23 +182,6 @@ const rowNameClick = (row) => {
|
|
emit('tap', row)
|
|
emit('tap', row)
|
|
}
|
|
}
|
|
|
|
|
|
-//工作完成情况
|
|
|
|
-const tableYearData = ref([
|
|
|
|
- { month: '1月', key1: '', key2: '' },
|
|
|
|
- { month: '2月', key1: '', key2: '' },
|
|
|
|
- { month: '3月', key1: '', key2: '' },
|
|
|
|
- { month: '4月', key1: '', key2: '' },
|
|
|
|
- { month: '5月', key1: '', key2: '' },
|
|
|
|
- { month: '6月', key1: '', key2: '' },
|
|
|
|
- { month: '7月', key1: '', key2: '' },
|
|
|
|
- { month: '8月', key1: '', key2: '' },
|
|
|
|
- { month: '9月', key1: '', key2: '' },
|
|
|
|
- { month: '10月', key1: '', key2: '' },
|
|
|
|
- { month: '11月', key1: '', key2: '' },
|
|
|
|
- { month: '12月', key1: '', key2: '' },
|
|
|
|
-])
|
|
|
|
-const testValue = ref('')
|
|
|
|
-
|
|
|
|
//抽屉面板详情
|
|
//抽屉面板详情
|
|
const rowDrawerInfo = ref({})
|
|
const rowDrawerInfo = ref({})
|
|
|
|
|
|
@@ -228,20 +211,31 @@ const examine = (row) => {
|
|
|
|
|
|
//数据详情
|
|
//数据详情
|
|
const yearKey = ref('2023')
|
|
const yearKey = ref('2023')
|
|
-const yearIndex = ref(0)
|
|
|
|
|
|
+const yearIndex = ref(-1)
|
|
const yearChange = (_, index) => {
|
|
const yearChange = (_, index) => {
|
|
yearIndex.value = index
|
|
yearIndex.value = index
|
|
}
|
|
}
|
|
|
|
|
|
//获取数据详情
|
|
//获取数据详情
|
|
-const yearData = ref([])
|
|
|
|
|
|
+const yearData = ref({})
|
|
const getDetailData = async (id) => {
|
|
const getDetailData = async (id) => {
|
|
const { error, code, data, msg } = await mainApi.queryWorkFocusProgressInfoById(id)
|
|
const { error, code, data, msg } = await mainApi.queryWorkFocusProgressInfoById(id)
|
|
if (error || code !== 200) {
|
|
if (error || code !== 200) {
|
|
window.$message.error(msg ?? '删除失败')
|
|
window.$message.error(msg ?? '删除失败')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- console.log(data)
|
|
|
|
|
|
+ const res = getObjValue(data)
|
|
|
|
+ const table = getArrValue(res.table)
|
|
|
|
+ for (let i = 0; i < table.length; i++) {
|
|
|
|
+ table[i].data = getArrValue(table[i].data)
|
|
|
|
+ }
|
|
|
|
+ res.table = table
|
|
|
|
+ yearData.value = res
|
|
|
|
+ if (table.length > 0) {
|
|
|
|
+ yearKey.value = table[0].year
|
|
|
|
+ yearIndex.value = 0
|
|
|
|
+ }
|
|
|
|
+ console.log(res)
|
|
}
|
|
}
|
|
|
|
|
|
//删除
|
|
//删除
|