Merge remote-tracking branch 'origin/main'

This commit is contained in:
root 2025-05-20 23:04:50 +08:00
commit 80920a28a5
8 changed files with 277 additions and 22 deletions

View File

@ -4,5 +4,6 @@
// Generated by unplugin-auto-import
export {}
declare global {
const ElMessage: typeof import('element-plus-secondary/es')['ElMessage']
const ElMessageBox: typeof import('element-plus-secondary/es')['ElMessageBox']
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="14px" height="14px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1745 -108 )">
<path d="M 6.125 14 L 6.12499612962483 7.875 L 0 7.875 L 0 6.125 L 6.125 6.1249999982702 L 6.125 0 L 7.875 0 L 7.87500387037517 6.125 L 14 6.125 L 14 7.875 L 7.875 7.8750000017298 L 7.875 14 L 6.125 14 Z " fill-rule="nonzero" fill="#f8f9fc" stroke="none" transform="matrix(1 0 0 1 1745 108 )" />
</g>
</svg>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1295 -14 )">
<path d="M 8.12485581871556 0 C 6.37694406474134 0 4.95831567940832 1.29486602735432 4.8979485140751 2.9205080029394 L 0.823164854075912 2.9205080029394 C 0.370428541086994 2.9205080029394 0 3.26410005353614 0 3.68973470098136 C 0 4.11281264185548 0.367692500394924 4.45897768377856 0.823182281086702 4.45897768377856 L 1.73142580177864 4.45897768377856 L 1.73142580177864 13.0641029033683 C 1.73142580177864 14.6794854831585 2.9030960173834 16 4.35192541239394 16 L 11.7331358272113 16 C 13.1792291815295 16 14.3536354378264 14.6871881723823 14.3536354378264 13.0641029033683 L 14.3536354378264 4.46410738167599 L 15.1768177189133 4.46410738167599 C 15.629571458913 4.46410738167599 16 4.12049904632403 16 3.69486439887879 C 16 3.27178645800467 15.6323074996051 2.92563770083683 15.1768177189133 2.92563770083683 L 11.3462561879503 2.92563770083683 C 11.2941145717039 1.29488231210955 9.87275014567899 1.62847552331868E-05 8.12485581871556 1.62847552331868E-05 Z M 9.80689347195062 2.9205080029394 L 6.44006469777742 2.9205080029394 C 6.50043186311086 2.08718450831235 7.22759131481348 1.44103799029836 8.12759185940763 1.44103799029836 C 9.02759240400178 1.44103799029836 9.7547518557044 2.08974121488345 9.80689347195062 2.9205080029394 Z M 4.34917194469108 14.5692376902517 L 4.34917194469108 14.561535001028 C 3.8360510393577 14.561535001028 3.27078851777833 13.9461503856434 3.27078851777833 13.0641029033683 L 3.27078851777833 4.46410738167599 L 12.808783213432 4.46410738167599 L 12.808783213432 13.0717893078368 C 12.808783213432 13.9512800835408 12.2435206918524 14.5692376902517 11.730399786519 14.5692376902517 L 4.34917194469108 14.5692376902517 Z M 4.76898863432143 11.9205222521002 C 4.76898863432143 12.3589730019114 5.07082446098798 12.712824448303 5.45498548656769 12.712824448303 C 5.8308861090386 12.712824448303 6.14096491180294 12.3615459932378 6.14096491180294 11.9205222521002 L 6.14096491180294 7.40000447830769 C 6.14096491180294 6.95898073717015 5.83363957674146 6.60768599734966 5.45498548656769 6.60768599734966 C 5.07905001007498 6.60768599734966 4.76898863432143 6.95898073717015 4.76898863432143 7.40000447830769 L 4.76898863432143 11.9205222521002 Z M 7.25226796207448 11.9205222521002 C 7.25226796207448 12.3589730019114 7.56234676483882 12.712824448303 7.93826481432052 12.712824448303 C 8.31418286380244 12.712824448303 8.62424423955599 12.3615459932378 8.62424423955599 11.9205222521002 L 8.62424423955599 7.40000447830769 C 8.62424423955599 6.95898073717015 8.31691890449451 6.60768599734966 7.93826481432075 6.60768599734966 C 7.56234676483882 6.60768599734966 7.25226796207448 6.95898073717015 7.25226796207448 7.40000447830769 L 7.25226796207448 11.9205222521002 Z M 9.86452459659199 11.9205222521002 C 9.86452459659199 12.3589730019114 10.1636069555557 12.712824448303 10.5505040218272 12.712824448303 C 10.9264220713092 12.712824448303 11.2365008740735 12.3615459932378 11.2365008740735 11.9205222521002 L 11.2365008740735 7.40000447830769 C 11.2365008740735 6.95898073717015 10.929175539012 6.60768599734966 10.5505040218272 6.60768599734966 C 10.1745859723455 6.60768599734966 9.86452459659199 6.95898073717015 9.86452459659199 7.40000447830769 L 9.86452459659199 11.9205222521002 Z " fill-rule="nonzero" fill="#0089ff" stroke="none" transform="matrix(1 0 0 1 1295 14 )" />
</g>
</svg>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -1264 -14 )">
<path d="M 0.816326535714285 14.6007661114098 L 0.816326535714285 14.6020087727099 L 15.1836734642857 14.6020087727099 C 15.6342857142857 14.6020087727099 16 14.9139161474101 16 15.3003830641997 C 16 15.6856073196891 15.6342857142857 16.0000000169895 15.1836734642857 16 L 0.816326535714285 16 C 0.365714285714261 16 0 15.6868499639997 0 15.3003830641997 C 0 14.9151588087102 0.365714285714261 14.6007661114098 0.816326535714285 14.6007661114098 Z M 11.1046530535713 6.04878774487922 L 8.56555101785717 3.63305890058814 L 2.53126530357138 9.37414289392706 L 2.53126530357138 11.7898717382181 L 5.07036733928574 11.7898717382181 L 11.1046530535713 6.04878774487922 Z M 10.6435918392858 1.65598862876383 L 9.60391837499988 2.64390244252067 L 12.1443265357143 5.06087394811183 L 13.1826938749999 4.07171749004437 L 10.6435918392858 1.65598862876383 Z M 1.30089796428586 8.56889995149318 L 1.30089796428586 8.5676572901931 L 10.0636734642856 0.228173581240137 C 10.2168232824194 0.082096387960783 10.4247718162709 0 10.6416326517857 0 C 10.8584934873005 0 11.0664420211519 0.082096387960783 11.2195918392858 0.228173581240137 L 14.6821224464286 3.52246226574376 C 14.8352599193069 3.66812048877461 14.9212950501126 3.86569848729826 14.9212950501126 4.07171748154964 C 14.9212950501126 4.27773647580102 14.8352599193069 4.47531447432467 14.6821224464286 4.62097269735552 L 5.91804082142859 12.9604564063085 C 5.76459889954193 13.1064048621351 5.5563997583075 13.1882314288448 5.33942857142869 13.1878629824977 L 1.87689796428588 13.1878629824977 C 1.42656342552247 13.1871774553282 1.0618769771398 12.8396548290337 1.06187755357141 12.4112011820079 L 1.06187755357141 9.11815515880434 C 1.06187755357141 8.91187379073764 1.14677551785718 8.71429101779258 1.30089796428586 8.56889995149318 Z " fill-rule="nonzero" fill="#0089ff" stroke="none" transform="matrix(1 0 0 1 1264 14 )" />
</g>
</svg>

