Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,36 +1,36 @@
|
|||||||
<!--模型分类的新增编辑弹出框-->
|
<!--模型分类的新增编辑弹出框-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog draggable class="cn-operate-dialog" v-model="machineVisible" :title="title" width="40%">
|
||||||
draggable
|
<el-scrollbar>
|
||||||
class='cn-operate-dialog'
|
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||||
v-model='machineVisible'
|
<el-form-item label="分类名称" prop="name">
|
||||||
:title='title'
|
<el-input v-model="form.name" placeholder="请输入分类名" clearable />
|
||||||
style='width: 415px; height: 350px'
|
</el-form-item>
|
||||||
top='30vh'
|
<el-form-item label="分类标识" prop="code">
|
||||||
>
|
<el-input v-model="form.code" placeholder="请输入分类标识" clearable />
|
||||||
<el-scrollbar>
|
</el-form-item>
|
||||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
<el-form-item label="分类描述" prop="description">
|
||||||
<el-form-item label='分类名称' prop='name'>
|
<el-input
|
||||||
<el-input v-model='form.name' placeholder='请输入分类名' clearable />
|
v-model="form.description"
|
||||||
</el-form-item>
|
placeholder="请输入分类描述"
|
||||||
<el-form-item label='分类标识' prop='code'>
|
clearable
|
||||||
<el-input v-model='form.code' placeholder='请输入分类标识' clearable />
|
type="textarea"
|
||||||
</el-form-item>
|
></el-input>
|
||||||
<el-form-item label='分类描述' prop='description'>
|
</el-form-item>
|
||||||
<el-input v-model='form.description' placeholder='请输入分类描述' clearable type='textarea'>
|
<el-form-item label="排序">
|
||||||
</el-input>
|
<el-input-number style="width: 100%" v-model="form.sort" :min="0" placeholder="请输入排序" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class='dialog-footer'>
|
<span class="dialog-footer">
|
||||||
<el-button @click='machineVisible = false'>取消</el-button>
|
<el-button @click="machineVisible = false">取消</el-button>
|
||||||
<el-button type='primary' @click='submit'>确认</el-button>
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, inject } from 'vue'
|
import { ref, reactive, inject } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
@@ -43,58 +43,60 @@ const formRef = ref()
|
|||||||
|
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
description: ''
|
description: '',
|
||||||
|
sort: 100
|
||||||
})
|
})
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '分类名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '分类名不能为空', trigger: 'blur' }],
|
||||||
code: [{ required: true, message: '分类标识不能为空', trigger: 'blur' }]
|
code: [{ required: true, message: '分类标识不能为空', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = (text: string, data?: any) => {
|
const open = (text: string, data?: any) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
if (data) {
|
if (data) {
|
||||||
// 表单赋值
|
// 表单赋值
|
||||||
for (let key in form) {
|
for (let key in form) {
|
||||||
form[key] = data[key]
|
form[key] = data[key]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resetForm()
|
||||||
|
// 在此处恢复默认表单
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = ''
|
||||||
|
}
|
||||||
|
form.sort=100
|
||||||
}
|
}
|
||||||
} else {
|
machineVisible.value = true
|
||||||
resetForm()
|
|
||||||
// 在此处恢复默认表单
|
|
||||||
for (let key in form) {
|
|
||||||
form[key] = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
machineVisible.value = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//重置表单内容
|
//重置表单内容
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.id) {
|
if (form.id) {
|
||||||
await updateCategory(form)
|
await updateCategory(form)
|
||||||
} else {
|
} else {
|
||||||
await addCategory(form)
|
await addCategory(form)
|
||||||
}
|
}
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success('保存成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
machineVisible.value = false
|
machineVisible.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
@@ -102,10 +104,10 @@ defineExpose({ open })
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-upload-list__item {
|
.el-upload-list__item {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '分类标识', field: 'code', minWidth: 130 },
|
{ title: '分类标识', field: 'code', minWidth: 130 },
|
||||||
{ title: '分类描述', field: 'description', minWidth: 170 },
|
{ title: '分类描述', field: 'description', minWidth: 170 },
|
||||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||||
|
{ title: '排序', field: 'sort', width: 170 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|||||||
@@ -13,8 +13,7 @@
|
|||||||
</content-wrap>
|
</content-wrap>
|
||||||
|
|
||||||
<!-- 表单保存的弹窗 -->
|
<!-- 表单保存的弹窗 -->
|
||||||
<el-dialog v-model='dialogVisible' title='保存表单' class='cn-operate-dialog' style='width: 415px;height: 350px'
|
<el-dialog v-model='dialogVisible' title='保存表单' class='cn-operate-dialog' width="40%">
|
||||||
top='30vh'>
|
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-form ref='formRef' :model='formData' :rules='formRules' label-width='80px'>
|
<el-form ref='formRef' :model='formData' :rules='formRules' label-width='80px'>
|
||||||
<el-form-item label='表单名' prop='name'>
|
<el-form-item label='表单名' prop='name'>
|
||||||
@@ -34,6 +33,9 @@
|
|||||||
<el-form-item label='备注' prop='remark'>
|
<el-form-item label='备注' prop='remark'>
|
||||||
<el-input v-model='formData.remark' placeholder='请输入备注' type='textarea' />
|
<el-input v-model='formData.remark' placeholder='请输入备注' type='textarea' />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序">
|
||||||
|
<el-input-number style="width: 100%" v-model="formData.sort" :min="0" placeholder="请输入排序" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -83,7 +85,8 @@ const formLoading = ref(false) // 表单的加载中:提交的按钮禁用
|
|||||||
const formData = ref({
|
const formData = ref({
|
||||||
name: '',
|
name: '',
|
||||||
status: 1,
|
status: 1,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
sort:100,
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
name: [{ required: true, message: '表单名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '表单名不能为空', trigger: 'blur' }],
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ const tableStore = new TableStore({
|
|||||||
1: '开启',
|
1: '开启',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ title: '排序', field: 'sort', width: 170 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title'
|
<el-dialog draggable class='cn-operate-dialog' v-model='dialogVisible' :title='title'
|
||||||
style='max-width: 450px;height: 450px'>
|
width="40%">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-form :inline='false' :model='formData' label-width='120px' :rules='rules' ref='formRef'>
|
<el-form :inline='false' :model='formData' label-width='120px' :rules='rules' ref='formRef'>
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,27 @@
|
|||||||
<!--流程分类页面-->
|
<!--流程分类页面-->
|
||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class="default-main">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label='标识名称'>
|
<el-form-item label="标识名称">
|
||||||
<el-input
|
<el-input v-model="tableStore.table.params.name" clearable placeholder="请输入名称" />
|
||||||
v-model='tableStore.table.params.name'
|
</el-form-item>
|
||||||
clearable
|
<el-form-item label="标识key">
|
||||||
placeholder='请输入名称'
|
<el-input v-model="tableStore.table.params.signKey" clearable placeholder="请输入key" />
|
||||||
/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item label='标识key'>
|
<template v-slot:operation>
|
||||||
<el-input
|
<el-button type="primary" class="ml10" @click="add" :icon="Plus">新增</el-button>
|
||||||
v-model='tableStore.table.params.signKey'
|
</template>
|
||||||
clearable
|
</TableHeader>
|
||||||
placeholder='请输入key'
|
<!--表格-->
|
||||||
/>
|
<Table ref="tableRef"></Table>
|
||||||
</el-form-item>
|
<!--弹出框-->
|
||||||
</template>
|
<sign-popup ref="signPopup" />
|
||||||
<template v-slot:operation>
|
</div>
|
||||||
<el-button type='primary' class='ml10' @click='add' :icon='Plus'>新增</el-button>
|
|
||||||
</template>
|
|
||||||
</TableHeader>
|
|
||||||
<!--表格-->
|
|
||||||
<Table ref='tableRef'></Table>
|
|
||||||
<!--弹出框-->
|
|
||||||
<sign-popup ref='signPopup' />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
@@ -41,80 +33,79 @@ import SignPopup from '@/views/system/bpm/sign/signPopup.vue'
|
|||||||
import { deleteSign } from '@/api/bpm-boot/sign'
|
import { deleteSign } from '@/api/bpm-boot/sign'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'bpmSign'
|
name: 'bpmSign'
|
||||||
})
|
})
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const signPopup = ref()
|
const signPopup = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/bpm-boot/bpmSign/list',
|
url: '/bpm-boot/bpmSign/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', type: 'seq', width: 80 },
|
{ title: '序号', type: 'seq', width: 80 },
|
||||||
{ title: '标识名称', field: 'name', minWidth: 130 },
|
{ title: '标识名称', field: 'name', minWidth: 130 },
|
||||||
{ title: '标识key', field: 'signKey', minWidth: 130 },
|
{ title: '标识key', field: 'signKey', minWidth: 130 },
|
||||||
{ title: '表单查看地址', field: 'viewPath', minWidth: 200 },
|
{ title: '表单查看地址', field: 'viewPath', minWidth: 200 },
|
||||||
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
{ title: '创建时间', field: 'createTime', minWidth: 170 },
|
||||||
{
|
{ title: '排序', field: 'sort', width: 170 },
|
||||||
title: '操作',
|
|
||||||
align: 'center',
|
|
||||||
minWidth: '150',
|
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
|
||||||
buttons: [
|
|
||||||
{
|
{
|
||||||
name: 'update',
|
title: '操作',
|
||||||
title: '编辑',
|
align: 'center',
|
||||||
type: 'primary',
|
minWidth: '150',
|
||||||
icon: 'el-icon-EditPen',
|
fixed: 'right',
|
||||||
render: 'basicButton',
|
render: 'buttons',
|
||||||
click: row => {
|
buttons: [
|
||||||
signPopup.value.open('修改流程标识', row)
|
{
|
||||||
}
|
name: 'update',
|
||||||
},
|
title: '编辑',
|
||||||
{
|
type: 'primary',
|
||||||
name: 'update',
|
icon: 'el-icon-EditPen',
|
||||||
title: '删除',
|
render: 'basicButton',
|
||||||
type: 'danger',
|
click: row => {
|
||||||
icon: 'el-icon-Delete',
|
signPopup.value.open('修改流程标识', row)
|
||||||
render: 'confirmButton',
|
}
|
||||||
popconfirm: {
|
},
|
||||||
confirmButtonText: '确认',
|
{
|
||||||
cancelButtonText: '取消',
|
name: 'update',
|
||||||
confirmButtonType: 'danger',
|
title: '删除',
|
||||||
title: '确定删除吗?'
|
type: 'danger',
|
||||||
},
|
icon: 'el-icon-Delete',
|
||||||
click: row => {
|
render: 'confirmButton',
|
||||||
deleteSign(row.id).then(res => {
|
popconfirm: {
|
||||||
ElMessage.success('删除成功')
|
confirmButtonText: '确认',
|
||||||
tableStore.index()
|
cancelButtonText: '取消',
|
||||||
})
|
confirmButtonType: 'danger',
|
||||||
}
|
title: '确定删除吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
deleteSign(row.id).then(res => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
for (let key in tableStore.table.params) {
|
||||||
|
if (tableStore.table.params[key] === '') {
|
||||||
|
delete tableStore.table.params[key]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
for (let key in tableStore.table.params) {
|
|
||||||
if (tableStore.table.params[key] === '') {
|
|
||||||
delete tableStore.table.params[key]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 加载数据
|
// 加载数据
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
tableStore.table.params.signKey = ''
|
tableStore.table.params.signKey = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const add = () => {
|
const add = () => {
|
||||||
signPopup.value.open('新增流程标识')
|
signPopup.value.open('新增流程标识')
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
<!--模型分类的新增编辑弹出框-->
|
<!--模型分类的新增编辑弹出框-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog draggable class="cn-operate-dialog" v-model="machineVisible" :title="title" width="40%">
|
||||||
draggable
|
<el-scrollbar>
|
||||||
class='cn-operate-dialog'
|
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||||
v-model='machineVisible'
|
<el-form-item label="标识名称" prop="name">
|
||||||
:title='title'
|
<el-input v-model="form.name" placeholder="请输入标识名" clearable />
|
||||||
style='width: 415px; height: 350px'
|
</el-form-item>
|
||||||
top='30vh'
|
<el-form-item label="分类key" prop="signKey">
|
||||||
>
|
<el-input v-model="form.signKey" placeholder="请输入标识key" clearable />
|
||||||
<el-scrollbar>
|
</el-form-item>
|
||||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
<el-form-item label="查看表单路径" prop="viewPath">
|
||||||
<el-form-item label='标识名称' prop='name'>
|
<el-input v-model="form.viewPath" placeholder="请输入查看表单路径" clearable></el-input>
|
||||||
<el-input v-model='form.name' placeholder='请输入标识名' clearable />
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item label="排序">
|
||||||
<el-form-item label='分类key' prop='signKey'>
|
<el-input-number
|
||||||
<el-input v-model='form.signKey' placeholder='请输入标识key' clearable />
|
style="width: 100%"
|
||||||
</el-form-item>
|
v-model="form.sort"
|
||||||
<el-form-item label='查看表单路径' prop='viewPath'>
|
:min="0"
|
||||||
<el-input v-model='form.viewPath' placeholder='请输入查看表单路径' clearable>
|
placeholder="请输入排序"
|
||||||
</el-input>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class='dialog-footer'>
|
<span class="dialog-footer">
|
||||||
<el-button @click='machineVisible = false'>取消</el-button>
|
<el-button @click="machineVisible = false">取消</el-button>
|
||||||
<el-button type='primary' @click='submit'>确认</el-button>
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, inject } from 'vue'
|
import { ref, reactive, inject } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
@@ -43,59 +43,61 @@ const formRef = ref()
|
|||||||
|
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
signKey: '',
|
signKey: '',
|
||||||
viewPath: ''
|
viewPath: '',
|
||||||
|
sort:100,
|
||||||
})
|
})
|
||||||
|
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '标识名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '标识名不能为空', trigger: 'blur' }],
|
||||||
signKey: [{ required: true, message: '标识key不能为空', trigger: 'blur' }],
|
signKey: [{ required: true, message: '标识key不能为空', trigger: 'blur' }],
|
||||||
viewPath: [{ required: true, message: '查看表单路径不能为空', trigger: 'blur' }],
|
viewPath: [{ required: true, message: '查看表单路径不能为空', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = (text: string, data?: any) => {
|
const open = (text: string, data?: any) => {
|
||||||
title.value = text
|
title.value = text
|
||||||
if (data) {
|
if (data) {
|
||||||
// 表单赋值
|
// 表单赋值
|
||||||
for (let key in form) {
|
for (let key in form) {
|
||||||
form[key] = data[key]
|
form[key] = data[key]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resetForm()
|
||||||
|
// 在此处恢复默认表单
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = ''
|
||||||
|
}
|
||||||
|
form.sort=100
|
||||||
}
|
}
|
||||||
} else {
|
machineVisible.value = true
|
||||||
resetForm()
|
|
||||||
// 在此处恢复默认表单
|
|
||||||
for (let key in form) {
|
|
||||||
form[key] = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
machineVisible.value = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//重置表单内容
|
//重置表单内容
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
formRef.value.resetFields()
|
formRef.value.resetFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
formRef.value.validate(async (valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.id) {
|
if (form.id) {
|
||||||
await updateSign(form)
|
await updateSign(form)
|
||||||
} else {
|
} else {
|
||||||
await addSign(form)
|
await addSign(form)
|
||||||
}
|
}
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success('保存成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
machineVisible.value = false
|
machineVisible.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
@@ -103,10 +105,10 @@ defineExpose({ open })
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-upload-list__item {
|
.el-upload-list__item {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user