|
@@ -35,6 +35,9 @@
|
|
<i class="el-icon-plus" />
|
|
<i class="el-icon-plus" />
|
|
</imgUpload>
|
|
</imgUpload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item :label='$t("resource.table.area.remark")+":"' prop="remark">
|
|
|
|
+ <el-input v-model="tenant.remark" type="textarea" :rows="3" style="width: 100%;"/>
|
|
|
|
+ </el-form-item>
|
|
<!--<el-form-item :label='$t("resource.table.area.layoutMap")+":"' prop="layoutMap">
|
|
<!--<el-form-item :label='$t("resource.table.area.layoutMap")+":"' prop="layoutMap">
|
|
<fileUpload :acceptSize="5*1024*1024" :auto-upload="false" :limit="1" :fileOtherData="fileData" @fileLengthVaild="fileLengthVaild" @setId="setIdAndSubmit" ref="fileRef">
|
|
<fileUpload :acceptSize="5*1024*1024" :auto-upload="false" :limit="1" :fileOtherData="fileData" @fileLengthVaild="fileLengthVaild" @setId="setIdAndSubmit" ref="fileRef">
|
|
<el-button size="small" slot="trigger" type="primary" >选取文件</el-button>
|
|
<el-button size="small" slot="trigger" type="primary" >选取文件</el-button>
|
|
@@ -44,8 +47,17 @@
|
|
<el-image :src="tenant.imgUrl" fit="cover" />
|
|
<el-image :src="tenant.imgUrl" fit="cover" />
|
|
</div>
|
|
</div>
|
|
</el-form-item>-->
|
|
</el-form-item>-->
|
|
- <el-form-item :label='$t("resource.table.area.remark")+":"' prop="remark">
|
|
|
|
- <el-input v-model="tenant.remark" type="textarea" :rows="3" style="width: 100%;"/>
|
|
|
|
|
|
+ <el-form-item :label='$t("resource.table.area.orgId")+":"' prop="orgId">
|
|
|
|
+ <treeselect
|
|
|
|
+ :clear-value-text="$t('common.clear')"
|
|
|
|
+ :load-options="loadListOptions"
|
|
|
|
+ :multiple="false"
|
|
|
|
+ :options="orgList"
|
|
|
|
+ :searchable="true"
|
|
|
|
+ placeholder=" "
|
|
|
|
+ style="width:100%"
|
|
|
|
+ v-model="tenant.orgId"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -61,11 +73,14 @@ import areaMgrApi from "@/api/resourceProductMgr/areaMgr";
|
|
import imgUpload from "@/components/zuihou/imgUpload";
|
|
import imgUpload from "@/components/zuihou/imgUpload";
|
|
import fileUpload from "@/components/zuihou/fileUpload"
|
|
import fileUpload from "@/components/zuihou/fileUpload"
|
|
import elDragDialog from '@/directive/el-drag-dialog'
|
|
import elDragDialog from '@/directive/el-drag-dialog'
|
|
|
|
+import Treeselect from "@riophae/vue-treeselect"
|
|
|
|
+import orgApi from "@/api/Org.js";
|
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'TenantEdit',
|
|
name: 'TenantEdit',
|
|
directives: {elDragDialog, fileUpload},
|
|
directives: {elDragDialog, fileUpload},
|
|
- components: { fileUpload, imgUpload },
|
|
|
|
|
|
+ components: { fileUpload, imgUpload, Treeselect },
|
|
props: {
|
|
props: {
|
|
dialogVisible: {
|
|
dialogVisible: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
@@ -89,6 +104,7 @@ export default {
|
|
fileData: {},
|
|
fileData: {},
|
|
formData: {},
|
|
formData: {},
|
|
imgFileList: [], // 图片集合
|
|
imgFileList: [], // 图片集合
|
|
|
|
+ orgList: [],
|
|
imgFileData: {
|
|
imgFileData: {
|
|
bizId: "",
|
|
bizId: "",
|
|
bizType: "AREA_LINE"
|
|
bizType: "AREA_LINE"
|
|
@@ -140,6 +156,7 @@ export default {
|
|
this.width = this.initWidth()
|
|
this.width = this.initWidth()
|
|
})()
|
|
})()
|
|
}
|
|
}
|
|
|
|
+ this.initOrg();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
initTenant () {
|
|
initTenant () {
|
|
@@ -148,6 +165,7 @@ export default {
|
|
name: '',
|
|
name: '',
|
|
layoutMap: '',
|
|
layoutMap: '',
|
|
status: '1',
|
|
status: '1',
|
|
|
|
+ orgId: '',
|
|
remark:'',
|
|
remark:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -161,6 +179,9 @@ export default {
|
|
return '800px'
|
|
return '800px'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ loadListOptions({ callback }) {
|
|
|
|
+ callback();
|
|
|
|
+ },
|
|
// 附件长度校验
|
|
// 附件长度校验
|
|
fileLengthVaild (data) {
|
|
fileLengthVaild (data) {
|
|
const vm = this;
|
|
const vm = this;
|
|
@@ -170,7 +191,7 @@ export default {
|
|
if(val){
|
|
if(val){
|
|
this.tenant = { ...val }
|
|
this.tenant = { ...val }
|
|
// 附件显示
|
|
// 附件显示
|
|
- this.imgFileList = [{url: val.imgUrl}];
|
|
|
|
|
|
+ this.imgFileList = [{url: val.imgUrl}];
|
|
}
|
|
}
|
|
// 字典表
|
|
// 字典表
|
|
this.dicts = dicts
|
|
this.dicts = dicts
|
|
@@ -182,6 +203,20 @@ export default {
|
|
this.fileData.bizType = "TRAY"
|
|
this.fileData.bizType = "TRAY"
|
|
this.fileData.isSingle = true
|
|
this.fileData.isSingle = true
|
|
},
|
|
},
|
|
|
|
+ initOrg() {
|
|
|
|
+ orgApi
|
|
|
|
+ .allTree({status: true})
|
|
|
|
+ .then(response => {
|
|
|
|
+ const res = response.data;
|
|
|
|
+ this.orgList = res.data;
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: this.$t("tips.getDataFail"),
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
close () {
|
|
close () {
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
},
|
|
},
|
|
@@ -235,23 +270,16 @@ export default {
|
|
|
|
|
|
editSubmit () {
|
|
editSubmit () {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
- this.loading = true
|
|
|
|
- //let id = this.tenant.layoutMap!=null? this.tenant.layoutMap: ""
|
|
|
|
- // this.$refs.fileRef.submitFile(id, this.tenant.id, 'TRAY')
|
|
|
|
- // console.log("22222222222222");
|
|
|
|
|
|
+ this.loading = true
|
|
if(this.type == 'add') {
|
|
if(this.type == 'add') {
|
|
this.save(this.tenant);
|
|
this.save(this.tenant);
|
|
} else {
|
|
} else {
|
|
this.update(this.tenant);
|
|
this.update(this.tenant);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- submitForm () {
|
|
|
|
- // console.log("00000000000000000000000");
|
|
|
|
|
|
+ submitForm () {
|
|
this.$refs.form.validate((valid) => {
|
|
this.$refs.form.validate((valid) => {
|
|
- if (valid) {
|
|
|
|
- // console.log("11111111111111111");
|
|
|
|
- // this.formData = this.tenant
|
|
|
|
- // localStorage.setItem("formData", JSON.stringify(this.formData));
|
|
|
|
|
|
+ if (valid) {
|
|
this.confirmDisabled = true
|
|
this.confirmDisabled = true
|
|
this.editSubmit()
|
|
this.editSubmit()
|
|
// 后续提交处理
|
|
// 后续提交处理
|