|
@@ -14,11 +14,43 @@
|
|
|
@onEditSuccess="queryMainData($route.query.id)"
|
|
|
:pageChange="true"
|
|
|
>
|
|
|
-
|
|
|
+ <template #d_head>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="企业名称:" prop="enterprisename">
|
|
|
+ <el-input v-model="form.enterprisename" placeholder="企业名称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="企业简称:" prop="abbreviation">
|
|
|
+ <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="法人:" prop="contact">
|
|
|
+ <el-input v-model="form.contact" placeholder="法人"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <div style="display:flex;align-items: center;">
|
|
|
+ <p class="inline-16">企业操作页LOGO:</p>
|
|
|
+ <uploadFile v-if="show" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sys_site',ownerid:siteinfo.siteuid,usetype:'actionlogo'}" @onSuccess="uploadSuccess"></uploadFile>
|
|
|
+ <div v-else class="image-panel">
|
|
|
+ <i class="el-icon-error close-btn" @click="deleteFileLink"></i>
|
|
|
+ <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <small style="display:block;margin-top:20px" class="info">注:建议上传图片大小1024x1024,大小不超过2M,格式为JPG/PNG</small>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
<div slot="customOperation" >
|
|
|
<el-button type="warning" size="small">保存</el-button>
|
|
|
</div>
|
|
|
<div slot="slot0" >
|
|
|
+ <contacts></contacts>
|
|
|
</div>
|
|
|
<div slot="slot1" >
|
|
|
</div>
|
|
@@ -30,9 +62,11 @@
|
|
|
import {mapGetters} from 'vuex'
|
|
|
|
|
|
import uploadFile from '../../../../components/upload/hw_obs_upload.vue'
|
|
|
+import contacts from '../components/contacts/index'
|
|
|
export default {
|
|
|
components:{
|
|
|
- uploadFile
|
|
|
+ uploadFile,
|
|
|
+ contacts
|
|
|
},
|
|
|
computed:{
|
|
|
...mapGetters({
|
|
@@ -56,20 +90,23 @@ export default {
|
|
|
enterprisename:[
|
|
|
{ required: true, message: '请输入企业名称', trigger: 'blur' },
|
|
|
],
|
|
|
- sitename:[
|
|
|
+ abbreviation:[
|
|
|
+ { required: true, message: '请输入企业简称', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ contact:[
|
|
|
+ { required: true, message: '请输入法人', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ /*sitename:[
|
|
|
{ required: true, message: '请输入企业简称', trigger: 'blur' }
|
|
|
- ]
|
|
|
+ ]*/
|
|
|
},
|
|
|
folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
mainData:{},
|
|
|
- mainAreaData:{}
|
|
|
+ mainAreaData:{},
|
|
|
+ basicInfo:{}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- onShow () {
|
|
|
- this.dialogEditVisible = true
|
|
|
- this.form = Object.assign({},this.form,this.siteinfo)
|
|
|
- },
|
|
|
submit () {
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (!valid) return false;
|
|
@@ -90,44 +127,41 @@ export default {
|
|
|
"content": {
|
|
|
}
|
|
|
})
|
|
|
- this.mainData = res.data
|
|
|
- this.changeDataStructure()
|
|
|
- },
|
|
|
- changeDataStructure() {
|
|
|
- this.mainAreaData = [
|
|
|
- {
|
|
|
- label:'企业名称',
|
|
|
- value:this.mainData.enterprisename
|
|
|
- },
|
|
|
- {
|
|
|
- label:'企业简称',
|
|
|
- value:this.mainData.abbreviation
|
|
|
- },
|
|
|
- {
|
|
|
- label:'法人',
|
|
|
- value:this.mainData.contact
|
|
|
- },
|
|
|
- ]
|
|
|
+ this.form = Object.assign({},res.data,this.form)
|
|
|
},
|
|
|
async deleteFileLink (item) {
|
|
|
+ console.log(this.$route.query.basicInfo)
|
|
|
const res = await this.$api.requested({
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
"method": "deleteFileLink",
|
|
|
"content": {
|
|
|
- "linksids":[this.form.attinfos[0].linksid]
|
|
|
+ "linksids":[this.siteinfo.attinfos[0].linksid]
|
|
|
}
|
|
|
})
|
|
|
- res.code === 1?this.$emit('onSuccess'):''
|
|
|
+ /*res.code === 1?this.$emit('onSuccess'):''*/
|
|
|
+ res.code === 1?this.queryImg():''
|
|
|
+
|
|
|
},
|
|
|
uploadSuccess () {
|
|
|
this.$emit('onSuccess')
|
|
|
setTimeout(() => {
|
|
|
this.form = Object.assign({},this.form,this.siteinfo)
|
|
|
}, 100);
|
|
|
+ },
|
|
|
+ async queryImg(){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.site.site",
|
|
|
+ "content": {},
|
|
|
+ "method": "querySite",
|
|
|
+ "systemappid": 21
|
|
|
+ })
|
|
|
+ this.show = true
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.form = Object.assign({},this.form,this.siteinfo)
|
|
|
+ /* this.form = Object.assign({},this.form,this.siteinfo)*/
|
|
|
+ console.log(this.$route.query.basicInfo,'输出')
|
|
|
+ this.basicInfo = this.$route.query.basicInfo
|
|
|
this.queryMainData()
|
|
|
}
|
|
|
}
|