Commit 69fc68ab by zhangquan

bug修复

1 parent e1d2864a
...@@ -150,3 +150,7 @@ img { ...@@ -150,3 +150,7 @@ img {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.customMessageClass {
z-index: 9999 !important;
}
\ No newline at end of file \ No newline at end of file
...@@ -219,7 +219,11 @@ export default { ...@@ -219,7 +219,11 @@ export default {
} }
this.$apis.sendRepair.setFollowInfoApi(params).then(res => { this.$apis.sendRepair.setFollowInfoApi(params).then(res => {
if(res){ if(res){
this.$message.success('操作成功') this.$message({
type: 'success',
message: '操作成功',
customClass: 'customMessageClass'
})
// const { followResult, followRemark} = this.recordForm // const { followResult, followRemark} = this.recordForm
// this.detailDataObj.followResult = followResult // this.detailDataObj.followResult = followResult
// this.detailDataObj.followRemark = followRemark // this.detailDataObj.followRemark = followRemark
......
...@@ -72,27 +72,31 @@ export default { ...@@ -72,27 +72,31 @@ export default {
}, },
uploadFile(e) { uploadFile(e) {
const file = e.srcElement.files[0] const file = e.srcElement.files[0]
let AllImgExt = '.xlsx' //文件格式判断 let AllImgExt = '.xlsx|.xls' //文件格式判断
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase() let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt !== extName) { if (AllImgExt.indexOf(extName)<0) {
this.$message.error('文件格式不正确') this.$message({
type: 'error',
message: '请选择xlsx、xls文件',
customClass: 'customMessageClass'
})
this.$refs.file.value = '' this.$refs.file.value = ''
return false return false
} }
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const fileName = file.name.split('.')
//fileUrl: 文件名 + @ + base64拼接
const fileUrl = fileName.pop() + '@' + arrBase64[1]
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const fileName = file.name.split('.')
//fileUrl: 文件名 + @ + base64拼接
const fileUrl = fileName.pop() + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl }).then(res => { this.$apis.common.pictureUpload({ file: fileUrl }).then(res => {
loading.close() loading.close()
if(res){ if(res){
......
...@@ -214,16 +214,6 @@ export default { ...@@ -214,16 +214,6 @@ export default {
label: 'IMEI/SN号' label: 'IMEI/SN号'
}, },
{ {
type: 'input',
name: 'merchantName',
label: '商户名称'
},
{
type: 'input',
name: 'merchantNo',
label: '商户号'
},
{
type: 'select', type: 'select',
name: 'snType', name: 'snType',
label: '设备类型', label: '设备类型',
...@@ -420,6 +410,7 @@ export default { ...@@ -420,6 +410,7 @@ export default {
}, },
closeDialogFn(){ closeDialogFn(){
this.collVisible = false this.collVisible = false
this.searchTable()
}, },
handleOk() { handleOk() {
this.$refs.sendNoticeRef.$refs.formRef.validate(valid => { this.$refs.sendNoticeRef.$refs.formRef.validate(valid => {
......
...@@ -223,16 +223,6 @@ export default { ...@@ -223,16 +223,6 @@ export default {
label: 'IMEI/SN号' label: 'IMEI/SN号'
}, },
{ {
type: 'input',
name: 'merchantName',
label: '商户名称'
},
{
type: 'input',
name: 'merchantNo',
label: '商户号'
},
{
type: 'select', type: 'select',
name: 'snType', name: 'snType',
label: '设备类型', label: '设备类型',
...@@ -417,13 +407,13 @@ export default { ...@@ -417,13 +407,13 @@ export default {
handleOk() { handleOk() {
this.$refs.deviceRef.$refs.formRef.validate(valid => { this.$refs.deviceRef.$refs.formRef.validate(valid => {
if(valid){ if(valid){
console.log(this.basicForm)
const params= JSON.parse(JSON.stringify(this.basicForm)) const params= JSON.parse(JSON.stringify(this.basicForm))
delete params.sn delete params.sn
this.$apis.sendRepair.editDeviceInfoApi(params).then(res => { this.$apis.sendRepair.editDeviceInfoApi(params).then(res => {
if(res){ if(res){
console.log(res)
this.$message.success('操作成功') this.$message.success('操作成功')
this.handleCancel()
this.searchTable()
} }
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!