You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

122 lines
3.4 KiB

<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="5" class="tleftb">
<span><span class="icon">*</span>apk上传</span>
</el-col>
<el-col :span="19">
<el-form-item>
<upload_frameApk ref="uploadMoreImg" @change="change" v-model="imgList" bucket="map" :fileInfo ="formobj"/>
</el-form-item>
</el-col>
<el-col :span="5" class="tleftb">
<span><span class="icon">*</span>插件icon</span>
</el-col>
<el-col :span="19">
<el-form-item>
<upload_icon ref="uploadIcon" v-model="list" bucket="map" @change="backIcon" :upload-data="{type:'0002'}"/>
</el-form-item>
</el-col>
<el-col :span="5" class="tleftb">
<span>版本描述</span>
</el-col>
<el-col :span="19">
<el-form-item><el-input v-model="formobj.upgradeInfo" type="textarea" resize="none" :autosize="{ minRows: 2, maxRows: 50}" class="addInput" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import upload_frameApk from '@/components/uploadFile/upload_frameApk'
import upload_icon from '@/components/uploadFile/upload_icon'
export default {
name: 'frame',
components: {
upload_frameApk,
upload_icon
},
data() {
return {
tableKey: 0,
index: 0,
viewTitle: '',
dialogStatus: '',
sid: '',
isShow: true,
list: [],
imgList: [],
formobj: {
iconUrl: '',
upgradeInfo: ''
},
rules: {},
submitdisabled: false
}
},
methods: {
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '更新框架'
},
handleSave() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.$refs.uploadMoreImg.submitUpload()
} else {
return false
}
})
},
change(value) {
console.log(value, 65656)
if (value.response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
} else {
this.$message({ showClose: true, type: 'error', message: value.response.msg })
}
},
backIcon(val) {
if (val.length > 0) {
this.formobj.iconUrl = val[0].url
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.dialogStatus = ''
this.formobj = {
iconUrl: '',
upgradeInfo: ''
}
this.list = []
this.imgList = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
.addInput {
width: 30%;
}
</style>