|
@@ -165,26 +165,26 @@
|
|
|
},
|
|
},
|
|
|
name: 'CheckEquipmentList',
|
|
name: 'CheckEquipmentList',
|
|
|
|
|
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
|
saveLoading: false,
|
|
saveLoading: false,
|
|
|
- //列表数据
|
|
|
|
|
|
|
+ // 列表数据
|
|
|
entityList: [],
|
|
entityList: [],
|
|
|
PositionList: [],
|
|
PositionList: [],
|
|
|
- //分页参数
|
|
|
|
|
|
|
+ // 分页参数
|
|
|
size: 10,
|
|
size: 10,
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
currentItemCount: 0,
|
|
currentItemCount: 0,
|
|
|
- //列表排序
|
|
|
|
|
|
|
+ // 列表排序
|
|
|
Column: {
|
|
Column: {
|
|
|
Order: '',
|
|
Order: '',
|
|
|
Prop: ''
|
|
Prop: ''
|
|
|
},
|
|
},
|
|
|
- //查询时间
|
|
|
|
|
|
|
+ // 查询时间
|
|
|
CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
- //查询项
|
|
|
|
|
|
|
+ // 查询项
|
|
|
searchFormReset: {},
|
|
searchFormReset: {},
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
Id: '',
|
|
Id: '',
|
|
@@ -198,7 +198,7 @@
|
|
|
Spec: '',
|
|
Spec: '',
|
|
|
SpecId: '',
|
|
SpecId: '',
|
|
|
Manufacturer: '',
|
|
Manufacturer: '',
|
|
|
- Status: '',
|
|
|
|
|
|
|
+ Status: ''
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
testTypeList: [],
|
|
testTypeList: [],
|
|
@@ -296,23 +296,23 @@
|
|
|
CustomerId: 0
|
|
CustomerId: 0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- //查询条件初始值备份
|
|
|
|
|
|
|
+ created () {
|
|
|
|
|
+ // 查询条件初始值备份
|
|
|
Object.assign(this.searchFormReset, this.searchForm)
|
|
Object.assign(this.searchFormReset, this.searchForm)
|
|
|
- //查询列表
|
|
|
|
|
|
|
+ // 查询列表
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
this.getProjectType()
|
|
this.getProjectType()
|
|
|
this.getCustomerInfo()
|
|
this.getCustomerInfo()
|
|
|
- //this.getDictOptions()
|
|
|
|
|
|
|
+ // this.getDictOptions()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- initDatas() {
|
|
|
|
|
- //分页及列表条件
|
|
|
|
|
|
|
+ initDatas () {
|
|
|
|
|
+ // 分页及列表条件
|
|
|
let params = {
|
|
let params = {
|
|
|
_currentPage: this.currentPage,
|
|
_currentPage: this.currentPage,
|
|
|
_size: this.size,
|
|
_size: this.size,
|
|
|
Order: this.Column.Order,
|
|
Order: this.Column.Order,
|
|
|
- Prop: this.Column.Prop,
|
|
|
|
|
|
|
+ Prop: this.Column.Prop
|
|
|
}
|
|
}
|
|
|
let myCreateOn = []
|
|
let myCreateOn = []
|
|
|
// 解析时间
|
|
// 解析时间
|
|
@@ -323,9 +323,9 @@
|
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
}
|
|
}
|
|
|
- //查询条件
|
|
|
|
|
|
|
+ // 查询条件
|
|
|
Object.assign(params, this.searchForm)
|
|
Object.assign(params, this.searchForm)
|
|
|
- //访问接口
|
|
|
|
|
|
|
+ // 访问接口
|
|
|
api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
|
|
api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
|
|
|
this.entityList = res.data.items
|
|
this.entityList = res.data.items
|
|
|
this.currentItemCount = res.data.currentItemCount
|
|
this.currentItemCount = res.data.currentItemCount
|
|
@@ -336,23 +336,23 @@
|
|
|
|
|
|
|
|
getDictOptions () {
|
|
getDictOptions () {
|
|
|
api.getDictList(this.$axios).then(res => {
|
|
api.getDictList(this.$axios).then(res => {
|
|
|
- //this.dictOptions.customerList = res.data.items['customerList']
|
|
|
|
|
- //this.dictOptions.projectList = res.data.items['projectList']
|
|
|
|
|
|
|
+ // this.dictOptions.customerList = res.data.items['customerList']
|
|
|
|
|
+ // this.dictOptions.projectList = res.data.items['projectList']
|
|
|
|
|
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- searchCommand(command) {
|
|
|
|
|
|
|
+ searchCommand (command) {
|
|
|
if (command == 'search') {
|
|
if (command == 'search') {
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
} else if (command == 'clear') {
|
|
} else if (command == 'clear') {
|
|
|
this.clearSearch()
|
|
this.clearSearch()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- //列表排序功能
|
|
|
|
|
- orderby(column) {
|
|
|
|
|
|
|
+ // 列表排序功能
|
|
|
|
|
+ orderby (column) {
|
|
|
if (column.order == 'ascending') {
|
|
if (column.order == 'ascending') {
|
|
|
this.Column.Order = 'asc'
|
|
this.Column.Order = 'asc'
|
|
|
} else if (column.order == 'descending') {
|
|
} else if (column.order == 'descending') {
|
|
@@ -361,27 +361,27 @@
|
|
|
this.Column.Prop = column.prop
|
|
this.Column.Prop = column.prop
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
},
|
|
},
|
|
|
- clearSearch() {
|
|
|
|
|
- Object.assign(this.searchForm, this.searchFormReset);
|
|
|
|
|
- //this.searchForm = this.searchFormReset;
|
|
|
|
|
- this.CreateOn = ''
|
|
|
|
|
|
|
+ clearSearch () {
|
|
|
|
|
+ Object.assign(this.searchForm, this.searchFormReset)
|
|
|
|
|
+ //this.searchForm = this.searchFormReset;
|
|
|
|
|
+ this.CreateOn = ''
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleSearch() {
|
|
|
|
|
- this.currentPage = 1;
|
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
- this.initDatas()
|
|
|
|
|
|
|
+ handleSearch () {
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
|
+ this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleCurrentChange(value) {
|
|
|
|
|
|
|
+ handleCurrentChange (value) {
|
|
|
this.currentPage = value
|
|
this.currentPage = value
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
},
|
|
},
|
|
|
- handleSizeChange(value) {
|
|
|
|
|
|
|
+ handleSizeChange (value) {
|
|
|
this.size = value
|
|
this.size = value
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
},
|
|
},
|
|
|
- deleteConfirm(row) {
|
|
|
|
|
|
|
+ deleteConfirm (row) {
|
|
|
this.$confirm('此操作将永久删除该设备, 是否继续?', '提示', {
|
|
this.$confirm('此操作将永久删除该设备, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -391,25 +391,25 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
deleteEntity (row) {
|
|
deleteEntity (row) {
|
|
|
- row.deleteConfirmFlag = false;
|
|
|
|
|
- api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
|
|
|
|
+ row.deleteConfirmFlag = false
|
|
|
|
|
+ api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
this.initDatas()
|
|
this.initDatas()
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
// 检测报告
|
|
// 检测报告
|
|
|
getProjectType () {
|
|
getProjectType () {
|
|
@@ -438,8 +438,8 @@
|
|
|
}
|
|
}
|
|
|
positionApi.customerPositionTree(params, this.$axios).then(res => {
|
|
positionApi.customerPositionTree(params, this.$axios).then(res => {
|
|
|
this.customerTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId',
|
|
this.customerTreeList = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId',
|
|
|
- 'Id,CustomerId,ParentId,PositionName,PositionCode,PositionType,PositionTypeId');
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ 'Id,CustomerId,ParentId,PositionName,PositionCode,PositionType,PositionTypeId')
|
|
|
|
|
+ })
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
// handle error
|
|
// handle error
|
|
|
console.error(err)
|
|
console.error(err)
|
|
@@ -453,8 +453,8 @@
|
|
|
_this.CustomerId = _this.customerForm.Id
|
|
_this.CustomerId = _this.customerForm.Id
|
|
|
_this.gettreelist()
|
|
_this.gettreelist()
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
- console.error(err)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
jstimehandle (val) {
|
|
jstimehandle (val) {
|
|
@@ -471,16 +471,16 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
formatDateTime (date) {
|
|
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;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ 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
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
NewEntity () {
|
|
NewEntity () {
|
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|