|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <el-form-item :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
|
|
|
+ <el-form-item label-width="120px" :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
|
|
|
<!-- 输入框 -->
|
|
|
<el-input v-if="formConfig.htmlType == 'input'" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
|
|
|
clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow" />
|
|
@@ -13,10 +13,10 @@
|
|
|
:value="itemChild.dictValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <!-- 下拉框搜索 -->
|
|
|
+ <!-- 下拉框搜索 -->
|
|
|
<el-select :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo)"
|
|
|
- filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
|
|
|
- <el-option v-for="itemChild in filterList" :key="itemChild.id" :label="itemChild.table_name" :value="itemChild.id">
|
|
|
+ filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
|
|
|
+ <el-option v-for="itemChild in filterList" :key="itemChild[formConfig.fkInfo.fkColumnName]" :label="itemChild[formConfig.fkInfo.dkColumnName]" :value="itemChild[formConfig.fkInfo.fkColumnName]">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<!-- 复选框 -->
|
|
@@ -41,7 +41,7 @@
|
|
|
<i class="el-icon-plus"></i>
|
|
|
</el-upload>
|
|
|
<el-dialog :disabled="formConfig.disabshow" :visible.sync="dialogVisible" v-if="formConfig.htmlType == 'imageUpload'">
|
|
|
- <img width="100%" :src="dialogImageUrl" alt="">
|
|
|
+ <img :src="dialogImageUrl" alt="">
|
|
|
</el-dialog>
|
|
|
<!-- 上传文件 -->
|
|
|
<el-upload :disabled="formConfig.disabshow" class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}" v-if="formConfig.htmlType == 'fileUpload'"
|
|
@@ -51,7 +51,7 @@
|
|
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
</el-upload>
|
|
|
<!-- 富文本 -->
|
|
|
- <editor :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'" :min-height="192" />
|
|
|
+ <editor :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'" :min-height="192" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
|
|
@@ -105,9 +105,18 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.config = {}
|
|
|
- // console.log(this.formConfig.mask.slice(3,4),876454)
|
|
|
- console.log(this.formConfig)
|
|
|
-
|
|
|
+ if(this.type){
|
|
|
+ if(this.formConfig.readonly == true){
|
|
|
+ this.formConfig.disabshow = true
|
|
|
+ }else if(this.formConfig.mask.slice(3,4) == '0' || this.formConfig.isonliy == true){
|
|
|
+ this.formConfig.disabshow = true
|
|
|
+ }else{
|
|
|
+ this.formConfig.disabshow = false
|
|
|
+ }
|
|
|
+ if(this.formConfig.fkInfo == null){
|
|
|
+ this.formConfig.fkInfo=false
|
|
|
+ }
|
|
|
+ }
|
|
|
this.init()
|
|
|
},
|
|
|
watch: {
|
|
@@ -145,10 +154,15 @@
|
|
|
'fileUpload') {
|
|
|
this.config = []
|
|
|
} else {
|
|
|
- this.$set(this.config, this.formConfig.columnName, (this.formConfig.columnValue || ''))
|
|
|
+ this.$set(this.config, this.formConfig.columnName, ((this.formConfig.columnValue?this.formConfig.columnValue:this.formConfig.defaultValue) || ''))
|
|
|
}
|
|
|
+
|
|
|
if(this.formConfig.fkInfo){
|
|
|
this.aliemg.table = this.formConfig.fkInfo.fkTableName
|
|
|
+ if(this.formConfig.fkInfo.value){
|
|
|
+ this.aliemg.fixedData.condition[this.formConfig.fkInfo.dkColumnName] = this.formConfig.fkInfo.value
|
|
|
+ }
|
|
|
+ this.listIndexfouFn()
|
|
|
}
|
|
|
},
|
|
|
handleChange(file, fileList) {
|
|
@@ -183,7 +197,8 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- handlePictureCardPreview(file) {
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
+ console.log(file)
|
|
|
this.dialogImageUrl = file.url;
|
|
|
this.dialogVisible = true;
|
|
|
},
|