Merge branch 'master' of http://192.168.5.5:10010/r/web/flow_web
| | |
| | | " |
| | | @click="() => onIconClick(nodeData)" |
| | | /> |
| | | <IconDelete |
| | | style=" |
| | | <a-popconfirm v-if="nodeData.deptName!='root'" |
| | | content="请确认是否删除?" |
| | | type="success" |
| | | @ok="() => onIconClickDelete(nodeData)" |
| | | > |
| | | <IconDelete |
| | | style=" |
| | | position: absolute; |
| | | right: 40px; |
| | | font-size: 12px; |
| | | top: 10px; |
| | | color: #3370ff; |
| | | " |
| | | @click="() => onIconClickDelete(nodeData)" |
| | | /> |
| | | " /> |
| | | </a-popconfirm> |
| | | </template> |
| | | </a-tree> |
| | | </a-card> |
| | |
| | | :bordered="false" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <a-form :model="deptform" layout="horizontal"> |
| | | <a-form-item field="parentName" label="上级机构"> |
| | | <a-input v-model="deptform.parentId" /> |
| | | <a-form :model="deptform" layout="horizontal" ref="formRef"> |
| | | <a-form-item field="parentName" label="上级机构" disabled> |
| | | <a-input v-model="deptform.parentName" /> |
| | | </a-form-item> |
| | | <a-form-item field="status" label="机构状态"> |
| | | <a-switch |
| | |
| | | v-model="deptform.status" |
| | | ></a-switch> |
| | | </a-form-item> |
| | | <a-form-item field="deptName" label="机构名称"> |
| | | <a-form-item field="deptName" label="机构名称" :rules="[{required:true,message:'机构名称必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.deptName" /> |
| | | </a-form-item> |
| | | <a-form-item field="leader" label="联系人"> |
| | | <a-form-item field="leader" label="联系人" :rules="[{required:true,message:'联系人必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.leader" /> |
| | | </a-form-item> |
| | | <a-form-item field="phone" label="联系电话"> |
| | | <a-form-item field="phone" label="联系电话" :rules="[{required:true,message:'联系电话必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.phone" /> |
| | | </a-form-item> |
| | | <a-form-item field="address" label="机构地址" style="align: start"> |
| | |
| | | @cancel="handleCancel" |
| | | @ok="addDept" |
| | | > |
| | | <a-form :model="deptform" layout="horizontal"> |
| | | <a-form-item field="parentName" label="上级机构"> |
| | | <a-form :model="deptform" layout="horizontal" ref="addFormRef"> |
| | | <a-form-item field="parentName" label="上级机构" disabled> |
| | | <a-input v-model="deptform.parentName" /> |
| | | </a-form-item> |
| | | <a-form-item field="status" label="机构状态"> |
| | |
| | | v-model="deptform.status" |
| | | ></a-switch> |
| | | </a-form-item> |
| | | <a-form-item field="deptName" label="机构名称"> |
| | | <a-form-item field="deptName" label="机构名称" :rules="[{required:true,message:'机构名称必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.deptName" /> |
| | | </a-form-item> |
| | | <a-form-item field="leader" label="联系人"> |
| | | <a-form-item field="leader" label="联系人" :rules="[{required:true,message:'联系人必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.leader" /> |
| | | </a-form-item> |
| | | <a-form-item field="phone" label="联系电话"> |
| | | <a-form-item field="phone" label="联系电话" :rules="[{required:true,message:'联系电话必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="deptform.phone" /> |
| | | </a-form-item> |
| | | <a-form-item field="address" label="机构地址" style="align: start"> |
| | |
| | | OrganizationById, |
| | | OrganizationDelete, |
| | | OrganizationList, |
| | | OrganizationUpdate, |
| | | } from '@/api/authority'; |
| | | OrganizationUpdate, User, UserAdd, UserEdit |
| | | } from "@/api/authority"; |
| | | import Authheader from '@/views/authority/components/authheader.vue'; |
| | | import { Modal } from '@arco-design/web-vue'; |
| | | |
| | | let formRef = ref(); |
| | | let addFormRef= ref(); |
| | | let visible = ref(false); |
| | | let treeData = ref([]); |
| | | let showLine = ref(true); |
| | |
| | | }); |
| | | |
| | | const onIconClick = (nodeData) => { |
| | | deptform.value.deptName = ""; |
| | | deptform.value.email = ""; |
| | | deptform.value.leader = ""; |
| | | deptform.value.orderNum = "0"; |
| | | deptform.value.phone = ""; |
| | | deptform.value.status = ""; |
| | | deptform.value.address = ""; |
| | | deptform.value.deptId = ""; |
| | | deptform.value.parentName = nodeData.deptName; |
| | | deptform.value.parentId = nodeData.deptId; |
| | | |
| | | visible.value = true; |
| | | }; |
| | | |
| | | const addCb = async (err) => { |
| | | if (err) { |
| | | visible.value=true; |
| | | } else { |
| | | await OrganizationAdd({ |
| | | ...deptform.value, |
| | | } as unknown as Organization).then((res) => { |
| | | OrganizationData(''); |
| | | }); |
| | | } |
| | | ; |
| | | } |
| | | |
| | | const addDept = async () => { |
| | | await OrganizationAdd({ |
| | | ...deptform.value, |
| | | } as unknown as Organization).then((res) => { |
| | | OrganizationData(''); |
| | | }); |
| | | addFormRef.value.validate(addCb); |
| | | }; |
| | | |
| | | const onIconClickDelete = (nodeData) => { |
| | |
| | | deptform.value = { ...res.data }; |
| | | }); |
| | | }; |
| | | const editdept = () => { |
| | | OrganizationUpdate({ |
| | | ...deptform.value, |
| | | } as unknown as Organization).then((res) => { |
| | | OrganizationData(''); |
| | | Modal.success({ |
| | | title: '保存成功', |
| | | content: '保存成功', |
| | | const cb = async (err) => { |
| | | if (err) { |
| | | |
| | | } else { |
| | | OrganizationUpdate({ |
| | | ...deptform.value, |
| | | } as unknown as Organization).then((res) => { |
| | | OrganizationData(''); |
| | | Modal.success({ |
| | | title: '保存成功', |
| | | content: '保存成功', |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | ; |
| | | } |
| | | const editdept = () => { |
| | | formRef.value.validate(cb); |
| | | }; |
| | | const reset = (id) => { |
| | | OrganizationById(id).then((res) => { |
| | |
| | | @drop="onDrop" |
| | | @select="showDetail" |
| | | > |
| | | <template #extra="nodeData"> |
| | | <template #extra="nodeData" > |
| | | <IconPlus |
| | | style=" |
| | | position: absolute; |
| | |
| | | " |
| | | @click="() => onIconClick(nodeData)" |
| | | /> |
| | | <IconDelete |
| | | style=" |
| | | <a-popconfirm v-if="nodeData.menuName!='root'" |
| | | content="请确认是否删除?" |
| | | type="success" |
| | | @ok="() => onIconClickDelete(nodeData)" |
| | | > |
| | | <IconDelete |
| | | style=" |
| | | position: absolute; |
| | | right: 40px; |
| | | font-size: 12px; |
| | | top: 10px; |
| | | color: #3370ff; |
| | | " |
| | | @click="() => onIconClickDelete(nodeData)" |
| | | /> |
| | | " /> |
| | | </a-popconfirm> |
| | | </template> |
| | | </a-tree> |
| | | </a-card> |
| | |
| | | :bordered="false" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <a-form :model="resourceform" layout="horizontal"> |
| | | <a-form :model="resourceform" layout="horizontal" ref="formRef"> |
| | | <a-form-item field="parentName" label="上级资源" disabled> |
| | | <a-input v-model="resourceform.parentName" /> |
| | | </a-form-item> |
| | |
| | | v-model="resourceform.status" |
| | | ></a-switch> |
| | | </a-form-item> |
| | | <a-form-item field="menuName" label="资源名称"> |
| | | <a-form-item field="menuName" label="资源名称" :rules="[{required:true,message:'资源名称必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="resourceform.menuName" /> |
| | | </a-form-item> |
| | | <a-form-item field="menuName" label="资源图标"> |
| | |
| | | @success="handleSuccess" |
| | | ></Upload> |
| | | </a-form-item> |
| | | <a-form-item field="menuType" label="资源类型"> |
| | | <a-form-item field="menuType" label="资源类型" :rules="[{required:true,message:'资源类型必填'}]"> |
| | | <a-select |
| | | v-model="resourceform.menuType" |
| | | :options="options" |
| | |
| | | placeholder="请输入提示词" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item field="perms" label="资源控制权限字符"> |
| | | <a-form-item field="perms" label="资源控制权限字符" :rules="[{required:true,message:'资源控制权限字符必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="resourceform.perms" /> |
| | | </a-form-item> |
| | | <a-form-item |
| | | field="component" |
| | | label="资源地址" |
| | | style="align: start" |
| | | :rules="[{required:true,message:'资源地址必填'},{maxLength:50,message:'长度不超过50'}]" |
| | | > |
| | | <a-input v-model="resourceform.component" /> |
| | | </a-form-item> |
| | |
| | | @cancel="handleCancel" |
| | | @ok="addresource" |
| | | > |
| | | <a-form :rules="rules" :model="resourceform" layout="horizontal"> |
| | | <a-form :model="resourceform" layout="horizontal" ref="addFormRef"> |
| | | <a-form-item field="parentName" label="上级资源" disabled> |
| | | <a-input v-model="resourceform.parentName" /> |
| | | </a-form-item> |
| | |
| | | v-model="resourceform.status" |
| | | ></a-switch> |
| | | </a-form-item> |
| | | <a-form-item field="menuName" label="资源名称"> |
| | | <a-form-item field="menuName" label="资源名称" :rules="[{required:true,message:'资源名称必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="resourceform.menuName" /> |
| | | </a-form-item> |
| | | <a-form-item field="icon" label="资源图标"> |
| | |
| | | @success="handleSuccess" |
| | | ></Upload> |
| | | </a-form-item> |
| | | <a-form-item field="menuType" label="资源类型"> |
| | | <a-form-item field="menuType" label="资源类型" :rules="[{required:true,message:'资源类型必填'}]"> |
| | | <a-select |
| | | v-model="resourceform.menuType" |
| | | :options="options" |
| | |
| | | placeholder="请输入提示词" |
| | | /> |
| | | </a-form-item> |
| | | <a-form-item field="perms" label="资源控制权限字符"> |
| | | <a-form-item field="perms" label="资源控制权限字符" :rules="[{required:true,message:'资源控制权限字符必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="resourceform.perms" /> |
| | | </a-form-item> |
| | | <a-form-item field="component" label="资源地址" style="align: start"> |
| | | <a-form-item field="component" label="资源地址" style="align: start" :rules="[{required:true,message:'资源地址必填'},{maxLength:50,message:'长度不超过50'}]"> |
| | | <a-input v-model="resourceform.component" /> |
| | | </a-form-item> |
| | | </a-form> |
| | |
| | | import { ref } from 'vue'; |
| | | import { IconPlus } from '@arco-design/web-vue/es/icon'; |
| | | import { |
| | | Organization, |
| | | OrganizationAdd, OrganizationUpdate, |
| | | Resource, |
| | | ResourceAdd, |
| | | ResourceById, |
| | | ResourceDelete, |
| | | ResourceList, |
| | | ResourceUpdate, |
| | | } from '@/api/authority'; |
| | | ResourceUpdate |
| | | } from "@/api/authority"; |
| | | import Authheader from '@/views/authority/components/authheader.vue'; |
| | | import { Modal } from '@arco-design/web-vue'; |
| | | import { userModelState } from '@/store'; |
| | | |
| | | const modelStore = userModelState(); |
| | | |
| | | let formRef = ref(); |
| | | let addFormRef= ref(); |
| | | let visible = ref(false); |
| | | let treeData = ref([]); |
| | | let showLine = ref(true); |
| | |
| | | menuId: '', |
| | | menuName: '', |
| | | menuType: '', |
| | | orderNum: '', |
| | | orderNum: '0', |
| | | parentId: '', |
| | | parentName: '', |
| | | children: [], |
| | |
| | | target: '', |
| | | updateTime: '', |
| | | }); |
| | | const rules = { |
| | | // parentName: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请输入上级资源', |
| | | // }, |
| | | // ], |
| | | // menuName: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请输入资源名称', |
| | | // }, |
| | | // ], |
| | | // menuType: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择资源类型', |
| | | // }, |
| | | // ], |
| | | // description: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请输入提示词', |
| | | // }, |
| | | // ], |
| | | // perms: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请输入资源控制权限字符', |
| | | // }, |
| | | // ], |
| | | }; |
| | | |
| | | |
| | | const onIconClick = (nodeData) => { |
| | | if (nodeData) { |
| | |
| | | |
| | | visible.value = true; |
| | | }; |
| | | const formRef = ref(); |
| | | |
| | | //图片上传 |
| | | const uploadAction = '/api/v1/llm/upload'; // 替换为你的上传API |
| | | const fileList = ref([]); |
| | |
| | | imageUrls.value = urlsArr; // 拿到上传的图片地址 |
| | | }; |
| | | |
| | | const addresource = async (done) => { |
| | | // formRef.value.validate().then(async (res) => { |
| | | // if (!res) { |
| | | // } |
| | | // done(false); |
| | | // }); |
| | | const addCb = async (err) => { |
| | | if (err) { |
| | | visible.value = true; |
| | | } else { |
| | | resourceform.value.icon = uploadUrl.value[0] || ''; |
| | | await ResourceAdd({ |
| | | ...resourceform.value, |
| | | } as unknown as Resource).then((res) => { |
| | | ResourceData(''); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | resourceform.value.icon = uploadUrl.value[0] || ''; |
| | | await ResourceAdd({ |
| | | ...resourceform.value, |
| | | } as unknown as Resource).then((res) => { |
| | | ResourceData(''); |
| | | }); |
| | | const addresource = async (done) => { |
| | | addFormRef.value.validate(addCb); |
| | | }; |
| | | |
| | | const onIconClickDelete = (nodeData) => { |
| | |
| | | imageUrls.value.push(httpUrl + res.data.icon); |
| | | }); |
| | | }; |
| | | const editresource = () => { |
| | | resourceform.value.icon = uploadUrl.value[0] || ''; |
| | | ResourceUpdate({ |
| | | ...resourceform.value, |
| | | } as unknown as Resource).then((res) => { |
| | | ResourceData(''); |
| | | Modal.success({ |
| | | title: '保存成功', |
| | | content: '保存成功', |
| | | const cb = async (err) => { |
| | | if (err) { |
| | | |
| | | } else { |
| | | resourceform.value.icon = uploadUrl.value[0] || ''; |
| | | ResourceUpdate({ |
| | | ...resourceform.value, |
| | | } as unknown as Resource).then((res) => { |
| | | ResourceData(''); |
| | | Modal.success({ |
| | | title: '保存成功', |
| | | content: '保存成功', |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | const editresource = () => { |
| | | formRef.value.validate(cb); |
| | | |
| | | }; |
| | | const reset = (id) => { |
| | | ResourceById(id).then((res) => { |
| | |
| | | >编辑</a-button |
| | | > |
| | | <a-popconfirm |
| | | content="Are you sure you want to delete?" |
| | | content="请确认是否删除?" |
| | | type="success" |
| | | @ok="operation(3, record)" |
| | | > |
| | |
| | | editform.value.loginName = record.loginName; |
| | | editform.value.email = record.email; |
| | | editform.value.phoneNumber = record.phoneNumber; |
| | | editform.value.role = record.role; |
| | | if (record.roles?.length>0) { |
| | | editform.value.role = record.roles[0].roleId; |
| | | } |
| | | } |
| | | //删除 |
| | | if (t == 3) { |