|
|
@@ -4,22 +4,28 @@
|
|
|
<HcNewCard>
|
|
|
<template #header>
|
|
|
<div class="w-32">
|
|
|
- <el-select v-model="searchForm.userName" placeholder="测量人" clearable filterable block @change="getTableData">
|
|
|
+ <el-select
|
|
|
+ v-model="searchForm.userName" placeholder="测量人" clearable filterable block
|
|
|
+ @change="getTableData"
|
|
|
+ >
|
|
|
<el-option v-for="item in peopleType" :key="item" :label="item" :value="item" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div class="ml-3 w-42">
|
|
|
+ <!-- <div class="ml-3 w-42">
|
|
|
<el-select v-model="searchForm.backBreak" clearable block placeholder="是否超欠挖 " @change="getTableData">
|
|
|
<el-option v-for="item in tasksStatus" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="ml-3 w-64">
|
|
|
<HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
|
|
|
</div>
|
|
|
</template>
|
|
|
<HcTable is-new :column="tableColumn" :datas="tableData">
|
|
|
- <template #backBreak="{ row }">
|
|
|
+ <!-- <template #backBreak="{ row }">
|
|
|
{{ tasksStatus.find(item => item.value == row.backBreak)?.label || row.backBreak }}
|
|
|
+ </template> -->
|
|
|
+ <template #backBreak="{ row }">
|
|
|
+ {{ taskStatus.find(item => item.dictKey === row.backBreak)?.dictValue || row.backBreak }}
|
|
|
</template>
|
|
|
<template #action="{ row }">
|
|
|
<el-link type="primary" @click="viewSubmit(row)">查看详情</el-link>
|
|
|
@@ -31,18 +37,21 @@
|
|
|
</template>
|
|
|
</HcNewCard>
|
|
|
<!-- 编辑 -->
|
|
|
- <cross-add v-model="editModal" :form-disabled="formDisabled" :row-id="rowId" @save="getTableData" />
|
|
|
+ <cross-add
|
|
|
+ v-model="editModal" :form-disabled="formDisabled" :row-id="rowId" :task-status="taskStatus"
|
|
|
+ @save="getTableData"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted, ref } from 'vue'
|
|
|
-
|
|
|
import crossApi from '~api/cross/cross'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import { getArrValue } from 'js-fast-way'
|
|
|
import crossAdd from './cross-add.vue'
|
|
|
-import { getDictionaryData } from '~uti/tools'
|
|
|
+import { getDictionaryBiz } from '~api/other'
|
|
|
+// import { getDictionaryData } from '~uti/tools'
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId)
|
|
|
const contractId = ref(useAppState.contractId)
|
|
|
@@ -54,49 +63,42 @@ const tableColumn = [
|
|
|
{ key: 'date', name: '测量时间' },
|
|
|
{ key: 'userName', name: '测量人' },
|
|
|
{ key: 'mileageNumber', name: '里程号' },
|
|
|
- { key: 'backBreak', name: '是否超欠挖' },
|
|
|
- { key: 'action', name: '操作', width:150 },
|
|
|
+ { key: 'backBreak', name: '围岩等级' },
|
|
|
+ // { key: 'backBreak', name: '是否超欠挖' },
|
|
|
+ { key: 'action', name: '操作', width: 150 },
|
|
|
]
|
|
|
-const tableData = ref([
|
|
|
-
|
|
|
-])
|
|
|
+const tableData = ref([])
|
|
|
//搜索表单
|
|
|
const searchForm = ref({
|
|
|
- current: 1, size: 20, total: 0, userName:'', backBreak:'', startTime:'', endTime:'',
|
|
|
-
|
|
|
+ current: 1, size: 20, total: 0, userName: '', backBreak: '', startTime: '', endTime: '',
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
getTableData()
|
|
|
getPeopleType()
|
|
|
getTasksStatusOptions()
|
|
|
-
|
|
|
})
|
|
|
const peopleType = ref([])
|
|
|
const getPeopleType = async () => {
|
|
|
- const { error, code, data } = await crossApi.getListUserName()
|
|
|
+ const { error, code, data } = await crossApi.getListUserName()
|
|
|
//判断状态
|
|
|
-
|
|
|
+
|
|
|
if (!error && code === 200) {
|
|
|
peopleType.value = getArrValue(data)
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
peopleType.value = []
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+const taskStatus = ref([])
|
|
|
const getTasksStatusOptions = async () => {
|
|
|
- tasksStatus.value = await getDictionaryData('q_profiler_back_break', true)
|
|
|
- tasksStatus.value.forEach(item => {
|
|
|
- item.value = String(item.value)
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ // tasksStatus.value = await getDictionaryData('profile_level', true)
|
|
|
+ const { data } = await getDictionaryBiz({ code: 'profile_level' })
|
|
|
+ taskStatus.value = getArrValue(data)
|
|
|
+ // tasksStatus.value = await getDictionaryData('q_profiler_back_break', true)
|
|
|
+ console.log(taskStatus.value)
|
|
|
}
|
|
|
-const tasksStatus = ref([
|
|
|
-
|
|
|
-])
|
|
|
+
|
|
|
//日期时间被选择
|
|
|
const betweenTime = ref(null)
|
|
|
const betweenTimeUpdate = ({ val, arr }) => {
|
|
|
@@ -104,7 +106,6 @@ const betweenTimeUpdate = ({ val, arr }) => {
|
|
|
searchForm.value.startTime = val['start']
|
|
|
searchForm.value.endTime = val['end']
|
|
|
getTableData()
|
|
|
-
|
|
|
}
|
|
|
//分页被点击
|
|
|
const pageChange = ({ current, size }) => {
|
|
|
@@ -118,8 +119,7 @@ const getTableData = async () => {
|
|
|
const { error, code, data } = await crossApi.queryListData({
|
|
|
...searchForm.value,
|
|
|
projectId: projectId.value,
|
|
|
- contractId:contractId.value,
|
|
|
-
|
|
|
+ contractId: contractId.value,
|
|
|
})
|
|
|
//判断状态
|
|
|
tableLoading.value = false
|
|
|
@@ -135,20 +135,17 @@ const getTableData = async () => {
|
|
|
const editModal = ref(false)//提交整改
|
|
|
const rowId = ref(null)
|
|
|
const formDisabled = ref(false)
|
|
|
-const changeRow = (row)=>{
|
|
|
+const changeRow = (row) => {
|
|
|
rowId.value = row['id']
|
|
|
editModal.value = true
|
|
|
formDisabled.value = false
|
|
|
-
|
|
|
}
|
|
|
//查看详情
|
|
|
-const viewSubmit = async (row)=>{
|
|
|
- rowId.value = row['id']
|
|
|
+const viewSubmit = async (row) => {
|
|
|
+ rowId.value = row['id']
|
|
|
formDisabled.value = true
|
|
|
- editModal.value = true
|
|
|
-
|
|
|
+ editModal.value = true
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang='scss' scoped>
|
|
|
-</style>
|
|
|
+<style lang='scss' scoped></style>
|