zhaowei
3 天以前 19aff1ac87030b21d2b01cdca5d5604c840ba7c0
src/views/system/modules/WorkshopModal.vue
@@ -18,6 +18,12 @@
        <a-form-model-item label="车间背景图" required prop="backgroundImage">
          <j-image-upload class="avatar-uploader" text="上传" v-model="model.backgroundImage"></j-image-upload>
        </a-form-model-item>
        <a-form-model-item label="设备编号颜色">
          <a-input type="color" v-model="model.equipmentIdColor"></a-input>
        </a-form-model-item>
        <a-form-model-item label="授权标识">
          <a-input placeholder="请输入授权标识" v-model="model.perms"/>
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </a-modal>
@@ -28,6 +34,7 @@
  export default {
    name: 'WorkshopModal',
    components: {},
    data() {
      return {
        title: '操作',
@@ -49,7 +56,7 @@
            { min: 0, max: 64, message: '长度不超过 64 个字符', trigger: 'blur' },
            { validator: this.validateRoleCode }
          ],
          backgroundImage:[
          backgroundImage: [
            { required: true, message: '请上传车间背景图!' }
          ]
        }
@@ -95,10 +102,16 @@
            }
            obj.then((res) => {
              if (res.success) {
                that.$message.success(res.message)
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
                that.$emit('ok')
              } else {
                that.$message.warning(res.message)
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            }).finally(() => {
              that.confirmLoading = false