联调案例库
修改干扰源用户台账流程
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div style='border: 1px solid #e4e4e4;height: 100%'>
|
||||
<div style="border: 1px solid #e4e4e4; height: 100%">
|
||||
<Toolbar
|
||||
style='border-bottom: 1px solid #e4e4e4;border-top: 1px solid #e4e4e4'
|
||||
:editor='editorRef'
|
||||
:defaultConfig='toolbarConfig'
|
||||
mode='default'
|
||||
style="border-bottom: 1px solid #e4e4e4; border-top: 1px solid #e4e4e4"
|
||||
:editor="editorRef"
|
||||
:defaultConfig="toolbarConfig"
|
||||
mode="default"
|
||||
/>
|
||||
<Editor
|
||||
v-bind='$attrs'
|
||||
:defaultConfig='editorConfig'
|
||||
mode='default'
|
||||
@onCreated='handleCreated'
|
||||
style='height: calc(100% - 42px); '
|
||||
v-bind="$attrs"
|
||||
:defaultConfig="editorConfig"
|
||||
mode="default"
|
||||
@onCreated="handleCreated"
|
||||
style="height: calc(100% - 42px)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
<script lang="ts" setup>
|
||||
import '@wangeditor/editor/dist/css/style.css' // 引入 css
|
||||
|
||||
import { onBeforeUnmount, ref, shallowRef, onMounted } from 'vue'
|
||||
@@ -36,11 +36,12 @@ onMounted(() => {
|
||||
const toolbarConfig = {
|
||||
excludeKeys: ['fullScreen', 'emotion']
|
||||
}
|
||||
let sever = '/cs-harmonic-boot/csconfiguration/uploadImage'
|
||||
let sever = '/system-boot/file/upload'
|
||||
// 本地加api
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
sever = '/api' + sever
|
||||
}
|
||||
type InsertFnType = (url: string, alt: string, href: string) => void
|
||||
const editorConfig = {
|
||||
placeholder: '请输入内容...',
|
||||
MENU_CONF: {
|
||||
@@ -51,10 +52,11 @@ const editorConfig = {
|
||||
uploadFileName: 'file',
|
||||
withCredentials: true,
|
||||
headers: {},
|
||||
meta: { path: '/supervision/' },
|
||||
timeout: 0,
|
||||
customInsert: (insertImg, result, editor) => {
|
||||
const url = result.data.url
|
||||
insertImg(url)
|
||||
customInsert(res: any, insertFn: InsertFnType) {
|
||||
console.log('🚀 ~ customInsert ~ res:', res)
|
||||
insertFn(res.data.url, 'image', res.data.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,8 +69,7 @@ onBeforeUnmount(() => {
|
||||
editor.destroy()
|
||||
})
|
||||
|
||||
const handleCreated = (editor) => {
|
||||
const handleCreated = editor => {
|
||||
editorRef.value = editor // 记录 editor 实例,重要!
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -6,23 +6,15 @@
|
||||
<el-input v-model="form.name" placeholder="请输入事件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生事件">
|
||||
<el-input v-model="form.code" placeholder="请输入发生事件" />
|
||||
<el-input v-model="form.type" placeholder="请输入发生事件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生地点">
|
||||
<el-input v-model="form.remark" placeholder="请输入发生地点" />
|
||||
<el-input v-model="form.location" placeholder="请输入发生地点" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件简介">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入事件简介"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件经过">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
v-model="form.process"
|
||||
placeholder="请输入事件经过"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
@@ -30,7 +22,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="处理措施">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
v-model="form.measures"
|
||||
placeholder="请输入处理措施"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
@@ -38,7 +30,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="治理效果">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
v-model="form.effect"
|
||||
placeholder="请输入治理效果"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
@@ -46,13 +38,15 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-upload v-model:file-list="fileList" action="" multiple :limit="3" :on-exceed="handleExceed">
|
||||
<el-button type="primary">Click to upload</el-button>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">jpg/png files with a size less than 500KB.</div>
|
||||
</template>
|
||||
<el-button type="primary">添加附件</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="display: flex">
|
||||
<div style="width: 80px">事件简介</div>
|
||||
<editor v-model="form.summary" />
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
@@ -67,7 +61,7 @@ import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
|
||||
import editor from '@/components/wangEditor/index.vue'
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
@@ -75,11 +69,15 @@ const formRef = ref()
|
||||
const fileList = ref([])
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive<anyObj>({
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
remark: '',
|
||||
location: '',
|
||||
process: '',
|
||||
measures: '',
|
||||
effect: '',
|
||||
id: ''
|
||||
})
|
||||
|
||||
const rules = {
|
||||
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
||||
@@ -103,6 +101,8 @@ const open = (text: string, data?: anyObj) => {
|
||||
}
|
||||
}
|
||||
const submit = () => {
|
||||
console.log(`1111`, form.summary)
|
||||
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
@@ -116,6 +116,10 @@ const submit = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 事件简介
|
||||
const quit = () => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
@@ -26,46 +26,37 @@ const popupEditRef = ref()
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/user-boot/dept/deptTree',
|
||||
url: '/supervision-boot/libcase/pageQuery',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '电能质量事件名称', field: 'name' },
|
||||
{
|
||||
title: '发生事件',
|
||||
field: 'name1'
|
||||
field: 'type'
|
||||
},
|
||||
{
|
||||
title: '事件简介',
|
||||
field: 'summary'
|
||||
},
|
||||
{
|
||||
title: '事件经过',
|
||||
field: 'process'
|
||||
},
|
||||
{
|
||||
title: '发生地点',
|
||||
field: 'name2'
|
||||
field: 'location'
|
||||
},
|
||||
{
|
||||
title: '处理措施',
|
||||
field: 'name3'
|
||||
field: 'measures'
|
||||
},
|
||||
{
|
||||
title: '治理效果',
|
||||
field: 'name4'
|
||||
field: 'effect'
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '1'
|
||||
},
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '0'
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -23,11 +23,12 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate">模板下载</el-button>
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||
|
||||
<el-dialog title="详情" width="80%" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
@@ -52,6 +53,7 @@ import { useRouter } from 'vue-router'
|
||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||
import DetailInfo from '../../interfere/components/undocumented/detail.vue'
|
||||
import { cancelFormData } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
@@ -66,6 +68,10 @@ const tableStore = new TableStore({
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
width: '60',
|
||||
type: 'checkbox'
|
||||
},
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
{ field: 'substation', title: '厂站名称', minWidth: 100 },
|
||||
@@ -240,6 +246,30 @@ provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
// 禁止点击
|
||||
const checkboxConfig = reactive({
|
||||
checkMethod: ({ row }) => {
|
||||
return adminInfo.roleCode.includes('delete_info')
|
||||
? true
|
||||
: row.createBy == adminInfo.$state.id && row.status == 0
|
||||
}
|
||||
})
|
||||
const deleteEven = () => {
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage({
|
||||
type: 'warning',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
deleteUserReport(tableStore.table.selection.map(item => item.id)).then(res => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
|
||||
Reference in New Issue
Block a user