故障查询调整

This commit is contained in:
joylink_zhaoerwei 2024-11-08 17:59:50 +08:00
parent 7971887d2c
commit f10e55ce0d

View File

@ -56,7 +56,11 @@
:options="searchOptionsFaultType" :options="searchOptionsFaultType"
style="min-width: 130px" style="min-width: 130px"
/> />
<q-input label="故障内容" v-model="filter.faultName" lazy-rules /> <q-input
:label="inputSearchName"
v-model="filter.faultName"
lazy-rules
/>
<div class="button-container"> <div class="button-container">
<q-btn <q-btn
color="primary" color="primary"
@ -73,7 +77,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, reactive, ref,computed } from 'vue'; import { onMounted, reactive, ref, computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import DraggableDialog from '../common/DraggableDialog.vue'; import DraggableDialog from '../common/DraggableDialog.vue';
import { QTable, useQuasar } from 'quasar'; import { QTable, useQuasar } from 'quasar';
@ -98,7 +102,7 @@ const tableTitle = reactive({
}); });
const tableRef = ref<QTable>(); const tableRef = ref<QTable>();
const columns =computed(()=> [ const columns = computed(() => [
{ {
name: 'id', name: 'id',
label: '编号', label: '编号',
@ -116,7 +120,7 @@ const columns =computed(()=> [
{ {
name: 'faultType', name: 'faultType',
label: '故障类型', label: '故障类型',
field: (row:FaultQueryListItem) => { field: (row: FaultQueryListItem) => {
if (row.faultType) { if (row.faultType) {
return getFaultTypeName(row); return getFaultTypeName(row);
} }
@ -144,7 +148,7 @@ const columns =computed(()=> [
required: true, required: true,
align: 'center', align: 'center',
}, },
]) ]);
const rows = reactive([]); const rows = reactive([]);
const loading = ref(false); const loading = ref(false);
const pagination = ref({ const pagination = ref({
@ -268,12 +272,15 @@ const onDialogShow = () => {
}, 1000); }, 1000);
}; };
const inputSearchName = ref('');
onMounted(() => { onMounted(() => {
if (props.dialogTitle == '故障指导') { if (props.dialogTitle == '故障指导') {
inputSearchName.value = '故障现象';
tableTitle.faultNameShower = '故障现象'; tableTitle.faultNameShower = '故障现象';
tableTitle.faultDriverShower = '司机处理结果'; tableTitle.faultDriverShower = '司机处理结果';
tableTitle.resultMsg = '行调提醒司机关键点'; tableTitle.resultMsg = '行调提醒司机关键点';
} else { } else {
inputSearchName.value = '故障名称';
tableTitle.faultNameShower = '故障名称'; tableTitle.faultNameShower = '故障名称';
tableTitle.faultDriverShower = '故障现象'; tableTitle.faultDriverShower = '故障现象';
tableTitle.resultMsg = '退出服务地点'; tableTitle.resultMsg = '退出服务地点';