fix: 修改发布的问题
This commit is contained in:
parent
b9bdf4abf4
commit
9dbbf9c198
@ -124,8 +124,8 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="下载地址:">
|
||||
<el-input v-model="form.moduleUrl" class="input-with-select" readonly>
|
||||
<el-button slot="append" @click="copyIt(form.moduleUrl)">复制</el-button>
|
||||
<el-input v-model="form.apkUrl" class="input-with-select" readonly>
|
||||
<el-button slot="append" @click="copyIt(form.apkUrl)">复制</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布状态">
|
||||
@ -212,16 +212,17 @@ export default {
|
||||
this.loading = true
|
||||
getPublish(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = '发布详情'
|
||||
this.getPackList(this.form.apkId)
|
||||
|
||||
})
|
||||
},
|
||||
/** 查询参数列表 */
|
||||
getPackList(id) {
|
||||
getINFO(id).then(response => {
|
||||
this.form.sysApkName = response.data.sysApkName
|
||||
console.log(this.form)
|
||||
this.$nextTick(() => {
|
||||
this.title = '发布详情'
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -261,6 +262,10 @@ export default {
|
||||
// 选择系统做一些逻辑判断
|
||||
changeSys(sysType) {
|
||||
this.form.systemType = sysType
|
||||
},
|
||||
copyIt(url) {
|
||||
navigator.clipboard.writeText(url)
|
||||
this.$message.success('复制成功')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@
|
||||
>下载安装包
|
||||
</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']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@ -228,7 +228,7 @@
|
||||
>修改
|
||||
</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']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@ -259,7 +259,7 @@
|
||||
<el-form-item label="APP名称">
|
||||
<el-input v-model="form.appName" placeholder="请输入APP名称" readonly/>
|
||||
</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-option
|
||||
@ -381,7 +381,10 @@
|
||||
|
||||
</el-form>
|
||||
<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 @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
@ -500,6 +503,9 @@ export default {
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
sysApkName: [
|
||||
{ required: true, message: '安装包不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -510,13 +516,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/** 查询发布列表列表 */
|
||||
getList() {
|
||||
getList(type) {
|
||||
|
||||
this.loading = true
|
||||
listPublish(this.queryParams).then(response => {
|
||||
this.publishList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
if (type) {
|
||||
this.handlePublish(this.publishList[0].id)
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
@ -551,7 +561,9 @@ export default {
|
||||
created: null,
|
||||
modified: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
updateTime: null,
|
||||
apkUrl: null,
|
||||
sysApkName: null
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
@ -585,17 +597,17 @@ export default {
|
||||
const id = row.id || this.ids
|
||||
getPublish(id).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = '修改发布列表'
|
||||
this.getPackList(this.form.apkId)
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
/** 查询参数列表 */
|
||||
getPackList(id) {
|
||||
this.loading = true
|
||||
getINFO(id).then(response => {
|
||||
this.form.sysApkName = response.data.sysApkName
|
||||
this.open = true
|
||||
this.title = '修改发布列表'
|
||||
})
|
||||
},
|
||||
|
||||
@ -642,11 +654,10 @@ export default {
|
||||
})
|
||||
} else {
|
||||
addPublish(this.form).then((res) => {
|
||||
|
||||
this.loading = false
|
||||
this.open = false
|
||||
this.getList('publish')
|
||||
// this.handlePublish(res.id)
|
||||
// this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -656,7 +667,7 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除发布列表编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除发布列表编号为"' + ids + '"的数据项?,请确定数据是已下架状态才能删除!').then(function() {
|
||||
return delPublish(ids)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
@ -676,12 +687,11 @@ export default {
|
||||
},
|
||||
|
||||
addPack(e) {
|
||||
|
||||
this.form.apkId = e.apkId
|
||||
this.form.version = e.version
|
||||
this.form.systemType = e.sysType
|
||||
this.form.sysApkName = e.sysApkName
|
||||
this.form.sysApk = e.sysApk
|
||||
this.form.apkUrl = e.sysApk
|
||||
this.packOpen = false
|
||||
},
|
||||
|
||||
@ -706,6 +716,7 @@ export default {
|
||||
this.form.version = null
|
||||
this.form.sysApkName = null
|
||||
this.form.appStoreAddress = null
|
||||
this.form.apkUrl = null
|
||||
console.log(this.form, 99999999)
|
||||
},
|
||||
/**下载安装包*/
|
||||
@ -734,6 +745,7 @@ export default {
|
||||
closeDetailModal() {
|
||||
this.openDetail = false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user