docs: update readme

Signed-off-by: yovinchen <gzh298255@gmail.com>
Signed-off-by: YoVinchen <gzh298255@gmail.com>
This commit is contained in:
YoVinchen 2023-06-17 21:05:04 +08:00
parent 8b059ca5b0
commit e26dba6224
2 changed files with 56 additions and 1 deletions

View File

@ -37,5 +37,11 @@ export default {
url: `${api_name}/remove/${id}`, url: `${api_name}/remove/${id}`,
method: 'delete' method: 'delete'
}) })
},
publish(id) {
return request({
url: `${api_name}/publish/${id}`,
method: 'get'
})
} }
} }

View File

@ -41,6 +41,7 @@
<el-table-column label="更新时间" prop="updateTime" /> <el-table-column label="更新时间" prop="updateTime" />
<el-table-column align="center" label="操作" width="250"> <el-table-column align="center" label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="show(scope.row)">查看审批设置</el-button>
<el-button <el-button
:disabled="$hasBP('bnt.processTemplate.templateSet') === false" :disabled="$hasBP('bnt.processTemplate.templateSet') === false"
size="mini" size="mini"
@ -55,6 +56,14 @@
@click="removeDataById(scope.row.id)" @click="removeDataById(scope.row.id)"
>删除 >删除
</el-button> </el-button>
<el-button
v-if="scope.row.status == 0"
:disabled="$hasBP('bnt.processTemplate.publish') === false"
size="mini"
type="text"
@click="publish(scope.row.id)"
>发布
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -69,6 +78,28 @@
@current-change="fetchData" @current-change="fetchData"
@size-change="changeSize" @size-change="changeSize"
/> />
<el-dialog :visible.sync="formDialogVisible" title="查看审批设置" width="35%">
<h3>基本信息</h3>
<el-divider />
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
<el-form-item label="审批类型" style="margin-bottom: 0px;">{{ processTemplate.processTypeName }}</el-form-item>
<el-form-item label="名称" style="margin-bottom: 0px;">{{ processTemplate.name }}</el-form-item>
<el-form-item label="创建时间" style="margin-bottom: 0px;">{{ processTemplate.createTime }}</el-form-item>
</el-form>
<h3>表单信息</h3>
<el-divider />
<div>
<form-create
:option="option"
:rule="rule"
/>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="formDialogVisible = false"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -82,7 +113,11 @@ export default {
total: 0, // total: 0, //
page: 1, // page: 1, //
limit: 10, // limit: 10, //
searchObj: {} // searchObj: {}, //
rule: [],
option: {},
processTemplate: {},
formDialogVisible: false
} }
}, },
// //
@ -93,6 +128,20 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
//
publish(id) {
api.publish(id).then(response => {
this.$message.success('发布成功')
this.fetchData(this.page)
})
},
//
show(row) {
this.rule = JSON.parse(row.formProps)
this.option = JSON.parse(row.formOptions)
this.processTemplate = row
this.formDialogVisible = true
},
// //
changeSize(size) { changeSize(size) {
this.limit = size this.limit = size