fix: 修改发布的问题

This commit is contained in:
张洋川 2024-04-24 12:59:36 +08:00
parent b9bdf4abf4
commit 9dbbf9c198
2 changed files with 36 additions and 19 deletions

View File

@ -124,8 +124,8 @@
</el-form-item> </el-form-item>
<el-form-item label="下载地址:"> <el-form-item label="下载地址:">
<el-input v-model="form.moduleUrl" class="input-with-select" readonly> <el-input v-model="form.apkUrl" class="input-with-select" readonly>
<el-button slot="append" @click="copyIt(form.moduleUrl)">复制</el-button> <el-button slot="append" @click="copyIt(form.apkUrl)">复制</el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="发布状态"> <el-form-item label="发布状态">
@ -212,16 +212,17 @@ export default {
this.loading = true this.loading = true
getPublish(id).then(response => { getPublish(id).then(response => {
this.form = response.data this.form = response.data
this.open = true
this.title = '发布详情'
this.getPackList(this.form.apkId) this.getPackList(this.form.apkId)
}) })
}, },
/** 查询参数列表 */ /** 查询参数列表 */
getPackList(id) { getPackList(id) {
getINFO(id).then(response => { getINFO(id).then(response => {
this.form.sysApkName = response.data.sysApkName this.form.sysApkName = response.data.sysApkName
console.log(this.form) this.$nextTick(() => {
this.title = '发布详情'
})
}) })
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -261,6 +262,10 @@ export default {
// //
changeSys(sysType) { changeSys(sysType) {
this.form.systemType = sysType this.form.systemType = sysType
},
copyIt(url) {
navigator.clipboard.writeText(url)
this.$message.success('复制成功')
} }
} }
} }

View File

@ -219,7 +219,7 @@
>下载安装包 >下载安装包
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.status===2" v-if="scope.row.status===2 || scope.row.status===0"
v-hasPermi="['deployment:publish:edit']" v-hasPermi="['deployment:publish:edit']"
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
@ -228,7 +228,7 @@
>修改 >修改
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.status===2" v-if="scope.row.status===2 || scope.row.status===0"
v-hasPermi="['deployment:publish:remove']" v-hasPermi="['deployment:publish:remove']"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@ -259,7 +259,7 @@
<el-form-item label="APP名称"> <el-form-item label="APP名称">
<el-input v-model="form.appName" placeholder="请输入APP名称" readonly/> <el-input v-model="form.appName" placeholder="请输入APP名称" readonly/>
</el-form-item> </el-form-item>
<el-form-item label="选择系统" prop="grayFlag"> <el-form-item label="选择系统" prop="systemType">
<el-select v-model="form.systemType" placeholder="请选择系统类型" @change="changeSys"> <el-select v-model="form.systemType" placeholder="请选择系统类型" @change="changeSys">
<el-option <el-option
@ -381,7 +381,10 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="pubLishForm"> </el-button> <el-button v-if="form.status!=2" type="primary"
@click="pubLishForm"
>
</el-button>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
@ -500,6 +503,9 @@ export default {
], ],
createTime: [ createTime: [
{ required: true, message: '创建时间不能为空', trigger: 'blur' } { required: true, message: '创建时间不能为空', trigger: 'blur' }
],
sysApkName: [
{ required: true, message: '安装包不能为空', trigger: 'blur' }
] ]
} }
} }
@ -510,13 +516,17 @@ export default {
}, },
methods: { methods: {
/** 查询发布列表列表 */ /** 查询发布列表列表 */
getList() { getList(type) {
this.loading = true this.loading = true
listPublish(this.queryParams).then(response => { listPublish(this.queryParams).then(response => {
this.publishList = response.rows this.publishList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
}) })
if (type) {
this.handlePublish(this.publishList[0].id)
}
}, },
// //
cancel() { cancel() {
@ -551,7 +561,9 @@ export default {
created: null, created: null,
modified: null, modified: null,
createTime: null, createTime: null,
updateTime: null updateTime: null,
apkUrl: null,
sysApkName: null
} }
this.resetForm('form') this.resetForm('form')
}, },
@ -585,17 +597,17 @@ export default {
const id = row.id || this.ids const id = row.id || this.ids
getPublish(id).then(response => { getPublish(id).then(response => {
this.form = response.data this.form = response.data
this.open = true
this.title = '修改发布列表'
this.getPackList(this.form.apkId) this.getPackList(this.form.apkId)
}) })
}, },
/** 查询参数列表 */ /** 查询参数列表 */
getPackList(id) { getPackList(id) {
this.loading = true
getINFO(id).then(response => { getINFO(id).then(response => {
this.form.sysApkName = response.data.sysApkName this.form.sysApkName = response.data.sysApkName
this.open = true
this.title = '修改发布列表'
}) })
}, },
@ -642,11 +654,10 @@ export default {
}) })
} else { } else {
addPublish(this.form).then((res) => { addPublish(this.form).then((res) => {
this.loading = false this.loading = false
this.open = false this.open = false
this.getList('publish')
// this.handlePublish(res.id) // this.handlePublish(res.id)
// this.getList()
}) })
} }
} }
@ -656,7 +667,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids const ids = row.id || this.ids
this.$modal.confirm('是否确认删除发布列表编号为"' + ids + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除发布列表编号为"' + ids + '"的数据项?,请确定数据是已下架状态才能删除!').then(function() {
return delPublish(ids) return delPublish(ids)
}).then(() => { }).then(() => {
this.getList() this.getList()
@ -676,12 +687,11 @@ export default {
}, },
addPack(e) { addPack(e) {
this.form.apkId = e.apkId this.form.apkId = e.apkId
this.form.version = e.version this.form.version = e.version
this.form.systemType = e.sysType this.form.systemType = e.sysType
this.form.sysApkName = e.sysApkName this.form.sysApkName = e.sysApkName
this.form.sysApk = e.sysApk this.form.apkUrl = e.sysApk
this.packOpen = false this.packOpen = false
}, },
@ -706,6 +716,7 @@ export default {
this.form.version = null this.form.version = null
this.form.sysApkName = null this.form.sysApkName = null
this.form.appStoreAddress = null this.form.appStoreAddress = null
this.form.apkUrl = null
console.log(this.form, 99999999) console.log(this.form, 99999999)
}, },
/**下载安装包*/ /**下载安装包*/
@ -734,6 +745,7 @@ export default {
closeDetailModal() { closeDetailModal() {
this.openDetail = false this.openDetail = false
} }
} }
} }
</script> </script>