修改 查看详情 返回页面刷新
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<addForm ref="addForms" @onSubmit="tableStore.index()" openType="create"></addForm>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import { ref, onMounted, provide, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
@@ -47,7 +47,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const { push } = useRouter()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
@@ -56,6 +56,7 @@ const AuditRef = ref()
|
||||
const ruleFormRef = ref()
|
||||
const show: any = ref(false)
|
||||
const fileList = ref([])
|
||||
const flag = ref(false)
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/userReport/getUserReport',
|
||||
publicHeight: 65,
|
||||
@@ -133,6 +134,7 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
flag.value = true
|
||||
handleAudit(row.processInstanceId, row.historyInstanceId)
|
||||
}
|
||||
},
|
||||
@@ -143,7 +145,7 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !=3
|
||||
return row.createBy != adminInfo.$state.id || row.status != 3
|
||||
},
|
||||
click: row => {
|
||||
addForms.value.open({
|
||||
@@ -159,7 +161,7 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-Open',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.createBy != adminInfo.$state.id || row.status !=1
|
||||
return row.createBy != adminInfo.$state.id || row.status != 1
|
||||
},
|
||||
click: row => {
|
||||
cancelLeave(row)
|
||||
@@ -238,6 +240,18 @@ const cancelLeave = async (row: any) => {
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
const handleAudit = (instanceId: any, historyInstanceId: any) => {
|
||||
|
||||
Reference in New Issue
Block a user