|
@@ -19,6 +19,15 @@
|
|
|
:inline="true"
|
|
:inline="true"
|
|
|
style="float: right;position:absolute;right:15px;top:10.5px"
|
|
style="float: right;position:absolute;right:15px;top:10.5px"
|
|
|
>
|
|
>
|
|
|
|
|
+ <el-form-item label="申请时间">
|
|
|
|
|
+ <el-date-picker size="mini"
|
|
|
|
|
+ style="width: 220px"
|
|
|
|
|
+ v-model="CreateOn"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"></el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="推荐单位">
|
|
<el-form-item label="推荐单位">
|
|
|
<el-input size="mini" v-model="searchForm.FullName" placeholder="请输入内容"></el-input>
|
|
<el-input size="mini" v-model="searchForm.FullName" placeholder="请输入内容"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -81,33 +90,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import api from "@/api/oilsupplier/select";
|
|
|
|
|
-import FileSaver from "file-saver";
|
|
|
|
|
-import XLSX from "xlsx";
|
|
|
|
|
-import oapi from "@/api/oilsupplier/supplier";
|
|
|
|
|
|
|
+import api from '@/api/oilsupplier/select'
|
|
|
|
|
+import FileSaver from 'file-saver'
|
|
|
|
|
+import XLSX from 'xlsx'
|
|
|
export default {
|
|
export default {
|
|
|
- created() {
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ created () {
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
// 定义列表数据
|
|
// 定义列表数据
|
|
|
entityList: [],
|
|
entityList: [],
|
|
|
|
|
+ CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
// 分页参数
|
|
// 分页参数
|
|
|
size: 10,
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
currentItemCount: 0,
|
|
currentItemCount: 0,
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
- FullName: ""
|
|
|
|
|
|
|
+ FullName: ''
|
|
|
},
|
|
},
|
|
|
- //列表排序
|
|
|
|
|
|
|
+ // 列表排序
|
|
|
Column: {
|
|
Column: {
|
|
|
- Order: "",
|
|
|
|
|
- Prop: ""
|
|
|
|
|
|
|
+ Order: '',
|
|
|
|
|
+ Prop: ''
|
|
|
},
|
|
},
|
|
|
spanArr: [],
|
|
spanArr: [],
|
|
|
pos: 0
|
|
pos: 0
|
|
|
- };
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -164,62 +173,83 @@ export default {
|
|
|
return wbout;
|
|
return wbout;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- //列表排序功能
|
|
|
|
|
- orderby(column) {
|
|
|
|
|
- if (column.order == "ascending") {
|
|
|
|
|
- this.Column.Order = "asc";
|
|
|
|
|
- } else if (column.order == "descending") {
|
|
|
|
|
- this.Column.Order = "desc";
|
|
|
|
|
|
|
+ // 列表排序功能
|
|
|
|
|
+ orderby (column) {
|
|
|
|
|
+ if (column.order === 'ascending') {
|
|
|
|
|
+ this.Column.Order = 'asc'
|
|
|
|
|
+ } else if (column.order === 'descending') {
|
|
|
|
|
+ this.Column.Order = 'desc'
|
|
|
}
|
|
}
|
|
|
- this.Column.Prop = column.prop;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ this.Column.Prop = column.prop
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- //初始化列表方法
|
|
|
|
|
- initDatas(event) {
|
|
|
|
|
- this.spanArr= []
|
|
|
|
|
|
|
+ // 初始化列表方法
|
|
|
|
|
+ initDatas (event) {
|
|
|
|
|
+ this.spanArr = []
|
|
|
if (event != null) {
|
|
if (event != null) {
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
|
+ }
|
|
|
|
|
+ let myCreateOn = []
|
|
|
|
|
+ // 解析时间
|
|
|
|
|
+ if (this.CreateOn != null && this.CreateOn.length === 2) {
|
|
|
|
|
+ this.CreateOn[1].setHours(23)
|
|
|
|
|
+ this.CreateOn[1].setMinutes(59)
|
|
|
|
|
+ this.CreateOn[1].setSeconds(59)
|
|
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
}
|
|
}
|
|
|
let params = {
|
|
let params = {
|
|
|
_size: this.size,
|
|
_size: this.size,
|
|
|
_currentPage: this.currentPage,
|
|
_currentPage: this.currentPage,
|
|
|
- Order: "desc",
|
|
|
|
|
- Prop: "Fullname"
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ Order: 'desc',
|
|
|
|
|
+ Prop: 'Fullname',
|
|
|
|
|
+ CreateOn: myCreateOn.join(',')
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- console.log(params);
|
|
|
|
|
|
|
+ console.log(params)
|
|
|
api
|
|
api
|
|
|
.up(params, this.searchForm, this.$axios)
|
|
.up(params, this.searchForm, this.$axios)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.entityList = res.data.items;
|
|
|
|
|
- console.log("----this.entityList--",this.entityList)
|
|
|
|
|
- this.getSpanArr(res.data.items);
|
|
|
|
|
- this.currentItemCount = res.data.currentItemCount;
|
|
|
|
|
|
|
+ this.entityList = res.data.items
|
|
|
|
|
+ console.log('----this.entityList--', this.entityList)
|
|
|
|
|
+ this.getSpanArr(res.data.items)
|
|
|
|
|
+ this.currentItemCount = res.data.currentItemCount
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error(err);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- //分页方法
|
|
|
|
|
- handleCurrentChange(value) {
|
|
|
|
|
- this.currentPage = value;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ // 分页方法
|
|
|
|
|
+ handleCurrentChange (value) {
|
|
|
|
|
+ this.currentPage = value
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
|
|
- this.size = value;
|
|
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ handleSizeChange (value) {
|
|
|
|
|
+ this.size = value
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- searchCommand(command) {
|
|
|
|
|
- if (command == "clear") {
|
|
|
|
|
- this.clearSearch();
|
|
|
|
|
|
|
+ searchCommand (command) {
|
|
|
|
|
+ if (command === 'clear') {
|
|
|
|
|
+ this.clearSearch()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- clearSearch() {
|
|
|
|
|
- this.searchForm.FullName = "";
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
|
|
+ clearSearch () {
|
|
|
|
|
+ this.searchForm.FullName = ''
|
|
|
|
|
+ this.initDatas()
|
|
|
|
|
+ },
|
|
|
|
|
+ formatDateTime (date) {
|
|
|
|
|
+ var y = date.getFullYear()
|
|
|
|
|
+ var m = date.getMonth() + 1
|
|
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
|
|
+ var d = date.getDate()
|
|
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
|
|
+ var h = date.getHours()
|
|
|
|
|
+ var minute = date.getMinutes()
|
|
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
-</script>
|
|
|
|
|
|
|
+</script>
|