|
@@ -5,101 +5,11 @@
|
|
|
<div class="ele-body">
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
|
- <el-form
|
|
|
|
|
- label-width="100px"
|
|
|
|
|
- class="ele-form-search"
|
|
|
|
|
- @keyup.enter.native="reload"
|
|
|
|
|
- @submit.native.prevent
|
|
|
|
|
- >
|
|
|
|
|
- <el-row :gutter="15">
|
|
|
|
|
- <el-col
|
|
|
|
|
- v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item label="工单编号">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="searchForm.code"
|
|
|
|
|
- placeholder="请输入"
|
|
|
|
|
- size="small"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col
|
|
|
|
|
- v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item label="规则名称">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="searchForm.ruleId"
|
|
|
|
|
- size="small"
|
|
|
|
|
- clearable
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- filterable
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in ruleNameList"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- :label="item.name"
|
|
|
|
|
- ></el-option> </el-select
|
|
|
|
|
- ></el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col
|
|
|
|
|
- v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item label="状态">
|
|
|
|
|
- <el-select
|
|
|
|
|
- filterable
|
|
|
|
|
- clearable
|
|
|
|
|
- v-model="searchForm.orderStatus"
|
|
|
|
|
- size="small"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in ticketStatus"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- :value="item.id"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col
|
|
|
|
|
- v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-form-item label="开始结束时间">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- class="form-input"
|
|
|
|
|
- size="small"
|
|
|
|
|
- v-model="searchForm.date"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
|
|
- @change="changeDate"
|
|
|
|
|
- >
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :md="4" :sm="16" :xs="16" style="text-align: right">
|
|
|
|
|
- <el-button
|
|
|
|
|
- icon="el-icon-refresh-left"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="reload('reset')"
|
|
|
|
|
- >重置</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-search"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="reload('search')"
|
|
|
|
|
- >搜索</el-button
|
|
|
|
|
- ></el-col
|
|
|
|
|
- >
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <seekPage
|
|
|
|
|
+ :seekList="seekList"
|
|
|
|
|
+ :formLength="3"
|
|
|
|
|
+ @search="search"
|
|
|
|
|
+ ></seekPage>
|
|
|
</div>
|
|
</div>
|
|
|
<ele-pro-table
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
ref="table"
|
|
@@ -170,6 +80,7 @@
|
|
|
resultStatus,
|
|
resultStatus,
|
|
|
//
|
|
//
|
|
|
addOrEditDialogFlag: false,
|
|
addOrEditDialogFlag: false,
|
|
|
|
|
+
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
@@ -303,6 +214,45 @@
|
|
|
// 是否开启响应式布局
|
|
// 是否开启响应式布局
|
|
|
styleResponsive() {
|
|
styleResponsive() {
|
|
|
return this.$store.state.theme.styleResponsive;
|
|
return this.$store.state.theme.styleResponsive;
|
|
|
|
|
+ },
|
|
|
|
|
+ seekList() {
|
|
|
|
|
+ return [
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '工单编号',
|
|
|
|
|
+ value: 'code',
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ placeholder: ' '
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '规则名称:',
|
|
|
|
|
+ value: 'ruleId',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ placeholder: ' ',
|
|
|
|
|
+ planList: this.ruleNameList.map((item) => {
|
|
|
|
|
+ return { label: item.name, value: item.id };
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '状态',
|
|
|
|
|
+ value: 'orderStatus',
|
|
|
|
|
+ type: 'select',
|
|
|
|
|
+ planList: ticketStatus.map((item) => {
|
|
|
|
|
+ return { label: item.label, value: item.id };
|
|
|
|
|
+ }),
|
|
|
|
|
+ placeholder: ' '
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '开始结束时间:',
|
|
|
|
|
+ value: 'createTime',
|
|
|
|
|
+ type: 'date',
|
|
|
|
|
+ dateType: 'datetimerange',
|
|
|
|
|
+ placeholder: '',
|
|
|
|
|
+ width: 380,
|
|
|
|
|
+ labelWidth: '130px',
|
|
|
|
|
+ valueAr: ['startTime', 'endTime']
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -311,33 +261,21 @@
|
|
|
await updateNotifyMessageReadByIdAPI([row.id]);
|
|
await updateNotifyMessageReadByIdAPI([row.id]);
|
|
|
this.$refs.table.reload();
|
|
this.$refs.table.reload();
|
|
|
},
|
|
},
|
|
|
- reload(type) {
|
|
|
|
|
- if (type == 'reset') {
|
|
|
|
|
- this.searchForm.code = '';
|
|
|
|
|
- this.searchForm.orderStatus = '';
|
|
|
|
|
- this.searchForm.ruleId = '';
|
|
|
|
|
- this.searchForm.date = '';
|
|
|
|
|
- this.searchForm.startTime = '';
|
|
|
|
|
- this.searchForm.endTime = '';
|
|
|
|
|
- this.searchForm.type = 1;
|
|
|
|
|
- }
|
|
|
|
|
- let params = Object.assign({}, this.searchForm);
|
|
|
|
|
- delete params.date;
|
|
|
|
|
- this.$refs.table.reload({ page: 1, where: params });
|
|
|
|
|
|
|
+ search(e) {
|
|
|
|
|
+ this.searchForm = e;
|
|
|
|
|
+ this.$refs.table.reload({ page: 1, where: e });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 获取table数据
|
|
// 获取table数据
|
|
|
async datasource({ page, where, limit, ...row }) {
|
|
async datasource({ page, where, limit, ...row }) {
|
|
|
- this.searchForm.executeUserId = this.userId;
|
|
|
|
|
- let params = Object.assign({}, this.searchForm);
|
|
|
|
|
- delete params.date;
|
|
|
|
|
-
|
|
|
|
|
const res = await getWorkOrderPage({
|
|
const res = await getWorkOrderPage({
|
|
|
- ...params,
|
|
|
|
|
...where,
|
|
...where,
|
|
|
pageNum: page,
|
|
pageNum: page,
|
|
|
size: limit,
|
|
size: limit,
|
|
|
- userId: this.user.info.userId
|
|
|
|
|
|
|
+ executeUserId: this.userId,
|
|
|
|
|
+ userId: this.user.info.userId,
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ isQueryTodo: 1
|
|
|
});
|
|
});
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
this.total = res.total;
|
|
this.total = res.total;
|
|
@@ -375,22 +313,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
getData() {
|
|
getData() {
|
|
|
- let par = {
|
|
|
|
|
- ...this.pages,
|
|
|
|
|
- ...this.searchForm,
|
|
|
|
|
- executeUserId: this.userId,
|
|
|
|
|
- statusType: 0
|
|
|
|
|
- };
|
|
|
|
|
- if (this.searchForm.date) {
|
|
|
|
|
- par.startTime = this.searchForm.date[0];
|
|
|
|
|
- par.endTime = this.searchForm.date[1];
|
|
|
|
|
- }
|
|
|
|
|
- delete par.date;
|
|
|
|
|
- getWorkOrderPage(par).then((res) => {
|
|
|
|
|
- this.tableData = res.list;
|
|
|
|
|
- this.total = res.total;
|
|
|
|
|
- });
|
|
|
|
|
- this.$emit('recount');
|
|
|
|
|
|
|
+ this.search(this.searchForm);
|
|
|
},
|
|
},
|
|
|
// 计算实际工时
|
|
// 计算实际工时
|
|
|
time_interval(dt1, dt2) {
|
|
time_interval(dt1, dt2) {
|
|
@@ -415,15 +338,6 @@
|
|
|
result += `${m} 分钟`;
|
|
result += `${m} 分钟`;
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
- },
|
|
|
|
|
- changeDate(val) {
|
|
|
|
|
- if (val === null) {
|
|
|
|
|
- this.searchForm.startTime = '';
|
|
|
|
|
- this.searchForm.endTime = '';
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- this.searchForm.startTime = val[0];
|
|
|
|
|
- this.searchForm.endTime = val[1];
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|