| | |
| | | <template> |
| | | <zt-combo ref="combo" :placeholder="placeholder" :readonly="readonly" :disabled="disabled" @input-change="onInputChange"> |
| | | <zt-tree-selector ref="tree" v-model="treeValue" |
| | | :isDisplay="isDisplay" |
| | | :idField="idField" :textField="textField" :parentIdField="parentIdField" |
| | | :disabled="disabled" |
| | | :url="url" :datas="datas" :simple="simple" :multiple="multiple" :leaf-only="leafOnly" |
| | |
| | | type: String, |
| | | default: 'id' |
| | | }, |
| | | isDisplay:{ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | textField: { |
| | | type: String, |
| | | default: 'name' |
| | |
| | | <el-tree |
| | | ref="tree" |
| | | class="comb-tree" |
| | | :class="[{'isDisplay':isDisplay}]" |
| | | :disabled="disabled" |
| | | highlight-current |
| | | :check-strictly="checkStrictly" |
| | |
| | | textField: { |
| | | type: String, |
| | | default: 'name' |
| | | }, |
| | | isDisplay:{ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | disabled:{ |
| | | type: Boolean, |
| | |
| | | transform: rotate(-180deg); |
| | | } |
| | | |
| | | .comb-tree { |
| | | .isDisplay{ |
| | | display: flex; |
| | | width: auto; |
| | | } |
| | | .comb-tree { |
| | | height: 250px; |
| | | overflow-y: auto; |
| | | |
| | |
| | | <template> |
| | | <div class="zt-upload"> |
| | | <div class="zt-upload" :class="[{'lineHeight':lineHeight}]"> |
| | | <!-- 文件上传 --> |
| | | <el-upload |
| | | ref="upload" |
| | |
| | | } |
| | | }, |
| | | dataForm: Object, |
| | | lineHeight:{ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | action: { |
| | | type: String, |
| | | default: '/sys/oss/uploadNew' |
| | |
| | | .zt-upload { |
| | | line-height: 1; |
| | | } |
| | | |
| | | .zt-upload.lineHeight{ |
| | | line-height: 0; |
| | | } |
| | | .zt .upload-input .upload-btn { |
| | | padding: 8px 12px; |
| | | } |
| | |
| | | <zt-uploader v-model="dataForm[field.busiField]" multiple :limit="field.fileLimit" :file-type="field.fileType" |
| | | :accept="field.accept" :file-size="field.fileSize" @input="change(field.busiField)"/> |
| | | </zt-form-item>--> |
| | | <template slot="title"> |
| | | <el-tag>{{group.busiFieldGroup}}</el-tag> |
| | | </template> |
| | | <!-- <template slot="title">--> |
| | | <!-- <el-tag>{{group.busiFieldGroup}}</el-tag>--> |
| | | <!-- </template>--> |
| | | <!-- <zt-form-item :label="field.busiFieldName" :prop="field.busiField" v-for="field in group.fields" |
| | | :key="field.busiField" :rules="field.isRequired ? 'required':''" style="width: 100%;"> |
| | | <zt-uploader v-model="dataForm[field.busiField]" multiple :limit="field.fileLimit" :file-type="field.fileType" |
| | | :accept="field.accept" :file-size="field.fileSize" @input="change(field.busiField)"/> |
| | | </zt-form-item>--> |
| | | <el-table :data="group.fields" :show-header="false"> |
| | | <el-table-column width="180" style="text-align: left;white-space:nowrap;"> |
| | | <template slot-scope="scope"> |
| | | <span v-html="(scope.row.isRequired?'<font color=red>* </font>':'')+ scope.row.busiFieldName"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column width="180" style="text-align: left;white-space:nowrap;">--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <span v-html="(scope.row.isRequired?'<font color=red>* </font>':'')+ scope.row.busiFieldName"></span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column align="left"> |
| | | <template slot-scope="scope"> |
| | | <zt-uploader v-model="dataForm[scope.row.busiField]" :dataForm="dataForm" multiple |
| | | :lineHeight="lineHeight" |
| | | :limit="scope.row.fileLimit" :file-type="scope.row.fileTypeArr" |
| | | :showFileList2="false" :accept="scope.row.accept" :file-size="scope.row.fileSize" |
| | | @input="change(scope.row.busiField)" @getUploaderImg="getUploaderImg"/> |
| | |
| | | name: 'ConfigUploader', |
| | | components: {}, |
| | | props: { |
| | | lineHeight:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | value: Object, |
| | | dataForm: Object, |
| | | busiType: String // 业务类型 |
| | |
| | | <template> |
| | | <zt-combo-tree v-model="selectValue" url="teamGroup/class/tree" :readonly="readonly" :disabled="disabled" |
| | | <zt-combo-tree v-model="selectValue" url="teamGroup/class/tree" :readonly="readonly" :disabled="disabled" :isDisplay="isDisplay" |
| | | :datas="datas" :multiple="multiple" :placeholder="placeholder" :leafOnly="leafOnly" :lazy="lazy" @select="onSelected"/> |
| | | </template> |
| | | <script> |
| | |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | isDisplay:{ |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false |
| | |
| | | </div> |
| | | <div style="border: 1px solid rgba(0,0,0,.2);width: 99%"> |
| | | <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="warehouseContentWidth"> |
| | | <el-form-item class="marginTopAndMarginBottom" label="项目编号" style="width: 49%"> |
| | | <el-form-item class="marginTopAndMarginBottom" label="项目编号" style="width: 49%"> |
| | | <el-input v-model="dataForm.project.code" placeholder="请输入项目编号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom" label="项目名称" style="width: 49%"> |
| | |
| | | <div style="width: calc(100% - 120px);"> |
| | | <div class="el-wt-border-left"> |
| | | <span>{{dataForm.environ.testEnvirontDiagram}}</span> |
| | | <config-uploader busi-type="test_environt_diagram" model-name="dataForm" :dataForm="dataForm" |
| | | <config-uploader :lineHeight="true" busi-type="test_environt_diagram" model-name="dataForm" :dataForm="dataForm" |
| | | @getImageUrl="getImageUrl" |
| | | v-model="dataForm.files"/> |
| | | <div v-if="dataForm.url"> |
| | |
| | | <config-uploader busi-type="users" model-name="dataForm" :dataForm="dataForm" |
| | | @getImageUrl="getImageUrl" |
| | | v-model="dataForm.files"/> |
| | | <div v-if="dataForm.url" > |
| | | <el-image :src="dataForm.url" v-for="url in dataForm.url" :key="url[0,1]"></el-image> |
| | | <div v-if="dataForm.url"> |
| | | <el-image v-for="(url, index) in dataForm.url" :key="index" :src="url"></el-image> |
| | | </div> |
| | | |
| | | <zt-form-item prop="username" :label="$t('user.username')" rules="required"> |
| | | <el-input v-model="dataForm.username" :placeholder="$t('user.username')"></el-input> |
| | | </zt-form-item> |
| | |
| | | } |
| | | }, |
| | | getImageUrl() { |
| | | let pictureId=[]; |
| | | let pictureId=[] |
| | | pictureId = this.getFirstImageId(this.dataForm.files) |
| | | for (let i=0;i<=pictureId.length;i++){ |
| | | pictureId=pictureId[i] |
| | | this.dataForm.url[i] = `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${pictureId}` |
| | | console.log(this.dataForm.url[i], ' this.dataForm.url') |
| | | console.log(pictureId,'getImageUrl() pictureId') |
| | | if(pictureId.length>0){ |
| | | for (let i=0;i<=pictureId.length;i++){ |
| | | pictureId=pictureId[i] |
| | | this.dataForm.url[i] = `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${pictureId}` |
| | | console.log(this.dataForm.url[i], ' this.dataForm.url') |
| | | } |
| | | } |
| | | }, |
| | | getFirstImageId(oss) { |