文档管理
This commit is contained in:
parent
f0ac0a6044
commit
825d770943
@ -3,7 +3,7 @@ window.webConfig = {
|
||||
"VITEAPPBASEWEB": "https://edu.mmhyvision.com/vision",
|
||||
"webApiBaseApp": "https://edu.mmhyvision.com/parent",
|
||||
|
||||
"title": "明眸眼健康智慧管理系统(视光版)",
|
||||
"title": "文档与数据管理系统",
|
||||
"content1": "杭州明眸慧眼科技有限公司",
|
||||
"content2": "浙江省杭州市余杭区祥茂路166号华滋科欣设计创意园4号楼",
|
||||
"content3": "400-6588695",
|
||||
@ -12,4 +12,4 @@ window.webConfig = {
|
||||
"headerLogo": "logo.png",
|
||||
"ItutionIds": "a35ce60b10e425df77f401ebf1af80ac",
|
||||
}
|
||||
document.title = "明眸眼健康智慧管理系统(视光版)";
|
||||
document.title = "文档与数据管理系统";
|
40
web/src/api/document/index.ts
Normal file
40
web/src/api/document/index.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request';
|
||||
//查询所有专项文档管理项目管理
|
||||
export function projectList() {
|
||||
return request({
|
||||
url: '/specialDocument/project/list',
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
//获取变电站树形结构
|
||||
export function getNodesTree(queryParams:any) {
|
||||
return request({
|
||||
url: '/specialDocument/sd_nodes/getNodesTree',
|
||||
method: 'post',
|
||||
params:queryParams
|
||||
});
|
||||
}
|
||||
//增加专项文档节点
|
||||
export function addNodes(queryParams:any) {
|
||||
return request({
|
||||
url: '/specialDocument/sd_nodes/addNodes',
|
||||
method: 'post',
|
||||
data:queryParams
|
||||
});
|
||||
}
|
||||
// /修改专项文档节点
|
||||
export function updateNodes(queryParams:any) {
|
||||
return request({
|
||||
url: '/specialDocument/sd_nodes/updateNodes',
|
||||
method: 'post',
|
||||
data:queryParams
|
||||
});
|
||||
}
|
||||
//删根据ID删除专项文档管理项目管理
|
||||
export function deleteNodesById(queryParams:any) {
|
||||
return request({
|
||||
url: '/specialDocument/sd_nodes/deleteNodesById',
|
||||
method: 'post',
|
||||
params:queryParams
|
||||
});
|
||||
}
|
BIN
web/src/assets/project/del.png
Normal file
BIN
web/src/assets/project/del.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 251 B |
BIN
web/src/assets/project/jia.png
Normal file
BIN
web/src/assets/project/jia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
BIN
web/src/assets/project/xiu.png
Normal file
BIN
web/src/assets/project/xiu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 B |
451
web/src/views/special/document/index.vue
Normal file
451
web/src/views/special/document/index.vue
Normal file
@ -0,0 +1,451 @@
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "document",//文档管理
|
||||
};
|
||||
</script>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick } from "vue";
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { ElMessageBox, ElMessage } from "element-plus";
|
||||
import Page from '@/components/Pagination/page.vue';
|
||||
import { projectList, getNodesTree, addNodes, updateNodes, deleteNodesById } from "@/api/document";
|
||||
import uploadFiles from '@/components/uploadFiles/index.vue'
|
||||
|
||||
const handleSuccess = (file: any) => {
|
||||
console.log('上传成功:', file.name)
|
||||
}
|
||||
|
||||
const handleError = ({ file, error }) => {
|
||||
console.error('上传失败:', file.name, error)
|
||||
}
|
||||
onMounted(() => {
|
||||
getProject()
|
||||
});
|
||||
//拖动条
|
||||
const vMove = {
|
||||
mounted(el: any) {
|
||||
el.onmousedown = function (e: any) {
|
||||
var init = e.clientX;
|
||||
var parent: any = document.getElementById("silderLeft");
|
||||
const initWidth: any = parent.offsetWidth;
|
||||
document.onmousemove = function (e) {
|
||||
var end = e.clientX;
|
||||
var newWidth = end - init + initWidth;
|
||||
parent.style.width = newWidth + "px";
|
||||
};
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
//左侧树的选择框
|
||||
const projectId = ref()
|
||||
const projectArr = ref([])
|
||||
//获取所有项目
|
||||
function getProject() {
|
||||
projectList().then((res: any) => {
|
||||
projectArr.value = res.data
|
||||
projectId.value = projectArr.value[0].id
|
||||
gettreedata()
|
||||
})
|
||||
}
|
||||
//左侧树配置
|
||||
const treedata = ref([])
|
||||
const treeloading = ref(false)
|
||||
const defaultProps = {
|
||||
children: "children",
|
||||
label: "nodeName"
|
||||
};
|
||||
const treeForm = ref({
|
||||
projectId: '',
|
||||
nodeName: '',
|
||||
})
|
||||
//获取树数据
|
||||
function gettreedata() {
|
||||
treeloading.value = true
|
||||
treeForm.value.projectId = projectId.value
|
||||
getNodesTree(treeForm.value).then((res: any) => {
|
||||
treedata.value = res.data
|
||||
treeloading.value = false
|
||||
})
|
||||
}
|
||||
function handleNodeClick(data: any, node: any) {
|
||||
|
||||
}
|
||||
//子项目配置
|
||||
const frame = ref(false)
|
||||
const title = ref()
|
||||
const ruleFormRef = ref()
|
||||
const projectForme: any = ref({
|
||||
projectId: '',//所属项目id
|
||||
parentId: "",//父节点id
|
||||
nodeType: "",//节点类型
|
||||
nodeName: "",//节点名称
|
||||
})
|
||||
//用户弹窗规则定义
|
||||
const moderules = ref({
|
||||
nodeName: [{ required: true, message: "请输入节点名称", trigger: "blur" }],
|
||||
});
|
||||
//新增子项目
|
||||
function addSubItem(row: any) {
|
||||
frame.value = true
|
||||
projectForme.value = {
|
||||
projectId: '',//所属项目id
|
||||
parentId: "",//父节点id
|
||||
nodeType: "",//节点类型
|
||||
nodeName: "",//节点名称
|
||||
}
|
||||
projectForme.value.projectId = projectId.value
|
||||
if (row.nodeType == '00') {
|
||||
projectForme.value.parentId = '00'
|
||||
} else {
|
||||
projectForme.value.parentId = row.id
|
||||
}
|
||||
if (row.nodeType == '00') {
|
||||
title.value = "添加子项目"
|
||||
projectForme.value.nodeType = '01'
|
||||
} else if (row.nodeType == '01') {
|
||||
title.value = "添加课题"
|
||||
projectForme.value.nodeType = '02'
|
||||
} else if (row.nodeType == '02') {
|
||||
title.value = "添加年度"
|
||||
projectForme.value.nodeType = '03'
|
||||
} else if (row.nodeType == '03') {
|
||||
title.value = "添加主题"
|
||||
projectForme.value.nodeType = '04'
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
//修改子项目
|
||||
function editSubItem(row: any) {
|
||||
if (row.nodeType == '01') {
|
||||
title.value = "修改子项目"
|
||||
} else if (row.nodeType == '02') {
|
||||
title.value = "修改课题"
|
||||
} else if (row.nodeType == '03') {
|
||||
title.value = "修改年度"
|
||||
} else if (row.nodeType == '04') {
|
||||
title.value = "修改主题"
|
||||
}
|
||||
// title.value = "修改子项目"
|
||||
frame.value = true
|
||||
if (row.subRegions) {
|
||||
delete row.subRegions
|
||||
}
|
||||
if (row.createTime) {
|
||||
delete row.createTime
|
||||
}
|
||||
|
||||
projectForme.value = JSON.parse(JSON.stringify(row))
|
||||
}
|
||||
//表单确定
|
||||
async function submitForm(formEl: any) {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid: any, fields: any) => {
|
||||
if (valid) {
|
||||
if (projectForme.value.id) {
|
||||
updateNodes(projectForme.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
gettreedata()
|
||||
ElMessage.success("修改成功")
|
||||
frame.value = false
|
||||
}
|
||||
|
||||
})
|
||||
} else {
|
||||
addNodes(projectForme.value).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
gettreedata()
|
||||
ElMessage.success("添加成功")
|
||||
frame.value = false
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
//弹框关闭
|
||||
function handleClose(formEl: any) {
|
||||
// if (!formEl) return
|
||||
// formEl.resetFields()
|
||||
frame.value = false
|
||||
}
|
||||
//删除子节点
|
||||
function delSubItem(row: any) {
|
||||
ElMessageBox.confirm(
|
||||
'您确定要删除该项目吗?',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
deleteNodesById({ id: row.id }).then((res: any) => {
|
||||
if (res.code == 0) {
|
||||
gettreedata()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功',
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
//表格数据配置
|
||||
const queryParams: any = ref({
|
||||
current: 1,
|
||||
size: 20,
|
||||
name: ''
|
||||
});
|
||||
//定义表格数据
|
||||
const tableData: any = ref([{}, {}]);
|
||||
const total = ref(0);
|
||||
// 表格加载
|
||||
const loading = ref(false)
|
||||
//获取表格数据
|
||||
function getdata() {
|
||||
|
||||
}
|
||||
//上传组件
|
||||
const upfile = ref(false)
|
||||
function openFile() {
|
||||
upfile.value = true
|
||||
}
|
||||
function fileClose() {
|
||||
upfile.value = false
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="faulttemplate-box">
|
||||
<aside id="silderLeft">
|
||||
<div>
|
||||
<el-select v-model="projectId" placeholder="请选择项目" @change="gettreedata()">
|
||||
<el-option v-for="item in projectArr" :key="item.id" :label="item.projectName" :value="item.id" />
|
||||
</el-select>
|
||||
<div class="tree_sou">
|
||||
<el-input v-model="treeForm.nodeName" style="width:100%;margin:10px 9px 10px 0px;"
|
||||
placeholder="节点名称" clearable />
|
||||
<el-button type="primary" @click="gettreedata()">搜索</el-button>
|
||||
<el-button type="primary" @click="addSubItem({ nodeType: '00' })">新增子项目</el-button>
|
||||
</div>
|
||||
|
||||
<el-tree ref="treeRef" node-key="id" :data="treedata" :highlight-current="true" :props="defaultProps"
|
||||
v-loading="treeloading" @node-click="handleNodeClick"
|
||||
:class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
||||
style="height: calc(100vh - 280px); overflow: auto;margin-top: 10px;">
|
||||
<template #default="{ data }">
|
||||
<span class="custom-tree-node">
|
||||
<span>{{ data.nodeName }}</span>
|
||||
<span class="img_tree">
|
||||
<img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)">
|
||||
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
||||
<img v-if="data.nodeType == '01'" src="@/assets/project/jia.png" alt="" title="添加课题"
|
||||
@click="addSubItem(data)">
|
||||
<img v-if="data.nodeType == '02'" src="@/assets/project/jia.png" alt="" title="添加年度"
|
||||
@click="addSubItem(data)">
|
||||
<img v-if="data.nodeType == '03'" src="@/assets/project/jia.png" alt="" title="添加主题"
|
||||
@click="addSubItem(data)">
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="moveBtn" v-move>
|
||||
<div class="moveBtn-line"></div>
|
||||
</div>
|
||||
</aside>
|
||||
<section class="silderRight">
|
||||
<div class="sou_title">
|
||||
<div class="sou_title_left">
|
||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
||||
placeholder="项目编号"></el-input>
|
||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
||||
placeholder="项目类型"></el-input>
|
||||
<el-input style="margin-right: 10px ;" v-model="queryParams.name" clearable @change="getdata()"
|
||||
placeholder="项目名称"></el-input>
|
||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="openFile">上传</el-button>
|
||||
<el-button type="primary">新增</el-button>
|
||||
<el-button type="primary">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" :data="tableData"
|
||||
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
|
||||
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
||||
<el-table-column type="index" label="序号" width="70" align="center"></el-table-column>
|
||||
<el-table-column prop="usercode" label="文件名称"></el-table-column>
|
||||
<el-table-column prop="username" label="关键字"></el-table-column>
|
||||
<el-table-column prop="requestip" label="上传人"></el-table-column>
|
||||
<el-table-column prop="requestip" label="上传时间"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around;-webkit-justify-content: space-around; ">
|
||||
{{ scope }}
|
||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" title="修改" style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" title="删除" style="cursor: pointer;">
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current"
|
||||
@pagination="getdata()">
|
||||
</Page>
|
||||
|
||||
</section>
|
||||
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
|
||||
destroy-on-close>
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
||||
label-width="auto" class="demo-ruleForm" status-icon>
|
||||
<el-form-item label="节点名称" prop="nodeName">
|
||||
<el-input v-model="projectForme.nodeName" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div style="width: 100%;display: flex;justify-content: end;">
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
|
||||
<el-button @click="handleClose(ruleFormRef)">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<el-dialog title="上传文件" v-model="upfile" width="35%" :before-close="fileClose" top="30px" draggable
|
||||
destroy-on-close>
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
|
||||
label-width="auto" class="demo-ruleForm" status-icon>
|
||||
<el-form-item label="文件上传" prop="nodeName">
|
||||
<uploadFiles upload-url="/api/upload" :max-size="20"
|
||||
@upload-success="handleSuccess" @upload-error="handleError" />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" prop="nodeName">
|
||||
<el-input v-model="projectForme.nodeName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="nodeName">
|
||||
<el-input v-model="projectForme.nodeName" :rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div style="width: 100%;display: flex;justify-content: end;">
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
|
||||
<el-button @click="handleClose(ruleFormRef)">取消</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.faulttemplate-box {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
background-color: #f2f4f9;
|
||||
|
||||
}
|
||||
|
||||
#silderLeft {
|
||||
width: 300px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
position: relative;
|
||||
|
||||
.tree_sou {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.moveBtn {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 拖动条 */
|
||||
.moveBtn {
|
||||
height: 100%;
|
||||
width: 15px;
|
||||
padding: 0 6px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: -15px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.moveBtn-line {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
user-select: none;
|
||||
background-color: #60bfff;
|
||||
}
|
||||
|
||||
.silderRight {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: calc(100vh - 130px);
|
||||
overflow: auto;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border-radius: 3px;
|
||||
padding: 15px;
|
||||
padding-bottom: 0px;
|
||||
box-sizing: border-box;
|
||||
margin-left: 15px;
|
||||
|
||||
.sou_title {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.sou_title_left {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
|
||||
.img_tree {
|
||||
display: flex;
|
||||
width: 25%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
img {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -376,7 +376,7 @@ function menusubmit() {
|
||||
islink: menuInfo.value.islink,
|
||||
isdisplay: menuInfo.value.isdisplay,
|
||||
parentid: btnparentid.value,
|
||||
id: expertInfo.value.id,
|
||||
// id: expertInfo.value.id,
|
||||
icon: iconall.value,
|
||||
}
|
||||
addmenu(params).then(() => {
|
||||
@ -588,9 +588,9 @@ onMounted(() => {
|
||||
<el-button type="primary" @click="search()">搜索</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button v-hasPerm="['add:menu']" type="primary" @click="addClick">
|
||||
<el-button type="primary" @click="addClick">
|
||||
<img src="@/assets/MenuIcon/jscz_xz.png" alt="" style="margin-right: 4px;">新增目录</el-button>
|
||||
<el-button v-hasPerm="['add:menu']" type="primary" @click="menuclick">
|
||||
<el-button type="primary" @click="menuclick">
|
||||
<img src="@/assets/MenuIcon/jscz_xz.png" alt="" style="margin-right: 4px;">添加菜单</el-button>
|
||||
|
||||
</div>
|
||||
@ -674,23 +674,23 @@ onMounted(() => {
|
||||
<!-- <img src="@/assets/icon/subdirectory.png" alt="" title="子目录" @click="subdirectoryclick(scope.$index, scope.row)" style="cursor: pointer;margin-left:5px"> -->
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex; justify-content: space-around;-webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" v-hasPerm="['update:menu']" title="修改"
|
||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" title="修改"
|
||||
@click="handleEdit(scope.row)" style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_zml.png" alt="" v-hasPerm="['add:menu']" v-if="scope.row.type == '0'"
|
||||
<img src="@/assets/MenuIcon/lbcz_zml.png" alt="" v-if="scope.row.type == '0'"
|
||||
title="添加子目录" @click="addchilder(scope.row)" style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_zml1.png" alt="" v-hasPerm="['add:menu']" v-else title="新增子目录"
|
||||
<img src="@/assets/MenuIcon/lbcz_zml1.png" alt="" v-else title="新增子目录"
|
||||
style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_cd.png" alt="" v-hasPerm="['add:menu']" v-if="scope.row.type == '0'"
|
||||
<img src="@/assets/MenuIcon/lbcz_cd.png" alt="" v-if="scope.row.type == '0'"
|
||||
title="添加菜单" @click="menuclick(scope.row)" style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_cd1.png" alt="" v-hasPerm="['add:menu']" v-else title="添加菜单"
|
||||
<img src="@/assets/MenuIcon/lbcz_cd1.png" alt="" v-else title="添加菜单"
|
||||
style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_an.png" alt="" v-hasPerm="['add:menu']" v-if="scope.row.type == '1'"
|
||||
<img src="@/assets/MenuIcon/lbcz_an.png" alt="" v-if="scope.row.type == '1'"
|
||||
title="按钮" @click="btnclick(scope.row)" style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_an1.png" alt="" v-hasPerm="['add:menu']" v-else title="按钮"
|
||||
<img src="@/assets/MenuIcon/lbcz_an1.png" alt="" v-else title="按钮"
|
||||
style="cursor: pointer;margin-left:5px;font-size:18px; color: rgb(153 214 255);">
|
||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" v-hasPerm="['del:menu']" v-if="scope.row.status == '09'"
|
||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" v-if="scope.row.status == '09'"
|
||||
title="删除" style="cursor: pointer; ">
|
||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" v-hasPerm="['del:menu']" v-else title="删除"
|
||||
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" v-else title="删除"
|
||||
@click="handleDelete(scope.row)" style="cursor: pointer; ">
|
||||
</span>
|
||||
</template>
|
||||
|
@ -7,8 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, nextTick } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox } from "element-plus";
|
||||
import {
|
||||
queryRegion } from '@/api/regionmodule/region';
|
||||
import { queryRegion } from '@/api/regionmodule/region';
|
||||
import { listRolePages, isvaildTo, addDept, renewDept, deleDept, assignmentPer, setMenuById, setOrgscope, postOrgscope } from "@/api/role";
|
||||
import { publicTree } from '@/utils/validate';
|
||||
//定义表格数据
|
||||
|
@ -63,9 +63,9 @@ function getTree() {
|
||||
// });
|
||||
getdata()
|
||||
})
|
||||
.catch((error:any)=>{
|
||||
treeloading.value = false
|
||||
})
|
||||
.catch((error: any) => {
|
||||
treeloading.value = false
|
||||
})
|
||||
|
||||
}
|
||||
const currentNodeKey = ref("")
|
||||
@ -107,9 +107,9 @@ function addClick() {
|
||||
email: "",
|
||||
phone: "",
|
||||
roleinfo: [],
|
||||
institution_id:"",
|
||||
institution_name:"",
|
||||
institution_type:""
|
||||
institution_id: "",
|
||||
institution_name: "",
|
||||
institution_type: ""
|
||||
};
|
||||
getOrgPower()
|
||||
institutionName.value = ""
|
||||
@ -133,7 +133,7 @@ function getdata() {
|
||||
total.value = res.data.total
|
||||
tableData.value = res.data.records
|
||||
queryParams.value.size = res.data.size
|
||||
queryParams.value.current = res.data.current
|
||||
queryParams.value.current = res.data.current
|
||||
dialog.value = true
|
||||
loading.value = false;
|
||||
})).catch(() => {
|
||||
@ -178,9 +178,9 @@ const info = ref({
|
||||
email: "",
|
||||
phone: "",
|
||||
roleinfo: [] as any[],
|
||||
institution_id:"",
|
||||
institution_name:"",
|
||||
institution_type:""
|
||||
institution_id: "",
|
||||
institution_name: "",
|
||||
institution_type: ""
|
||||
});
|
||||
|
||||
//修改-用户
|
||||
@ -190,17 +190,17 @@ function editdepartment(row: any) {
|
||||
selectID.push(item.id)
|
||||
})
|
||||
institutionName.value = ""
|
||||
if(row.institution_id !=null && row.institution_id !=''){
|
||||
queryVisionInstitutionById({id:row.institution_id}).then((res) => {
|
||||
if (row.institution_id != null && row.institution_id != '') {
|
||||
queryVisionInstitutionById({ id: row.institution_id }).then((res) => {
|
||||
institutionName.value = res.data.name
|
||||
});
|
||||
}
|
||||
getOrgPower()
|
||||
info.value = JSON.parse(JSON.stringify(row));
|
||||
info.value.roleinfo = selectID;
|
||||
rolesdata.value = row.roles
|
||||
title.value = "修改用户";
|
||||
dialogVisible.value = true;
|
||||
info.value = JSON.parse(JSON.stringify(row));
|
||||
info.value.roleinfo = selectID;
|
||||
rolesdata.value = row.roles
|
||||
title.value = "修改用户";
|
||||
dialogVisible.value = true;
|
||||
|
||||
|
||||
|
||||
@ -221,8 +221,8 @@ function confirmClick(formEl: any) {
|
||||
email: info.value.email,
|
||||
phone: info.value.phone,
|
||||
orgid: orgId.value,
|
||||
institutionId:info.value.institution_id,
|
||||
institutionType:info.value.institution_type
|
||||
institutionId: info.value.institution_id,
|
||||
institutionType: info.value.institution_type
|
||||
};
|
||||
const roleids = String(info.value.roleinfo)
|
||||
updataUser(params, roleids).then((res) => {
|
||||
@ -241,8 +241,8 @@ function confirmClick(formEl: any) {
|
||||
email: info.value.email,
|
||||
phone: info.value.phone,
|
||||
orgid: orgId.value,
|
||||
institutionId:info.value.institution_id,
|
||||
institutionType:info.value.institution_type
|
||||
institutionId: info.value.institution_id,
|
||||
institutionType: info.value.institution_type
|
||||
};
|
||||
const roleids = info.value.roleinfo;
|
||||
addUsers(params, roleids).then((res) => {
|
||||
@ -322,12 +322,12 @@ function getrole() {
|
||||
};
|
||||
getRole(params).then((res) => {
|
||||
rolesdata.value = res;
|
||||
if(isRoles.value == true){
|
||||
if (isRoles.value == true) {
|
||||
rolesdata.value.forEach(element => {
|
||||
if(element.rolename == '医疗机构普通用户'){
|
||||
if (element.rolename == '医疗机构普通用户') {
|
||||
info.value.roleinfo = [element.rolename]
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -384,8 +384,8 @@ onMounted(() => {
|
||||
getTree();
|
||||
getTreeInit();
|
||||
// getdata()
|
||||
for(let i=0;i<userStore.roles.length;i++){
|
||||
if(userStore.roles[i]=='医疗机构管理员'){
|
||||
for (let i = 0; i < userStore.roles.length; i++) {
|
||||
if (userStore.roles[i] == '医疗机构管理员') {
|
||||
isRoles.value = true
|
||||
break
|
||||
}
|
||||
@ -408,48 +408,48 @@ const vMove = {
|
||||
};
|
||||
}
|
||||
}
|
||||
const visionInstitutionVisible =ref(false)
|
||||
function viewInstitution(){
|
||||
const visionInstitutionVisible = ref(false)
|
||||
function viewInstitution() {
|
||||
visionInstitutionVisible.value = true
|
||||
}
|
||||
function InstitutionClose(){
|
||||
function InstitutionClose() {
|
||||
visionInstitutionVisible.value = false
|
||||
}
|
||||
const institutionName = ref("")
|
||||
function returnClick(e:any){
|
||||
function returnClick(e: any) {
|
||||
info.value.institution_id = e.id
|
||||
info.value.institution_name = e.name
|
||||
if(e.parent_id =='00'){
|
||||
if (e.parent_id == '00') {
|
||||
info.value.institution_type = '01'
|
||||
}else{
|
||||
} else {
|
||||
info.value.institution_type = '02'
|
||||
}
|
||||
|
||||
|
||||
visionInstitutionVisible.value = false
|
||||
}
|
||||
const userInfo:any = ref({})
|
||||
function getOrgPower(){
|
||||
const userInfo: any = ref({})
|
||||
function getOrgPower() {
|
||||
let params = {
|
||||
userId:userStore.userId
|
||||
userId: userStore.userId
|
||||
}
|
||||
queryUserRole(params).then((res:any) => {
|
||||
queryUserRole(params).then((res: any) => {
|
||||
userInfo.value = res.data
|
||||
if( res.data.level >=2 && res.data.institution_type =='01'){
|
||||
|
||||
}
|
||||
// if( res.data.level >=2 && res.data.institution_type =='01'){
|
||||
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
function institutionClick(e:any){
|
||||
userInfo.value.list.forEach((element:any) => {
|
||||
if(e == element.id){
|
||||
if(element.parent_id =='00'){
|
||||
function institutionClick(e: any) {
|
||||
userInfo.value.list.forEach((element: any) => {
|
||||
if (e == element.id) {
|
||||
if (element.parent_id == '00') {
|
||||
info.value.institution_type = '01'
|
||||
}else{
|
||||
} else {
|
||||
info.value.institution_type = '02'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
const queryName = ref('')
|
||||
function getTreeInit() {
|
||||
@ -460,14 +460,14 @@ function getTreeInit() {
|
||||
treeloading.value = true
|
||||
treedata.value = []
|
||||
queryVisionInstitutionNameList(params).then((res) => {
|
||||
treedata.value = res.data
|
||||
treedata.value = res.data
|
||||
treedata.value.unshift({
|
||||
id:'',
|
||||
name:'全部机构'
|
||||
id: '',
|
||||
name: '全部机构'
|
||||
})
|
||||
|
||||
treeloading.value = false
|
||||
}).catch(()=>{
|
||||
}).catch(() => {
|
||||
treeloading.value = false
|
||||
});
|
||||
}
|
||||
@ -476,17 +476,13 @@ function getTreeInit() {
|
||||
<template>
|
||||
<div class="faulttemplate-box">
|
||||
<aside id="silderLeft">
|
||||
<el-input
|
||||
v-model="queryName"
|
||||
clearable
|
||||
@keydown.enter="getTreeInit"
|
||||
placeholder="机构名称搜索">
|
||||
<el-input v-model="queryName" clearable @keydown.enter="getTreeInit" placeholder="机构名称搜索">
|
||||
<template #append>
|
||||
<el-button type="primary" :icon="Search" @click="getTreeInit"/>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button type="primary" :icon="Search" @click="getTreeInit" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-tree ref="treeRef" :class="useAppStore().size === 'default' ? 'silderLeft-large' : 'silderLeft-default'"
|
||||
node-key="id" :data="treedata" :highlight-current="true" :props="defaultProps" v-loading="treeloading"
|
||||
node-key="id" :data="treedata" :highlight-current="true" :props="defaultProps" v-loading="treeloading"
|
||||
@node-click="handleNodeClick" style="height: calc(100vh - 180px); overflow: auto">
|
||||
</el-tree>
|
||||
<div class="moveBtn" v-move>
|
||||
@ -496,17 +492,18 @@ function getTreeInit() {
|
||||
<section class="silderRight">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom:10px;display: flex;display: -webkit-flex; justify-content: space-between;-webkit-justify-content: space-between; width: 100%;">
|
||||
<div
|
||||
style="margin-bottom:10px;display: flex;display: -webkit-flex; justify-content: space-between;-webkit-justify-content: space-between; width: 100%;">
|
||||
<div>
|
||||
<el-input v-model="queryParams.querystr" placeholder="请输入用户姓名" clearable style="width: 200px"
|
||||
@keyup.enter="getdata" />
|
||||
<el-button type="primary" style="margin-left: 10px;" @click="getdata">搜索</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button v-hasPerm="['add:user']" type="primary" @click="addClick">
|
||||
<el-button type="primary" @click="addClick">
|
||||
<img src="@/assets/MenuIcon/jscz_xz.png" alt="" style="margin-right: 5px;">
|
||||
新增</el-button>
|
||||
<el-button v-hasPerm="['del:user']" @click="delchoice" :disabled="multipleSelection.length <= 0"
|
||||
<el-button @click="delchoice" :disabled="multipleSelection.length <= 0"
|
||||
:type="multipleSelection.length > 0 ? 'primary' : ''"><el-icon style="margin-right: 5px;">
|
||||
<Delete />
|
||||
</el-icon>删除</el-button>
|
||||
@ -515,14 +512,14 @@ function getTreeInit() {
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;height: calc(100vh - 250px);" row-key="id" border default-expand-all
|
||||
:v-loading="dialog" @selection-change="handleSelectionChange"
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;height: calc(100vh - 250px);" row-key="id"
|
||||
border default-expand-all :v-loading="dialog" @selection-change="handleSelectionChange"
|
||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: ' #383838', height: '50px' }">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||
<el-table-column prop="nickname" label="用户姓名" width="150"></el-table-column>
|
||||
<!-- <el-table-column prop="avatar" label="头像"></el-table-column> -->
|
||||
<el-table-column prop="email" label="邮箱" ></el-table-column>
|
||||
<el-table-column prop="email" label="邮箱"></el-table-column>
|
||||
<el-table-column prop="phone" label="手机号" min-width="90"></el-table-column>
|
||||
<el-table-column prop="username" label="登录账号" width="120"></el-table-column>
|
||||
<!-- <el-table-column prop="custom1" label="登录账号"></el-table-column> -->
|
||||
@ -533,7 +530,7 @@ function getTreeInit() {
|
||||
</el-table-column>
|
||||
<el-table-column prop="institution_name" label="所属机构" min-width="90"></el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column prop="status" label="账号状态" align="center" width="120">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0" @change="switchChange(scope.row)"
|
||||
@ -551,7 +548,8 @@ function getTreeInit() {
|
||||
</el-table-column> -->
|
||||
<el-table-column fixed="right" label="操作" width="110">
|
||||
<template #default="scope">
|
||||
<span style="display: flex;display: -webkit-flex;justify-content: space-around;-webkit-justify-content: space-around; ">
|
||||
<span
|
||||
style="display: flex;display: -webkit-flex;justify-content: space-around;-webkit-justify-content: space-around; ">
|
||||
<img src="@/assets/MenuIcon/lbcz_xg.png" alt="" title="修改" @click="editdepartment(scope.row)"
|
||||
style="cursor: pointer;">
|
||||
<img src="@/assets/MenuIcon/lbcz_czmm.png" alt="" title="重置密码" @click="setpassword(scope.row)"
|
||||
@ -562,7 +560,9 @@ function getTreeInit() {
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current" @pagination="getdata()" ></Page>
|
||||
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current"
|
||||
@pagination="getdata()">
|
||||
</Page>
|
||||
</section>
|
||||
<!-- 用户 弹框-->
|
||||
<el-dialog v-model="dialogVisible" :close-on-click-modal="false" :before-close="handleClose" :title="title"
|
||||
@ -571,38 +571,41 @@ function getTreeInit() {
|
||||
<el-form-item label="用户姓名" prop="nickname">
|
||||
<el-input v-model="info.nickname" style="width: 100%" placeholder="请输入用户姓名"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系邮箱" >
|
||||
<el-form-item label="联系邮箱">
|
||||
<el-input v-model="info.email" style="width: 100%" placeholder="请输入联系邮箱"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" >
|
||||
<el-form-item label="联系电话">
|
||||
<el-input v-model="info.phone" style="width: 100%" placeholder="请输入联系电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录账号" prop="username">
|
||||
<el-input v-model="info.username" style="width: 100%" placeholder="请输入登录账号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属角色" >
|
||||
<el-select v-model="info.roleinfo" placeholder=" " style="width: 100%" multiple :disabled="isRoles==true"
|
||||
filterable>
|
||||
<el-form-item label="所属角色">
|
||||
<el-select v-model="info.roleinfo" placeholder=" " style="width: 100%" multiple :disabled="isRoles == true"
|
||||
filterable>
|
||||
<el-option v-for="item in rolesdata" :key="item.id" :label="item.rolename" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="组织机构" v-if="isRoles==false">
|
||||
<el-input v-if="userInfo.level == '1'" v-model="info.institution_name" autocomplete="off" placeholder="请选择所属机构" disabled style="width: 390px;" />
|
||||
<el-button v-if="userInfo.level == '1'" type="primary" class="ml-[5px]" @click="viewInstitution">选择</el-button>
|
||||
<el-select v-if="userInfo.level != '1'" v-model="info.institution_id" placeholder="请选择所属机构" style="width: 100%"
|
||||
@change="institutionClick">
|
||||
<el-form-item label="组织机构" v-if="isRoles == false">
|
||||
<el-input v-if="userInfo.level == '1'" v-model="info.institution_name" autocomplete="off"
|
||||
placeholder="请选择所属机构" disabled style="width: 390px;" />
|
||||
<el-button v-if="userInfo.level == '1'" type="primary" class="ml-[5px]"
|
||||
@click="viewInstitution">选择</el-button>
|
||||
<el-select v-if="userInfo.level != '1'" v-model="info.institution_id" placeholder="请选择所属机构"
|
||||
style="width: 100%" @change="institutionClick">
|
||||
<el-option v-for="item in userInfo.list" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="dialog-footer" style="display: flex;display: -webkit-flex; justify-content: flex-end;-webkit-justify-content: flex-end;">
|
||||
<span class="dialog-footer"
|
||||
style="display: flex;display: -webkit-flex; justify-content: flex-end;-webkit-justify-content: flex-end;">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="confirmClick(infoForm)">保存</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="visionInstitutionVisible" :close-on-click-modal="false" :before-close="InstitutionClose" :title="'关联机构'"
|
||||
append-to-body width="1280px" draggable>
|
||||
<VisionInstitution v-if="visionInstitutionVisible" @returnClick="returnClick"/>
|
||||
<el-dialog v-model="visionInstitutionVisible" :close-on-click-modal="false" :before-close="InstitutionClose"
|
||||
:title="'关联机构'" append-to-body width="1280px" draggable>
|
||||
<VisionInstitution v-if="visionInstitutionVisible" @returnClick="returnClick" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -624,7 +627,7 @@ function getTreeInit() {
|
||||
|
||||
#silderLeft {
|
||||
width: 250px;
|
||||
padding: 5px 0px 10px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
@ -687,9 +690,8 @@ function getTreeInit() {
|
||||
height: 40px !important;
|
||||
margin: auto !important;
|
||||
}
|
||||
.el-message-box{
|
||||
|
||||
.el-message-box {
|
||||
width: 300px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
0
web/src/views/testdata/datamanagement/index.vue
vendored
Normal file
0
web/src/views/testdata/datamanagement/index.vue
vendored
Normal file
@ -28,7 +28,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
//线上API地址
|
||||
//target: 'https://edu.mmhyvision.com:8443',
|
||||
// 本地API地址
|
||||
target: 'http://192.168.1.16:8087',
|
||||
target: 'http://192.168.1.40:8087',
|
||||
changeOrigin: true,
|
||||
rewrite: path =>
|
||||
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||
|
Loading…
Reference in New Issue
Block a user