修改数据中心问题
This commit is contained in:
@@ -6,23 +6,13 @@
|
||||
</el-form-item>
|
||||
<el-form-item label='所在地市'>
|
||||
<el-select v-model='tableStore.table.params.city' clearable placeholder='请选择所在地市'>
|
||||
<el-option
|
||||
v-for='item in areaOptionList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.name'
|
||||
></el-option>
|
||||
<el-option v-for='item in areaOptionList' :key='item.id' :label='item.name' :value='item.name'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='流程状态'>
|
||||
<el-select v-model='tableStore.table.params.status' clearable placeholder='请选择流程状态'>
|
||||
<el-option
|
||||
v-for='item in statusSelect'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.id'
|
||||
></el-option>
|
||||
<el-option v-for='item in statusSelect' :key='item.id' :label='item.name' :value='item.id'></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -33,39 +23,38 @@
|
||||
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig'/>
|
||||
<Table ref='tableRef' :checkbox-config='checkboxConfig' />
|
||||
<!-- 新增 -->
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()'/>
|
||||
<Add ref='addRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 上传 -->
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()'/>
|
||||
<Audit ref='AuditRef' @onSubmit='tableStore.index()' />
|
||||
<!-- 查看详情 detail 新增/修改 create-->
|
||||
<addForm ref='addForms' @onSubmit='tableStore.index()'></addForm>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import {ref, onMounted, provide, watch, reactive} from 'vue'
|
||||
import { ref, onMounted, provide, watch, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Add from './add.vue'
|
||||
import Audit from './audit.vue'
|
||||
import addForm from './addForm.vue'
|
||||
import {useDictData} from '@/stores/dictData'
|
||||
import {getLoadTypeUserList} from '@/api/process-boot/interference'
|
||||
import {cancelFormData, getUserReportById} from '@/api/supervision-boot/interfere/index'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {ElMessageBox} from 'element-plus/es'
|
||||
import {useAdminInfo} from '@/stores/adminInfo'
|
||||
import {deleteUserReport} from '@/api/supervision-boot/delete/index'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const {push, options, currentRoute} = useRouter()
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const TableHeaderRef = ref()
|
||||
const tableRef = ref()
|
||||
const areaOptionList = dictData
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
.getBasicData('jibei_area')
|
||||
.filter(item => !(item.name == '超高压' || item.name == '风光储'))
|
||||
const statusSelect = dictData.statusSelect()
|
||||
const addRef = ref()
|
||||
const AuditRef = ref()
|
||||
@@ -82,7 +71,7 @@ const tableStore = new TableStore({
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{title: '序号', type: 'seq', width: 80},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'city',
|
||||
@@ -101,7 +90,7 @@ const tableStore = new TableStore({
|
||||
return row.cellValue
|
||||
}
|
||||
},
|
||||
{field: 'projectName', title: '项目名称', minWidth: 170},
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 170 },
|
||||
{
|
||||
field: 'userType',
|
||||
title: '用户性质',
|
||||
@@ -111,7 +100,7 @@ const tableStore = new TableStore({
|
||||
return getUserTypeName(userType)
|
||||
}
|
||||
},
|
||||
{field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130},
|
||||
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{
|
||||
field: 'userStatus',
|
||||
title: '用户状态',
|
||||
@@ -150,7 +139,7 @@ const tableStore = new TableStore({
|
||||
4: '已取消'
|
||||
}
|
||||
},
|
||||
{field: 'createTime', title: '开始时间', minWidth: 170},
|
||||
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||
{
|
||||
field: 'createBy',
|
||||
title: '填报人',
|
||||
@@ -251,10 +240,10 @@ const addList = () => {
|
||||
}
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({row}) => {
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
@@ -264,13 +253,26 @@ const deleteEven = () => {
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +307,7 @@ const exportEvent = () => {
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const {value} = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
@@ -328,16 +330,16 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
() => currentRoute.value.path,
|
||||
() => {
|
||||
if (flag.value && options.history.state.forward?.split('/')[1] == 'bpm') {
|
||||
tableStore.index()
|
||||
flag.value = false
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/** 处理审批按钮 */
|
||||
@@ -378,7 +380,7 @@ const getUserTypeName = (userType: any) => {
|
||||
}
|
||||
|
||||
|
||||
const props = defineProps({id: {type: String, default: 'null'}})
|
||||
const props = defineProps({ id: { type: String, default: 'null' } })
|
||||
watch(() => props.id, async (newValue, oldValue) => {
|
||||
if (newValue === 'null') return // 直接返回,避免后续逻辑执行
|
||||
const fullId = newValue.split('@')[0]
|
||||
@@ -393,7 +395,7 @@ watch(() => props.id, async (newValue, oldValue) => {
|
||||
})
|
||||
}
|
||||
})
|
||||
}, {immediate: true})
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user