View File

@ -1,4 +1,4 @@
<script lang="tsx" setup>
<script lang="ts" setup>
import Header from './header.vue'
import { findApplicationById } from "@/api/application/application";
import { useRoute, useRouter } from 'vue-router'

View File

@ -1,14 +1,20 @@
<script lang="tsx" setup>
import { ref, onMounted } from 'vue'
<script lang="ts" setup>
import { ref, onMounted,reactive} from 'vue'
import icon_permission_del_white from '@/assets/svg/permission_del_white.svg'
import icon_permission_edit_white from '@/assets/svg/permission_edit_white.svg'
import icon_permission_edit_blue from '@/assets/svg/permission_edit_blue.svg'
import icon_permission_del_blue from '@/assets/svg/permission_del_blue.svg'
import icon_add from '@/assets/svg/adds.svg'
import permission_table_edit_blue from '@/assets/svg/permission_table_edit_blue.svg'
import permission_table_del_blue from '@/assets/svg/permission_table_del_blue.svg'
import icon_add from '@/assets/svg/add_white.svg'
import type { FormInstance, FormRules } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { Delete } from '@element-plus/icons-vue'
import { ElTable } from 'element-plus'
const props = defineProps({
applicationId:String
})
const treeData:any = ref([])
const defaultProps = {
children: 'children',
@ -18,25 +24,91 @@ const hoverNodeId = ref(null);
const currentNodeId = ref(null);
const dialogVisible = ref(false);
const title = ref('新增企业');
onMounted(() => {
treeData.value = [{id:'111',name:'53'},{id:'232',name:'3434'}]
const ruleForm = ref({id:'',app_id:'',orgname: '',orgcode: '',orgtype: ''});
const ruleFormRef = ref<FormInstance>()
const rules = ref({
orgname: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
orgcode: [
{ required: true, message: '请输入编号', trigger: 'blur' },
],
})
const queryorgname = ref('')
const multipleTableRef = ref<InstanceType<typeof ElTable>>()
const multipleSelection = ref([])
const tableData = ref([{orgname:'23'}])
const handleMouseEnter = (node) => {
hoverNodeId.value = node.key;
};
const handleMouseLeave = () => {
hoverNodeId.value = null;
};
const submitForm = (formEl: FormInstance | undefined) => {
if (!formEl) return
formEl.validate((valid) => {
if (valid) {
console.log('submit!')
} else {
console.log('error submit!')
return false
}
})
}
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return
formEl.resetFields()
dialogVisible.value = false
}
const deltree = (data:any) => {
ElMessageBox.confirm(
'确定删除该条信息吗?',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
ElMessage({
type: 'success',
message: '删除成功',
})
})
.catch(() => {
})
}
const handleSelectionChange = (val:any) => {
multipleSelection.value = val
}
onMounted(() => {
treeData.value = []
})
function nodeclick(data:any,node:any){
currentNodeId.value = node.key
}
function addtree(data:any){
ruleForm.value = {
id:'',
app_id:props.applicationId,
orgname: '',
orgcode: '',
orgtype: '01'
}
title.value = '新增企业'
dialogVisible.value = true
}
function edittree(data:any){
title.value = '修改企业'
ruleForm.value = JSON.parse(JSON.stringify(data))
dialogVisible.value = true
}
function deltree(data:any){
function edittable(data:any){
}
function deltable(data:any){
}
function handleClose() {
dialogVisible.value = false;
@ -47,12 +119,8 @@ function handleClose() {
<div class="organization-leftbox">
<div class="leftbox-title">企业列表</div>
<div class="leftbox-btn" @click="addtree">
<el-icon style="font-size: 14px;">
<Icon name="icon_add"
><icon_add class="svg-icon"
/></Icon>
</el-icon>
<span>新增企业</span>
<img src="@/assets/newimg/add.png" style="margin-right: 5px;" alt="">
<span>新增企业</span>
</div>
<el-tree :data="treeData" node-key="id" :props="defaultProps"
highlight-current default-expand-all :expand-on-click-node="false"
@ -71,7 +139,7 @@ function handleClose() {
</el-icon>
</div>
<div style="margin-left: 8px;">
<el-icon v-if="currentNodeId === node.key" @click.stop="deltree(data)">
<el-icon v-if="currentNodeId === node.key" @click.stop="deltree(data)">
<icon_permission_del_white class="svg-icon"/>
</el-icon>
<el-icon v-else @click.stop="deltree(data)">
@ -84,14 +152,63 @@ function handleClose() {
</el-tree>
</div>
<div class="organization-rightbox">
<div class="querybox">
<div>
<el-input v-model="queryorgname" placeholder="请输入部门名称" style="width: 200px;margin-right: 10px;" />
<el-button type="primary" style="min-width: 50px;">搜索</el-button>
</div>
<div>
<el-button type="primary" style="min-width: 50px;">
<el-icon style="margin-right: 3px;">
<icon_add class="svg-icon" />
</el-icon>
</el-button>
<el-button :type="tableData.length>0?'primary':''" :disabled="tableData.length>0?false:true" style="min-width: 50px;">
<el-icon style="margin-right: 3px;"><Delete /></el-icon>
</el-button>
</div>
</div>
<el-table ref="multipleTableRef" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column prop="orgcode" label="部门编号"/>
<el-table-column prop="orgname" label="部门名称"/>
<el-table-column prop="manager" label="负责人"/>
<el-table-column prop="address" label="联系信息"/>
<el-table-column prop="description" label="部门描述"/>
<el-table-column prop="isvaild" label="是否有效" width="110">
<template #default="scope">
<el-switch v-model="scope.row.isvaild" style="margin-right: 10px;"/>
<span v-if="scope.row.isvaild == '1'" style="color: #0089ff;font-size: 14px;">有效</span>
<span v-else-if="scope.row.isvaild == '0'" style="color: #bbbfc4;font-size: 14px;">无效</span>
</template>
</el-table-column>
<el-table-column prop="lastmodifier" label="最近修改者"/>
<el-table-column prop="lastmodifydate" label="最近修改日期"/>
<el-table-column fixed="right" label="操作" width="80">
<template #default="scope">
<el-icon style="font-size: 16px;margin-right: 18px;" @click="edittable(scope.row)">
<permission_table_edit_blue class="svg-icon"/>
</el-icon>
<el-icon style="font-size: 16px;" @click="deltable(scope.row)">
<permission_table_del_blue class="svg-icon"/>
</el-icon>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog v-model="dialogVisible" title="Tips" width="30%" :before-close="handleClose">
<span>This is a message</span>
<el-dialog v-model="dialogVisible" :title="title" width="30%" :before-close="handleClose">
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="60px" class="demo-ruleForm">
<el-form-item label="编号" prop="orgcode">
<el-input v-model="ruleForm.orgcode" />
</el-form-item>
<el-form-item label="名称" prop="orgname">
<el-input v-model="ruleForm.orgname" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="dialogVisible = false">确定</el-button>
<el-button @click="resetForm(ruleFormRef)">取消</el-button>
<el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
</span>
</template>
</el-dialog>
@ -132,6 +249,9 @@ function handleClose() {
color: #0089FF;
margin: 0 auto;
margin-top: 15px;
display: flex;
align-items: center;
justify-content: center;
}
:deep(.ed-tree){
background:#212121;
@ -169,6 +289,122 @@ function handleClose() {
height: 100%;
background: rgb(33,33,33);
border-radius: 5px;
padding: 20px;
}
.querybox{
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
}
</style>
<style>
.ed-form-item__label{
color: #D2D2D2;
}
.ed-input__wrapper {
background-color: #252626;
box-sizing: border-box;
border-width: 1px;
border-style: solid;
border-color: rgba(67, 67, 67, 0);
border-radius: 4px;
box-shadow: none;
border: 1px solid #434343;
}
.ed-form-item.is-error .ed-input__wrapper{
box-shadow: none;
border: 1px solid #f54a45;
}
.ed-input__wrapper.is-focus{
box-shadow: none;
border: 1px solid #0089ff;
}
.ed-input__wrapper:hover{
box-shadow: none;
border: 1px solid #0089ff;
}
.ed-input__inner{
color: #fff;
}
.ed-button {
color: #ffffff;
background-color: rgb(54,55,56);
border: 1px solid #363636;
}
.ed-button:focus, .ed-button:hover{
color: #ffffff;
background-color: rgb(54,55,56);
border: 1px solid #363636;
}
.ed-button--primary{
background-color: #0089ff;
border-color:#0089ff ;
}
.ed-button--primary:focus, .ed-button--primary:hover{
background-color: #0089ff;
border-color:#0089ff ;
}
.ed-button.is-disabled{
color: #949494;
background-color: rgb(54,55,56);
border: 1px solid rgb(54,55,56);
}
.ed-button.is-disabled, .ed-button.is-disabled:focus, .ed-button.is-disabled:hover{
color: #949494;
background-color: rgb(54,55,56);
border: 1px solid rgb(54,55,56);
}
.el-table{
background-color: rgb(33,33,33);
}
.el-table tr{
background: rgb(40,40,40);
border-color: #434343;
}
.el-table th.el-table__cell {
background-color: rgb(40,40,40);
border-color: #434343;
}
.el-table.is-scrolling-none th.el-table-fixed-column--left, .el-table.is-scrolling-none th.el-table-fixed-column--right {
background-color: rgb(40,40,40);
}
.el-table--border .el-table__inner-wrapper:after, .el-table--border:after, .el-table--border:before, .el-table__inner-wrapper:before{
background-color: #434343;
}
.el-table__border-bottom-patch, .el-table__border-left-patch{
background-color: #434343;
}
.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
border-color: #434343;
}
.ed-checkbox__inner{
background: transparent;
border-color: #787878;
}
.ed-checkbox__input.is-disabled .ed-checkbox__inner{
background: #434343;
border-color: #787878;
}
.el-table thead{
color: #E4E4E4;
}
.el-table .el-table__cell{
background: #212121;
color: #F2F4F5;
}
.el-table__body-wrapper tr td.el-table-fixed-column--left, .el-table__body-wrapper tr td.el-table-fixed-column--right, .el-table__body-wrapper tr th.el-table-fixed-column--left, .el-table__body-wrapper tr th.el-table-fixed-column--right, .el-table__footer-wrapper tr td.el-table-fixed-column--left, .el-table__footer-wrapper tr td.el-table-fixed-column--right, .el-table__footer-wrapper tr th.el-table-fixed-column--left, .el-table__footer-wrapper tr th.el-table-fixed-column--right, .el-table__header-wrapper tr td.el-table-fixed-column--left, .el-table__header-wrapper tr td.el-table-fixed-column--right, .el-table__header-wrapper tr th.el-table-fixed-column--left, .el-table__header-wrapper tr th.el-table-fixed-column--right{
background: #212121;
}
.hover-row > td {
background-color: rgb(48,48,48) !important;
}
.ed-checkbox__input.is-checked .ed-checkbox__inner {
background-color: #409eff;
border-color: #409eff;
}
.ed-switch.is-checked .ed-switch__core{
border-color: #0089ff;
background-color: #0089ff;
}
</style>