|
@@ -3,10 +3,11 @@ import {onMounted, ref} from "vue";
|
|
|
import {
|
|
|
deleteById,
|
|
|
fileSave,
|
|
|
- folderSave, getPermissionsByUserCode,
|
|
|
+ folderSave,
|
|
|
+ getPermissionsByUserCode,
|
|
|
getReportCenterTree,
|
|
|
modifyTheFileName,
|
|
|
- move, setPermissions
|
|
|
+ move
|
|
|
} from "@/api/base-data/report-center";
|
|
|
import {CyMessageBox} from "@/components/cy/message-box";
|
|
|
import {SaveFile} from "@/api/base-data/type/magic-api";
|
|
@@ -23,8 +24,6 @@ import type {
|
|
|
} from 'element-plus/es/components/tree/src/tree.type'
|
|
|
import CyAutoSize from "@/components/cy/auto-size/cy-auto-size.vue";
|
|
|
import {useElementSize} from "@vueuse/core";
|
|
|
-import XcComboGridV2 from "@/components/xiao-chan/combo-grid/XcComboGridV2.vue";
|
|
|
-import {getRenYuan} from "@/api/public-api";
|
|
|
|
|
|
enum FILE_ENUM {
|
|
|
FILE = 0,
|
|
@@ -45,19 +44,10 @@ const treeData = ref([])
|
|
|
const treeRef = useCompRef(ElTree)
|
|
|
const mousePosition = ref()
|
|
|
const inputValue = ref('')
|
|
|
-const personnelList = ref([])
|
|
|
-const userCode = ref('')
|
|
|
-
|
|
|
const headerRef = ref()
|
|
|
|
|
|
const {height: headerHeight} = useElementSize(headerRef)
|
|
|
|
|
|
-const personnel = [
|
|
|
- {label: '编码', prop: 'code', width: 70},
|
|
|
- {label: '名称', prop: 'name', width: 80},
|
|
|
- {label: '科室', prop: 'deptName', width: 92},
|
|
|
- {label: '级别', prop: 'empTitName', width: 105},
|
|
|
-]
|
|
|
|
|
|
function generateRandomPath() {
|
|
|
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
@@ -107,9 +97,9 @@ return {
|
|
|
}`,
|
|
|
pageJson: createFile()
|
|
|
}
|
|
|
- const save = await fileSave(data)
|
|
|
+ await fileSave(data)
|
|
|
} else {
|
|
|
- const folder = await folderSave({name: res.value, path, parentId, type: 'api'})
|
|
|
+ await folderSave({name: res.value, path, parentId, type: 'api'})
|
|
|
}
|
|
|
queryData()
|
|
|
}
|
|
@@ -212,20 +202,9 @@ function rowClick(row) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-function saveClick() {
|
|
|
- const halfCheckKeys = treeRef.value.getHalfCheckedKeys()
|
|
|
- const checkedKeys = treeRef.value.getCheckedKeys()
|
|
|
- let temp = [...checkedKeys, ...halfCheckKeys]
|
|
|
- setPermissions({userCode: userCode.value, ids: temp})
|
|
|
-}
|
|
|
|
|
|
onMounted(() => {
|
|
|
queryData()
|
|
|
- if (props.editor) {
|
|
|
- getRenYuan('').then(res => {
|
|
|
- personnelList.value = res
|
|
|
- })
|
|
|
- }
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -239,17 +218,6 @@ onMounted(() => {
|
|
|
<el-button @click="createANewReport(FILE_ENUM.FOLDER)"> 文件夹</el-button>
|
|
|
<el-button @click="createANewReport(FILE_ENUM.FILE)">文件</el-button>
|
|
|
</el-button-group>
|
|
|
- <br/>
|
|
|
- <xc-combo-grid-v2 width="120px"
|
|
|
- v-model="userCode"
|
|
|
- filterable
|
|
|
- select
|
|
|
- @rowClick="rowClick"
|
|
|
- clearable
|
|
|
- :table-header="personnel"
|
|
|
- :data="personnelList"/>
|
|
|
- <el-divider direction="vertical"/>
|
|
|
- <el-button type="primary" @click="saveClick">保存</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-input placeholder="搜索报表" @input="handleInputChange" v-model="inputValue"/>
|