新增类型

This commit is contained in:
2023-04-07 15:54:30 +08:00
parent d106c62c62
commit 419e47c47f

View File

@@ -9,6 +9,12 @@
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select> <uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view> </view>
</view> </view>
<view class="search-item">
<label class="search-label">任务类型</label>
<view class="filter_input_wraper">
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
</view>
</view>
<view class="search-item"> <view class="search-item">
<label class="search-label">状态</label> <label class="search-label">状态</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
@@ -125,7 +131,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {instStatusQuery, instPageQuery, instOperation} from '@/utils/getData1.js' import {instStatusQuery, instPageQuery, instOperation, taskType} from '@/utils/getData1.js'
import {dateFtt} from '@/utils//utils.js' import {dateFtt} from '@/utils//utils.js'
export default { export default {
components: { components: {
@@ -139,6 +145,8 @@
index1: '', index1: '',
options2: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}], options2: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index2: 'A1', index2: 'A1',
options3: [],
index3: '',
startDate: dateFtt(new Date()), startDate: dateFtt(new Date()),
endDate: dateFtt(new Date(new Date().setDate(new Date().getDate() + 1))), endDate: dateFtt(new Date(new Date().setDate(new Date().getDate() + 1))),
instNum: '', instNum: '',
@@ -163,6 +171,7 @@
}, },
created() { created() {
this._instStatusQuery() this._instStatusQuery()
this._taskType()
}, },
methods: { methods: {
open1(){ open1(){
@@ -187,14 +196,22 @@
selectChange1(e) { selectChange1(e) {
this.index1 = e this.index1 = e
}, },
/** 选择器1 */ /** 选择器2 */
selectChange2(e) { selectChange2(e) {
this.index2 = e this.index2 = e
}, },
/** 选择器2 */
selectChange3(e) {
this.index3 = e
},
async _instStatusQuery (id) { async _instStatusQuery (id) {
let res = await instStatusQuery(id) let res = await instStatusQuery(id)
this.options1 = [...res] this.options1 = [...res]
}, },
async _taskType (id) {
let res = await taskType(id)
this.options3 = [...res]
},
toSearch () { toSearch () {
this.dataList = [] this.dataList = []
this.pageNum = 1 this.pageNum = 1
@@ -208,7 +225,7 @@
status: this.index1, status: this.index1,
inst_num: this.instNum, inst_num: this.instNum,
task_name: this.taskName, task_name: this.taskName,
task_type: this.taskName, task_type: this.index3,
product_area: this.index2, product_area: this.index2,
vehicle_code: this.val1, vehicle_code: this.val1,
start_point: this.startPoint, start_point: this.startPoint,