|
|
@@ -44,37 +44,8 @@
|
|
|
icon="el-icon-download"
|
|
|
@click="handleExport">导出
|
|
|
</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template slot-scope="{type,size}" slot="createTimeSearch">
|
|
|
- <el-radio-group v-model="query.createTimeType" :size="size" style="float: left">
|
|
|
- <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
|
|
|
- <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 HH:mm:ss"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择日期"
|
|
|
- :size="size"
|
|
|
- @change="searchStateChange"
|
|
|
- style="width: 280px;margin-left:5px;float: left"
|
|
|
- range-separator="-"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"></avue-date>
|
|
|
- </template>
|
|
|
|
|
|
- <template slot-scope="{type,size}" slot="categorySearch">
|
|
|
- <el-radio-group v-model="query.category" :size="size" @change="searchStateChange">
|
|
|
- <el-radio-button :label="select.dictKey" v-for="(select,index) in categoryList" :key="index">{{ select.dictValue }}</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- </template>
|
|
|
- <template slot-scope="{type,size}" slot="modelSearch">
|
|
|
- <el-radio-group v-model="query.model" :size="size" @change="searchStateChange">
|
|
|
- <el-radio-button :label="select.dictKey" v-for="(select,index) in modelList" :key="index">{{ select.dictValue }}</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
+ <span>操作栏:<el-switch v-model="option.menu"></el-switch></span>
|
|
|
</template>
|
|
|
|
|
|
<template slot-scope="{row}" slot="menu" >
|
|
|
@@ -212,8 +183,6 @@
|
|
|
|
|
|
form: {},
|
|
|
query: {
|
|
|
- createTimeType: -1,
|
|
|
- createTimeRange: [],
|
|
|
},
|
|
|
loading: true,
|
|
|
page: {
|
|
|
@@ -223,12 +192,13 @@
|
|
|
},
|
|
|
selectionList: [],
|
|
|
option: {
|
|
|
+ menu: false,
|
|
|
indexLabel: "序号",
|
|
|
height:'auto',
|
|
|
menuWidth: 100,
|
|
|
calcHeight: 30,
|
|
|
tip: false,
|
|
|
- searchBtn: false,
|
|
|
+ // searchBtn: false,
|
|
|
searchMenuSpan: 6,
|
|
|
border: true,
|
|
|
index: true,
|
|
|
@@ -237,7 +207,7 @@
|
|
|
addBtn: false,
|
|
|
delBtn: false,
|
|
|
selection: true,
|
|
|
- searchShow: false,
|
|
|
+ // searchShow: false,
|
|
|
dialogClickModal: false,
|
|
|
searchSize: "mini",
|
|
|
align: "center",
|
|
|
@@ -266,7 +236,7 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
- {
|
|
|
+ /* {
|
|
|
label: "图号",
|
|
|
prop: "pictureNo",
|
|
|
search: true,
|
|
|
@@ -276,7 +246,7 @@
|
|
|
message: "请输入图号",
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
- },
|
|
|
+ },*/
|
|
|
{
|
|
|
label: "电缆代号",
|
|
|
prop: "alias",
|
|
|
@@ -300,14 +270,14 @@
|
|
|
value: "dictKey"
|
|
|
},
|
|
|
// dicData: [],
|
|
|
- searchslot: true,
|
|
|
+ /*searchslot: true,
|
|
|
dicFormatter: (res) => {
|
|
|
this.categoryList = res.data;
|
|
|
// this.findObject(this.option.column, 'category').dicData = res.data;
|
|
|
return res.data;
|
|
|
- },
|
|
|
+ },*/
|
|
|
search: true,
|
|
|
- searchSpan: 24,
|
|
|
+ searchSpan: 4,
|
|
|
searchOrder: 1,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
@@ -328,14 +298,14 @@
|
|
|
value: "dictKey"
|
|
|
},
|
|
|
// dicData: [],
|
|
|
- searchslot: true,
|
|
|
+ /*searchslot: true,
|
|
|
dicFormatter: (res) => {
|
|
|
this.modelList = res.data;
|
|
|
// this.findObject(this.option.column, 'model').dicData = res.data;
|
|
|
return res.data;
|
|
|
- },
|
|
|
+ },*/
|
|
|
search: true,
|
|
|
- searchSpan: 24,
|
|
|
+ searchSpan: 4,
|
|
|
searchOrder: 1,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
@@ -566,7 +536,7 @@
|
|
|
addDisplay: false,
|
|
|
editDisplay: false,
|
|
|
search: true,
|
|
|
- searchSpan: 24,
|
|
|
+ searchSpan: 6,
|
|
|
searchOrder: 0,
|
|
|
searchslot: true,
|
|
|
},
|
|
|
@@ -587,7 +557,7 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
- {
|
|
|
+ /* {
|
|
|
label: "图号",
|
|
|
prop: "pictureNo",
|
|
|
search: true,
|
|
|
@@ -597,7 +567,7 @@
|
|
|
message: "请输入图号",
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
- },
|
|
|
+ },*/
|
|
|
{
|
|
|
label: "电缆代号",
|
|
|
prop: "alias",
|
|
|
@@ -912,57 +882,21 @@
|
|
|
},
|
|
|
watch: {
|
|
|
//监听创建时间变化
|
|
|
- "query.createTimeType": {
|
|
|
- handler(value) {
|
|
|
- //防止重复调用
|
|
|
- if (value !== undefined) {
|
|
|
- this.query.createTimeRange = [];
|
|
|
- switch (value) {
|
|
|
- case -1:
|
|
|
- this.query.createTimeBegin = undefined;
|
|
|
- this.query.createTimeEnd = undefined;
|
|
|
- break;
|
|
|
- case 1: //今天
|
|
|
- this.query.createTimeBegin = moment().format("yyyy-MM-DD 00:00:00");
|
|
|
- this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
- break;
|
|
|
- case 2: //昨天
|
|
|
- this.query.createTimeBegin = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
|
|
|
- this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
|
|
|
- break;
|
|
|
- case 3: //近7天
|
|
|
- this.query.createTimeBegin = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
|
|
|
- this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
- break;
|
|
|
- case 4: //近30天
|
|
|
- this.query.createTimeBegin = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
|
|
|
- this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
|
|
|
- break;
|
|
|
- case 5: //本月
|
|
|
- this.query.createTimeBegin = moment().format("yyyy-MM-01 00:00:00");
|
|
|
- this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
|
|
|
- break;
|
|
|
- case 6: //本年
|
|
|
- this.query.createTimeBegin = moment().format("yyyy-01-01 00:00:00");
|
|
|
- this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //监听创建时间变化
|
|
|
- "query.createTimeRange": {
|
|
|
+ "query.createTime": {
|
|
|
handler(value) {
|
|
|
//防止重复调用
|
|
|
if (value.length === 2) {
|
|
|
- this.query.createTimeBegin = value[0];
|
|
|
- this.query.createTimeEnd = value[1];
|
|
|
+
|
|
|
this.query.createTime = undefined;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ 'excelForm.isCovered'() {
|
|
|
+ if (this.excelForm.isCovered !== '') {
|
|
|
+ const column = this.findObject(this.excelOption.column, "excelFile");
|
|
|
+ column.action = `/api/ship/cable/import-cable?isCovered=${this.excelForm.isCovered}`;
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
let alias = this.$route.query.alias;
|
|
|
@@ -973,6 +907,9 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleTest(){
|
|
|
+ this.option.menu = !this.option.menu;
|
|
|
+ },
|
|
|
bindTag(row){
|
|
|
let _this = this;
|
|
|
this.$prompt("请输入标签号?", {
|
|
|
@@ -1014,11 +951,11 @@
|
|
|
this.refreshChange();
|
|
|
done();
|
|
|
},
|
|
|
- searchStateChange(){
|
|
|
+ /*searchStateChange(){
|
|
|
setTimeout(() => {
|
|
|
this.onLoad(this.page, this.query);
|
|
|
}, 100);
|
|
|
- },
|
|
|
+ },*/
|
|
|
rowSave(row, done, loading) {
|
|
|
debugger
|
|
|
add(row).then(() => {
|
|
|
@@ -1113,13 +1050,17 @@
|
|
|
done();
|
|
|
},
|
|
|
searchReset() {
|
|
|
- this.query = {createTimeType: -1};
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
searchChange(params, done) {
|
|
|
- let createTimeType = this.query.createTimeType;
|
|
|
+
|
|
|
+ if (params.createTime){
|
|
|
+ params.createTimeBegin = params.createTime[0];
|
|
|
+ params.createTimeEnd = params.createTime[1];
|
|
|
+ delete params.createTime;
|
|
|
+ }
|
|
|
+
|
|
|
this.query = params;
|
|
|
- this.query.createTimeType = createTimeType;
|
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page, params);
|
|
|
done();
|