Browse Source

完善移动端管理

master
yunuo970428 3 years ago
parent
commit
4059a9679f
  1. 8
      anrui-system-ui/src/components/uploadFile/upload_apk.vue
  2. 5
      anrui-system-ui/src/components/uploadFile/upload_frameApk.vue
  3. 5
      anrui-system-ui/src/components/uploadFile/upload_updateApk.vue
  4. 15
      anrui-system-ui/src/views/mobileterminal/frame.vue
  5. 16
      anrui-system-ui/src/views/mobileterminal/plugin.vue
  6. 13
      anrui-system-ui/src/views/mobileterminal/updatePlugin.vue

8
anrui-system-ui/src/components/uploadFile/upload_apk.vue

@ -5,7 +5,7 @@
:action="uploadFile"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-progress="handleSuccess"
:on-success="handleSuccess"
:file-list="fileList"
:limit="1"
name="multipartFile"
@ -21,7 +21,8 @@ import { uploadFile } from '@/api/Common/Upload'
export default {
props: {
fileInfo: {
type: Object
type: Object,
default: {}
}
},
data() {
@ -36,7 +37,8 @@ export default {
},
methods: {
handleSuccess(event, file, fileList) {
console.log(file, fileList)
console.log(file)
this.$emit('change', file)
},
handleRemove(file, fileList) {
console.log(file, fileList)

5
anrui-system-ui/src/components/uploadFile/upload_frameApk.vue

@ -5,7 +5,7 @@
:action="uploadFile"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-progress="handleSuccess"
:on-success="handleSuccess"
:file-list="fileList"
:limit="1"
name="file"
@ -36,7 +36,8 @@ export default {
},
methods: {
handleSuccess(event, file, fileList) {
console.log(file, fileList)
console.log(file)
this.$emit('change', file)
},
handleRemove(file, fileList) {
console.log(file, fileList)

5
anrui-system-ui/src/components/uploadFile/upload_updateApk.vue

@ -5,7 +5,7 @@
:action="uploadFile"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-progress="handleSuccess"
:on-success="handleSuccess"
:file-list="fileList"
:limit="1"
name="multipartFile"
@ -36,7 +36,8 @@ export default {
},
methods: {
handleSuccess(event, file, fileList) {
console.log(file, fileList)
console.log(file)
this.$emit('change', file)
},
handleRemove(file, fileList) {
console.log(file, fileList)

15
anrui-system-ui/src/views/mobileterminal/frame.vue

@ -17,7 +17,7 @@
</el-col>
<el-col :span="19">
<el-form-item>
<upload_frameApk ref="uploadMoreImg" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
<upload_frameApk ref="uploadMoreImg" @change="change" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
</el-form-item>
</el-col>
<el-col :span="5" class="tleftb">
@ -71,6 +71,9 @@ export default {
},
methods: {
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '更新框架'
},
@ -78,12 +81,20 @@ export default {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.$refs.uploadMoreImg.submitUpload()
this.handleReturn('true')
} else {
return false
}
})
},
change(value) {
console.log(value, 65656)
if (value.response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.$message({ showClose: true, type: 'error', message: value.response.msg })
}
},
backIcon(val) {
if (val.length > 0) {
this.formobj.iconUrl = val[0].url

16
anrui-system-ui/src/views/mobileterminal/plugin.vue

@ -65,7 +65,7 @@
</el-col>
<el-col :span="19">
<el-form-item>
<upload_apk ref="uploadMoreImg" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
<upload_apk ref="uploadMoreImg" v-model="imgList" @change="change" bucket="map" :fileInfo ="formobj"/>
</el-form-item>
</el-col>
<el-col :span="5" class="tleftb">
@ -146,6 +146,9 @@ export default {
methods: {
init() {},
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
this.dialogStatus = 'add'
this.viewTitle = '新增插件'
@ -163,12 +166,20 @@ export default {
})
this.formobj.type = bb.key
this.$refs.uploadMoreImg.submitUpload()
this.handleReturn('true')
} else {
return false
}
})
},
change(value) {
console.log(value, 65656)
if (value.response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.$message({ showClose: true, type: 'error', message: value.response.msg })
}
},
backIcon(val) {
if (val.length > 0) {
this.formobj.iconUrl = val[0].url
@ -189,6 +200,7 @@ export default {
modulePluginName: '',
sortNo: ''
}
this.imgList = []
this.list = []
this.$emit('doback')
}

13
anrui-system-ui/src/views/mobileterminal/updatePlugin.vue

@ -71,7 +71,7 @@
</el-col>
<el-col :span="19">
<el-form-item>
<upload_updateApk ref="uploadMoreImg" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
<upload_updateApk ref="uploadMoreImg" @change="change" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
</el-form-item>
</el-col>
<el-col :span="5" class="tleftb">
@ -192,12 +192,20 @@ export default {
})
this.formobj.type = bb.key
this.$refs.uploadMoreImg.submitUpload()
this.handleReturn('true')
} else {
return false
}
})
},
change(value) {
console.log(value, 65656)
if (value.response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.$message({ showClose: true, type: 'error', message: value.response.msg })
}
},
backIcon(val) {
if (val.length > 0) {
this.formobj.iconUrl = val[0].url
@ -219,6 +227,7 @@ export default {
sortNo: ''
}
this.list = []
this.imgList = []
this.$emit('doback')
}
}

Loading…
Cancel
Save