|
|
@@ -26,12 +26,10 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="部门">
|
|
|
- <a-select v-model="queryParam.deptIdList" mode="multiple" placeholder="请选择部门" allowClear showSearch
|
|
|
- optionFilterProp="label">
|
|
|
- <a-select-option v-for="item in deptList" :key="item.deptId" :label="item.name"
|
|
|
- :value="item.deptId">{{ item.name }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
+ :treeData="deptTreeData" :treeNodeFilterProp="'title'" :showSearch="true"
|
|
|
+ v-model="queryParam.deptIdList" multiple allowClear :maxTagCount="3" :maxTagTextLength="10" placeholder="请选择部门">
|
|
|
+ </a-tree-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
@@ -40,8 +38,17 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="工单类别">
|
|
|
+ <a-select v-model="queryParam.categoryList" mode="multiple" showSearch :filterOption="filterOption" :maxTagCount="3" :maxTagTextLength="10" placeholder="请选择">
|
|
|
+ <a-select-option v-for="(label, value) in planFlagMap" :key="value" :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="状态">
|
|
|
- <a-select v-model="queryParam.statusList" mode="multiple" placeholder="请选择">
|
|
|
+ <a-select v-model="queryParam.statusList" mode="multiple" showSearch :filterOption="filterOption" :maxTagCount="3" :maxTagTextLength="10" placeholder="请选择">
|
|
|
<a-select-option v-for="(label, value) in statusMap" :key="value" :label="label"
|
|
|
:value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
@@ -49,6 +56,15 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="是否停机">
|
|
|
+ <a-select v-model="queryParam.needStop" placeholder="请选择" allowClear>
|
|
|
+ <a-select-option v-for="(label, value) in needStopMap" :key="value" :label="label"
|
|
|
+ :value="parseInt(value)">{{ label }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="报修起始日期">
|
|
|
<a-date-picker v-model="queryParam.searchStartTime" style="width: 100%"
|
|
|
:format="BaseTool.Date.PICKER_NORM_DATE_PATTERN" />
|
|
|
@@ -112,6 +128,10 @@
|
|
|
<badge :text="BaseTool.Object.getField(statusMap, text)"
|
|
|
:status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]" />
|
|
|
</span>
|
|
|
+ <span slot="needStop" slot-scope="text"
|
|
|
+ :style="{ color: Number(text) === 1 ? 'red' : undefined, fontWeight: Number(text) === 1 ? 'bold' : undefined }">
|
|
|
+ {{ BaseTool.Object.getField(needStopMap, text) }}
|
|
|
+ </span>
|
|
|
<span slot="level" slot-scope="text">
|
|
|
<badge :text="BaseTool.Object.getField(levelMap, text)"
|
|
|
:status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[text]" />
|
|
|
@@ -136,7 +156,7 @@ import Detail from './modules/DetailRepair'
|
|
|
import DetailOut from './modules/DetailRepairOut'
|
|
|
import { getRepairApplicationFormPage, deleteRepairApplicationForms, fetchRepairApplicationForm, exportRepairApplicationForm } from '@/api/repair/application-form'
|
|
|
import DispatchBaseForm from '@/views/repair/application-form/modules/DispatchBaseForm'
|
|
|
-import { queryDept } from '@/api/upms/dept'
|
|
|
+import { queryDept, getDeptTree } from '@/api/upms/dept'
|
|
|
// import { selectUserDept } from '@/api/upms/user-dept'
|
|
|
|
|
|
export default {
|
|
|
@@ -174,7 +194,9 @@ export default {
|
|
|
repairUserName: null,
|
|
|
deptIdList: skipDeptDefault ? [] : [this.$store.getters.userInfo.deptId],
|
|
|
content: null,
|
|
|
+ categoryList: undefined,
|
|
|
statusList: undefined,
|
|
|
+ needStop: undefined,
|
|
|
searchStartTime: null,
|
|
|
searchEndTime: null
|
|
|
},
|
|
|
@@ -260,6 +282,14 @@ export default {
|
|
|
dataIndex: 'repairUserName'
|
|
|
},
|
|
|
{
|
|
|
+ title: '是否停机',
|
|
|
+ checked: true,
|
|
|
+ align: 'center',
|
|
|
+ width: '100px',
|
|
|
+ dataIndex: 'needStop',
|
|
|
+ scopedSlots: { customRender: 'needStop' }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '紧急程度',
|
|
|
checked: true,
|
|
|
align: 'center',
|
|
|
@@ -317,6 +347,7 @@ export default {
|
|
|
faultTypeMap: {},
|
|
|
// 部门下拉数据
|
|
|
deptList: [],
|
|
|
+ deptTreeData: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
parameter = {
|
|
|
@@ -367,9 +398,16 @@ export default {
|
|
|
queryDept({}).then(res => {
|
|
|
this.deptList = res.data || []
|
|
|
})
|
|
|
+ getDeptTree({}).then(res => {
|
|
|
+ this.deptTreeData = res.data || []
|
|
|
+ })
|
|
|
this.tableOption()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 下拉框搜索过滤函数
|
|
|
+ filterOption(input, option) {
|
|
|
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ },
|
|
|
tableOption() {
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
@@ -458,7 +496,9 @@ export default {
|
|
|
this.queryParam.actualUser = null
|
|
|
this.queryParam.repairUserName = null
|
|
|
this.queryParam.content = null
|
|
|
+ this.queryParam.categoryList = undefined
|
|
|
this.queryParam.statusList = undefined
|
|
|
+ this.queryParam.needStop = undefined
|
|
|
this.queryParam.searchStartTime = null
|
|
|
this.queryParam.searchEndTime = null
|
|
|
// 部门:先清空让 a-select 同步状态
|
|
|
@@ -492,3 +532,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+/* 修复 tree-select 多选显示溢出问题 */
|
|
|
+.ant-select-selection--multiple {
|
|
|
+ max-height: 80px;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.ant-select-selection--multiple .ant-select-selection__choice {
|
|
|
+ max-width: 100%;
|
|
|
+}
|
|
|
+</style>
|