Ver código fonte

Merge commit '3b1f1ce166e763cc01fdc22e637bc4a409fbc57f' into HEAD

gitadmin 1 ano atrás
pai
commit
8267986e85

+ 17 - 2
src/views/appSetting/versionSettings/editModal.vue

@@ -15,6 +15,15 @@
       :rules="rules"
       :label-col="formItemLayout.labelCol"
       :wrapper-col="formItemLayout.wrapperCol" >
+      <a-form-model-item label="应用类型" prop="applyCode">
+        <v-select
+          v-model="form.applyCode"
+          ref="applyCode"
+          id="versionSettingsList-applyCode"
+          code="APPLY_TYPE"
+          placeholder="请选择应用类型"
+          allowClear></v-select>
+      </a-form-model-item>
       <a-form-model-item label="版本类型" prop="versionType">
         <v-select
           v-model="form.versionType"
@@ -108,6 +117,7 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
+        applyCode: undefined,
         versionType: undefined, // 版本类型
         version: null,
         publicDate: null,
@@ -117,6 +127,7 @@ export default {
         attachment: ''
       },
       rules: {
+        applyCode: [ { required: true, message: '请选择应用类型', trigger: 'change' } ],
         versionType: [ { required: true, message: '请选择版本类型', trigger: 'change' } ],
         version: [ { required: true, message: '请输入版本号', trigger: 'blur' } ],
         publicDate: [ { required: true, message: '请选择更新时间', trigger: 'change' } ],
@@ -149,8 +160,7 @@ export default {
           const params = JSON.parse(JSON.stringify(_this.form))
           params.id = _this.itemId || null
           params.publicDate = moment(_this.form.publicDate).format('YYYY-MM-DD HH:mm:ss')
-          params.applyName = 'IT后台'
-          params.applyCode = 'jgqp'
+          params.applyName = _this.$refs.applyCode.getNameByCode(_this.form.applyCode)
           sysVersionSave(params).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -168,6 +178,8 @@ export default {
     getDetail () {
       sysVersionDetail({ id: this.itemId }).then(res => {
         if (res.status == 200) {
+          this.form.applyCode = res.data.applyCode
+          this.form.applyName = res.data.applyName
           this.form.versionType = res.data.versionType
           this.form.version = res.data.version
           this.form.publicDate = res.data.publicDate
@@ -175,6 +187,7 @@ export default {
           this.form.downloadUrl = res.data.downloadUrl
           this.form.upgradeContent = res.data.upgradeContent
           this.form.attachment = res.data.attachment
+          this.$refs.attachment.setFileList(res.data.attachment)
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -200,6 +213,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+        this.form.attachment = ''
+        this.$refs.attachment.setFileList('')
         this.$refs.ruleForm.resetFields()
       }
     },

+ 1 - 0
src/views/appSetting/versionSettings/list.vue

@@ -51,6 +51,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '应用类型', dataIndex: 'applyName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '版本类型', dataIndex: 'versionType', scopedSlots: { customRender: 'versionType' }, width: 100, align: 'center' },
         { title: '版本号', dataIndex: 'version', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '强制升级', dataIndex: 'forceUpgrade', scopedSlots: { customRender: 'forceUpgrade' }, width: 90, align: 'center' },