dev
This commit is contained in:
parent
b47c0ee658
commit
44d92e37da
|
|
@ -10,7 +10,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.4",
|
"axios": "^1.8.4",
|
||||||
"echarts": "^5.6.0",
|
"echarts": "^5.6.0",
|
||||||
"element-plus": "^2.9.7",
|
"element-plus": "^2.9.9",
|
||||||
"pinia": "^3.0.1",
|
"pinia": "^3.0.1",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.0"
|
"vue-router": "^4.5.0"
|
||||||
|
|
@ -2511,9 +2511,9 @@
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/element-plus": {
|
"node_modules/element-plus": {
|
||||||
"version": "2.9.7",
|
"version": "2.9.9",
|
||||||
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.9.7.tgz",
|
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.9.tgz",
|
||||||
"integrity": "sha512-6vjZh5SXBncLhUwJGTVKS5oDljfgGMh6J4zVTeAZK3YdMUN76FgpvHkwwFXocpJpMbii6rDYU3sgie64FyPerQ==",
|
"integrity": "sha512-gN553+xr7ETkhJhH26YG0fERmd2BSCcQKslbtR8fats0Mc0yCtZOXr00bmoPOt5xGzhuRN1TWc9+f1pCaiA0/Q==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ctrl/tinycolor": "^3.4.1",
|
"@ctrl/tinycolor": "^3.4.1",
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.4",
|
"axios": "^1.8.4",
|
||||||
"echarts": "^5.6.0",
|
"echarts": "^5.6.0",
|
||||||
"element-plus": "^2.9.7",
|
"element-plus": "^2.9.9",
|
||||||
"pinia": "^3.0.1",
|
"pinia": "^3.0.1",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-router": "^4.5.0"
|
"vue-router": "^4.5.0"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"name": "智慧医疗诊所",
|
"name": "智慧医疗诊所",
|
||||||
"avatar": "avatar.png",
|
"logo": "/static/images/default_logo.png",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<router-link to="/statistics" class="menu-item" active-class="active active8">统计</router-link>
|
<router-link to="/statistics" class="menu-item" active-class="active active8">统计</router-link>
|
||||||
<router-link to="/settings" class="menu-item" active-class="active active9">设置</router-link>
|
<router-link to="/settings" class="menu-item" active-class="active active9">设置</router-link>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<el-button :icon="Right" style="float: right;color: #fff" @click="logout" type="text">退出登录</el-button>
|
<el-button :icon="Right" style="float: right;color: #fff" @click="logout" text>退出登录</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ _width.value = width == null ? 1200 : width;
|
||||||
_height.value = height == null ? 800 : height;
|
_height.value = height == null ? 800 : height;
|
||||||
_close.value = close == null ? true : close;
|
_close.value = close == null ? true : close;
|
||||||
|
|
||||||
console.log(_width, _height, _isShow);
|
|
||||||
|
|
||||||
watch(() => isShow, (newVal) => {
|
watch(() => isShow, (newVal) => {
|
||||||
_isShow.value = newVal == null ? false : newVal;
|
_isShow.value = newVal == null ? false : newVal;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,33 @@ import Panel from "@/components/common/Panel.vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {onMounted, ref, defineModel} from "vue";
|
import {onMounted, ref, defineModel} from "vue";
|
||||||
import {formatDate} from "@/utils/dateUtils.ts";
|
import {formatDate} from "@/utils/dateUtils.ts";
|
||||||
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
|
|
||||||
const decryptedText = ref<any>({})
|
const decryptedText = ref<any>({})
|
||||||
const ciphertext = ref<any>('')
|
const ciphertext = ref<any>('')
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
ciphertext.value = await post("common/auth/get");
|
ciphertext.value = await post("common/auth/get");
|
||||||
decryptedText.value = await post("common/auth/check");
|
decryptedText.value = await post("common/auth/check");
|
||||||
console.log(decryptedText.value)
|
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await init()
|
await init()
|
||||||
|
if(localStorage.getItem('logoUrl')){
|
||||||
|
getImageUrl(localStorage.getItem('logoUrl'))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const userMessage = defineModel<any>()
|
const userMessage = defineModel<any>()
|
||||||
|
const imageUrl = ref<any>()
|
||||||
|
const getImageUrl = (url: any) => {
|
||||||
|
loadConfig().then(res => {
|
||||||
|
imageUrl.value = res.base_url + 'file/getImage/' + url
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Panel title="药房基本信息" class="info">
|
<Panel title="药房基本信息" class="info">
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<img class="image" src="/static/images/default_logo.png" alt="app">
|
<img class="image" :src="imageUrl? imageUrl:userMessage.logo" alt="app">
|
||||||
<div class="app_info-content-text">
|
<div class="app_info-content-text">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="price">¥{{item.selectedPrice || '0' }}元</span>
|
<span class="price">¥{{item.selectedPrice || '0' }}元</span>
|
||||||
<span class="delete">
|
<span class="delete">
|
||||||
<el-button type="text" @click="deleteItem(item.id)">
|
<el-button text @click="deleteItem(item.id)">
|
||||||
<el-icon><CircleClose/></el-icon>
|
<el-icon><CircleClose/></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<span class="code">{{ item.itemSocialCode }}</span>
|
<span class="code">{{ item.itemSocialCode }}</span>
|
||||||
<span class="price">¥{{ item.unitPrice }}元</span>
|
<span class="price">¥{{ item.unitPrice }}元</span>
|
||||||
<span class="delete">
|
<span class="delete">
|
||||||
<el-button type="text" @click="deleteItem(item.id)">
|
<el-button text @click="deleteItem(item.id)">
|
||||||
<el-icon><CircleClose/></el-icon>
|
<el-icon><CircleClose/></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="form.purchaseUnitPrice">
|
<el-input v-model="form.purchaseUnitPrice">
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-button type="text" @click="imageURL">¥</el-button>
|
<el-button text @click="imageURL">¥</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
|
<Mask :is-show="isShow" @close="exit" :width="800" :height="600" title="成员管理" :show-footer="true">
|
||||||
|
<div style="padding: 24px">
|
||||||
<el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef">
|
<el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef">
|
||||||
<el-descriptions
|
<el-descriptions
|
||||||
title="基本信息"
|
title="基本信息"
|
||||||
|
|
@ -37,7 +39,17 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">
|
<el-descriptions-item label="性别">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="memberInfo.gender"/>
|
<el-select
|
||||||
|
v-model="memberInfo.gender"
|
||||||
|
placeholder="选择性别"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in ['男', '女']"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="年龄">
|
<el-descriptions-item label="年龄">
|
||||||
|
|
@ -98,24 +110,30 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="电子签名">
|
<el-descriptions-item label="电子签名">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="(url)=>{memberInfo.electronicSignature=url}"></UpLoad>
|
<UpLoad v-model="uploadURL" ref="uploadRef"
|
||||||
|
@uploadSuccess="(url)=>{memberInfo.electronicSignature=url}"></UpLoad>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div class="demo-button">
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="bottom">
|
||||||
<el-button type="primary" @click="save()">保存</el-button>
|
<el-button type="primary" @click="save()">保存</el-button>
|
||||||
<el-button @click="onSubmit">取消</el-button>
|
<el-button @click="exit">取消</el-button>
|
||||||
<el-button v-if="props.id" type="danger" @click="deleteDetail">删除</el-button>
|
<el-button v-if="props.id" type="danger" @click="deleteDetail">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</template>
|
||||||
|
</Mask>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {defineProps, defineEmits, ref, onMounted} from 'vue'
|
import {defineProps, defineEmits, ref, onMounted} from 'vue'
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {loadConfig} from "@/utils/config.ts";
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
import depts from "@/assets/config/directory/depts.json"
|
|
||||||
import UpLoad from "@/components/UpLoad.vue";
|
import UpLoad from "@/components/UpLoad.vue";
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
|
import Mask from "@/components/common/Mask.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
|
@ -170,77 +188,65 @@ const memberInfo = ref<any>({
|
||||||
memo: '',// 备注
|
memo: '',// 备注
|
||||||
password: "",
|
password: "",
|
||||||
})
|
})
|
||||||
const userInfo= ref<any>({
|
const userInfo = ref<any>({
|
||||||
username: "", // 账号
|
username: "", // 账号
|
||||||
name: "",
|
name: "",
|
||||||
password: "",
|
password: "",
|
||||||
})
|
})
|
||||||
const rules= {
|
const rules = {
|
||||||
username: [
|
username: [
|
||||||
{required: true, message: '请输入账号', trigger: 'blur'},
|
{required: true, message: '请输入账号', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
}
|
|
||||||
const emit = defineEmits(['onSubmit'])
|
|
||||||
const onSubmit = () => {
|
|
||||||
emit('onSubmit')
|
|
||||||
}
|
}
|
||||||
const ruleFormRef= ref<any>('')
|
const isShow = ref(false)
|
||||||
|
const emit = defineEmits(['close'])
|
||||||
|
const exit = () => {
|
||||||
|
memberInfo.value = {}
|
||||||
|
userInfo.value = {}
|
||||||
|
isShow.value = false
|
||||||
|
emit('close')
|
||||||
|
}
|
||||||
|
const ruleFormRef = ref<any>('')
|
||||||
const save = () => {
|
const save = () => {
|
||||||
let form={
|
let form = {
|
||||||
memberInfo:memberInfo.value,
|
memberInfo: memberInfo.value,
|
||||||
userInfo:userInfo.value,
|
userInfo: userInfo.value,
|
||||||
}
|
}
|
||||||
ruleFormRef.value.validate((valid: any) => {
|
ruleFormRef.value.validate((valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
post("organization/member/edit", {data: form}).then((res) => {
|
post("organization/member/edit", {data: form}).then(() => {
|
||||||
onSubmit()
|
exit()
|
||||||
memberInfo.value = {}
|
ElMessage.success('已修改')
|
||||||
userInfo.value = {}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
post("organization/member/add", {data: form}).then((res) => {
|
post("organization/member/add", {data: form}).then(() => {
|
||||||
onSubmit()
|
exit()
|
||||||
memberInfo.value = {}
|
ElMessage.success('已添加')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const options = Object.entries(depts).map(([key, value]) => {
|
|
||||||
if (typeof value === 'string') {
|
|
||||||
return {value: key, label: value};
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
value: key,
|
|
||||||
label: value.name,
|
|
||||||
children: Object.entries(value.children).map(([childKey, childValue]) => ({
|
|
||||||
value: childKey,
|
|
||||||
label: childValue,
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const uploadRef = ref<any>('')
|
const uploadRef = ref<any>('')
|
||||||
const init = (id: any) => {
|
const getById = () => {
|
||||||
memberInfo.value = {}
|
memberInfo.value = {}
|
||||||
userInfo.value = {}
|
userInfo.value = {}
|
||||||
post("organization/member/getById", {id}).then((res: any) => {
|
post("organization/member/getById", {id: props.id}).then((res: any) => {
|
||||||
memberInfo.value = res.memberInfo
|
memberInfo.value = res.memberInfo
|
||||||
if(res.userInfo){
|
if (res.userInfo) {
|
||||||
userInfo.value = res.userInfo
|
userInfo.value = res.userInfo
|
||||||
}
|
}
|
||||||
if(memberInfo.value.electronicSignature){
|
if (memberInfo.value.electronicSignature) {
|
||||||
uploadRef.value?.getImageUrl(memberInfo.value.electronicSignature)
|
uploadRef.value?.getImageUrl(memberInfo.value.electronicSignature)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const uploadURL = ref('')
|
const uploadURL = ref('')
|
||||||
const imageURL= ref('')
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadConfig().then((res: any) => {
|
loadConfig().then((res: any) => {
|
||||||
uploadURL.value = res.base_url + "file/upload";
|
uploadURL.value = res.base_url + "file/upload";
|
||||||
|
|
@ -254,17 +260,25 @@ const list = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const deleteDetail = () => {
|
const deleteDetail = () => {
|
||||||
post("organization/member/delete", {id: props.id}).then((res: any) => {
|
post("organization/member/delete", {id: props.id}).then(() => {
|
||||||
onSubmit()
|
exit()
|
||||||
ElMessage.error('已删除');
|
ElMessage.error('已删除');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const init = () => {
|
||||||
|
isShow.value = true
|
||||||
|
if(props.id){
|
||||||
|
getById()
|
||||||
|
}
|
||||||
|
}
|
||||||
defineExpose({init})
|
defineExpose({init})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.demo-button {
|
.bottom {
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 20px;
|
align-items: center;
|
||||||
|
padding: 0 24px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
|
<Mask :is-show="isShow" @close="exit" :height="570" :title="props.id?'编辑':'新增'" :show-footer="true">
|
||||||
|
<div style="padding: 24px">
|
||||||
<el-form :model="form" label-width="auto">
|
<el-form :model="form" label-width="auto">
|
||||||
<el-descriptions
|
<el-descriptions
|
||||||
:column="4"
|
:column="4"
|
||||||
|
|
@ -101,21 +103,28 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注">
|
<el-descriptions-item label="备注">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input v-model="form.memo" type="text" :show-word-limit="true" :clearable="true" />
|
<el-input v-model="form.memo" type="text" :show-word-limit="true" :clearable="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div class="demo-button">
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="bottom">
|
||||||
<el-button type="primary" @click="save()">保存</el-button>
|
<el-button type="primary" @click="save()">保存</el-button>
|
||||||
<el-button @click="onSubmit">取消</el-button>
|
<el-button @click="exit">取消</el-button>
|
||||||
<el-button v-if="props.id" @click="deleteDetail" type="danger">删除</el-button>
|
<el-button v-if="props.id" @click="deleteDetail" type="danger">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</template>
|
||||||
|
</Mask>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {defineProps, onMounted, ref} from 'vue'
|
import {defineProps, onMounted, ref} from 'vue'
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import depts from "@/assets/config/directory/depts.json"
|
import depts from "@/assets/config/directory/depts.json"
|
||||||
|
import Mask from "@/components/common/Mask.vue";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
// do not use same name with ref
|
// do not use same name with ref
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -142,21 +151,29 @@ const form = ref<any>({
|
||||||
tecnPsncnt: '',
|
tecnPsncnt: '',
|
||||||
memo: '',
|
memo: '',
|
||||||
})
|
})
|
||||||
|
const isShow = ref<any>(false)
|
||||||
const emit = defineEmits(['onSubmit'])
|
const emit = defineEmits(['onSubmit'])
|
||||||
const onSubmit = () => {
|
const exit = () => {
|
||||||
|
form.value = {}
|
||||||
|
isShow.value = false
|
||||||
emit('onSubmit')
|
emit('onSubmit')
|
||||||
}
|
}
|
||||||
|
const openDialog= () => {
|
||||||
|
isShow.value = true
|
||||||
|
if (props.id) {
|
||||||
|
init(props.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
const save = () => {
|
const save = () => {
|
||||||
if (props.id) {
|
if (props.id) {
|
||||||
post("organization/section/edit", {data: form.value}).then((res) => {
|
post("organization/section/edit", {data: form.value}).then((res) => {
|
||||||
onSubmit()
|
exit()
|
||||||
form.value = {}
|
ElMessage.success('已修改')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
post("organization/section/add", {data: form.value}).then((res) => {
|
post("organization/section/add", {data: form.value}).then((res) => {
|
||||||
onSubmit()
|
exit()
|
||||||
form.value = {}
|
ElMessage.success('已添加')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -180,18 +197,20 @@ const init = (id: any) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const deleteDetail=()=>{
|
const deleteDetail = () => {
|
||||||
post("organization/section/delete", {id:props.id}).then((res: any) => {
|
post("organization/section/delete", {id: props.id}).then((res: any) => {
|
||||||
onSubmit()
|
exit()
|
||||||
ElMessage.error('已删除');
|
ElMessage.error('已删除');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
defineExpose({init})
|
defineExpose({openDialog})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.demo-button{
|
.bottom {
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-top: 20px;
|
align-items: center;
|
||||||
|
padding: 0 24px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
import { ref, computed } from 'vue'
|
|
||||||
|
import { ref } from 'vue'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
export const singStatus = defineStore('counter', () => {
|
export const useLogoStore = defineStore('logo', () => {
|
||||||
const singShow = ref<any>(null)
|
const logoUrl = ref<string>("")
|
||||||
function setSingShow(val:any){
|
function setLogoUrl(url: string) {
|
||||||
singShow.value = val
|
logoUrl.value = url
|
||||||
}
|
}
|
||||||
return { singShow,setSingShow}
|
function getLogoUrl() {
|
||||||
|
return logoUrl.value
|
||||||
|
}
|
||||||
|
// 返回需要暴露的方法和变量
|
||||||
|
return { logoUrl, setLogoUrl, getLogoUrl }
|
||||||
})
|
})
|
||||||
|
|
@ -44,11 +44,16 @@
|
||||||
<el-input v-model="ruleForm.social_certUrl"/>
|
<el-input v-model="ruleForm.social_certUrl"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="8">
|
||||||
|
<el-form-item label="上传logo">
|
||||||
|
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="(url)=>{ruleForm.logourl=url}"></UpLoad>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-form-item label="数字签名" prop="social_cainfo">
|
<el-form-item label="数字签名" prop="social_cainfo">
|
||||||
<el-input v-model="ruleForm.social_cainfo" type="textarea" :rows="5"/>
|
<el-input v-model="ruleForm.social_cainfo" type="textarea" :rows="5"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -64,6 +69,8 @@ import {onMounted, reactive, ref} from 'vue'
|
||||||
import {ElMessage, type FormInstance, type FormRules} from 'element-plus'
|
import {ElMessage, type FormInstance, type FormRules} from 'element-plus'
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
|
import UpLoad from "@/components/UpLoad.vue";
|
||||||
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
|
|
||||||
const ruleFormRef = ref<FormInstance>()
|
const ruleFormRef = ref<FormInstance>()
|
||||||
const ruleForm = reactive<any>({
|
const ruleForm = reactive<any>({
|
||||||
|
|
@ -74,12 +81,17 @@ const ruleForm = reactive<any>({
|
||||||
social_insuplcAdmdvs: '',
|
social_insuplcAdmdvs: '',
|
||||||
social_cainfo: '',
|
social_cainfo: '',
|
||||||
social_url: "",
|
social_url: "",
|
||||||
social_certUrl: ""
|
social_certUrl: "",
|
||||||
|
logoUrl: "",
|
||||||
})
|
})
|
||||||
|
const uploadRef = ref<any>()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
loadConfig().then((res: any) => {
|
||||||
|
uploadURL.value = res.base_url + "file/upload";
|
||||||
|
})
|
||||||
|
uploadRef.value?.getImageUrl(localStorage.getItem('logoUrl'))
|
||||||
post("common/config/list", null).then((list: any) => {
|
post("common/config/list", null).then((list: any) => {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
console.log(list[i].k)
|
|
||||||
ruleForm[list[i].k] = list[i].val
|
ruleForm[list[i].k] = list[i].val
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -94,16 +106,16 @@ const rules = reactive<FormRules<any>>({
|
||||||
social_url: {required: true, message: '医保接口不能为空', trigger: 'blur'},
|
social_url: {required: true, message: '医保接口不能为空', trigger: 'blur'},
|
||||||
social_certUrl: {required: true, message: '电子平转增接口不能为空', trigger: 'blur'},
|
social_certUrl: {required: true, message: '电子平转增接口不能为空', trigger: 'blur'},
|
||||||
})
|
})
|
||||||
|
|
||||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
await formEl.validate((valid, fields) => {
|
await formEl.validate((valid, fields) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
post("common/config/edit", ruleForm).then((res: any) => {
|
post("common/config/edit", ruleForm).then((res: any) => {
|
||||||
ElMessage.success("保存成功")
|
ElMessage.success("保存成功")
|
||||||
|
if (ruleForm.logourl) {
|
||||||
|
localStorage.setItem('logoUrl', ruleForm.logourl)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
console.log('error submit!', fields)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -117,12 +129,16 @@ const options = Array.from({length: 10000}).map((_, idx) => ({
|
||||||
value: `${idx + 1}`,
|
value: `${idx + 1}`,
|
||||||
label: `${idx + 1}`,
|
label: `${idx + 1}`,
|
||||||
}))
|
}))
|
||||||
|
//上传图片
|
||||||
|
const uploadURL = ref<any>()
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container-wrapper{
|
.container-wrapper {
|
||||||
padding:0 24px;
|
padding: 0 24px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form {
|
.form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<div class="title-btn">
|
<div class="title-btn">
|
||||||
<el-button type="primary" @click="init()">查询</el-button>
|
<el-button type="primary" @click="init()">查询</el-button>
|
||||||
<el-button type="primary" @click="resetSearch">重置</el-button>
|
<el-button type="primary" @click="resetSearch">重置</el-button>
|
||||||
<el-button type="primary" :icon="Plus" @click="isShow=true">新增</el-button>
|
<el-button type="primary" :icon="Plus" @click="openDialog">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -72,14 +72,11 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Mask :is-show="isShow" @close="isShow=false" :width="800" :height="600" title="成员管理">
|
<MemberEdit :id="id" ref="memberEditRef" @close="init()"></MemberEdit>
|
||||||
<MemberEdit :id="id" ref="memberEditRef" @onSubmit="init()"></MemberEdit>
|
|
||||||
</Mask>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {onMounted, ref, nextTick} from "vue"
|
import {onMounted, ref, nextTick} from "vue"
|
||||||
import Mask from '@/components/common/Mask.vue'
|
|
||||||
import MemberEdit from "@/components/settings/MemberEdit.vue";
|
import MemberEdit from "@/components/settings/MemberEdit.vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {formatDate} from "@/utils/dateUtils.ts";
|
import {formatDate} from "@/utils/dateUtils.ts";
|
||||||
|
|
@ -91,9 +88,11 @@ const tableData = ref<any>([]);
|
||||||
const memberEditRef = ref<any>(null)
|
const memberEditRef = ref<any>(null)
|
||||||
const rowClick = (row: any) => {
|
const rowClick = (row: any) => {
|
||||||
id.value = row.memberInfo.id
|
id.value = row.memberInfo.id
|
||||||
isShow.value = true
|
openDialog()
|
||||||
|
}
|
||||||
|
const openDialog= () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
memberEditRef.value?.init(id.value)
|
memberEditRef.value?.init()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const roleList = [
|
const roleList = [
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,15 @@
|
||||||
<el-input v-model="search.resperName" placeholder="负责人姓名" style="width: 200px"></el-input>
|
<el-input v-model="search.resperName" placeholder="负责人姓名" style="width: 200px"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-cascader :props="{ checkStrictly: true }" v-model="search.caty" :options="options" placeholder="科室类别"/>
|
<el-cascader :props="{ checkStrictly: true }" v-model="search.caty" :options="options"
|
||||||
|
placeholder="科室类别"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="title-btn">
|
<div class="title-btn">
|
||||||
<el-button type="primary" @click="init()">查询</el-button>
|
<el-button type="primary" @click="init()">查询</el-button>
|
||||||
<el-button type="primary" @click="resetSearch">重置</el-button>
|
<el-button type="primary" @click="resetSearch">重置</el-button>
|
||||||
<el-button type="primary" :icon="Plus" @click="isShow=true">新增</el-button>
|
<el-button type="primary" :icon="Plus" @click="openDialog">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
|
|
@ -62,9 +63,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Mask :is-show="isShow" @close="init()" :height="570" :title="id?'编辑':'新增'">
|
|
||||||
<SectionEdit :id="id" ref="sectionRef" @onSubmit="init()"></SectionEdit>
|
<SectionEdit :id="id" ref="sectionRef" @onSubmit="init()"></SectionEdit>
|
||||||
</Mask>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {nextTick, onMounted, ref} from "vue"
|
import {nextTick, onMounted, ref} from "vue"
|
||||||
|
|
@ -77,28 +76,15 @@ import depts from "@/assets/config/directory/depts.json";
|
||||||
import {Plus} from "@element-plus/icons-vue";
|
import {Plus} from "@element-plus/icons-vue";
|
||||||
|
|
||||||
const id = ref<any>("")
|
const id = ref<any>("")
|
||||||
const isShow = ref(false)
|
|
||||||
const ChildMenuList = ref([
|
|
||||||
{
|
|
||||||
name: '首页',
|
|
||||||
path: '/settings/index',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '科室',
|
|
||||||
path: '/settings/section',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '成员',
|
|
||||||
path: '/settings/member',
|
|
||||||
}
|
|
||||||
])
|
|
||||||
const tableData = ref<any>([])
|
const tableData = ref<any>([])
|
||||||
const sectionRef = ref<any>()
|
const sectionRef = ref<any>()
|
||||||
const rowClick = (row: any) => {
|
const rowClick = (row: any) => {
|
||||||
id.value = row.id
|
id.value = row.id
|
||||||
isShow.value = true
|
openDialog()
|
||||||
|
}
|
||||||
|
const openDialog = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
sectionRef.value?.init(row.id)
|
sectionRef.value?.openDialog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
@ -110,7 +96,6 @@ interface Dept {
|
||||||
}
|
}
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
isShow.value = false
|
|
||||||
post('organization/section/list', {page: page.value, size: pageSize.value, ...search.value}).then((res: any) => {
|
post('organization/section/list', {page: page.value, size: pageSize.value, ...search.value}).then((res: any) => {
|
||||||
tableData.value = res.list
|
tableData.value = res.list
|
||||||
tableData.value.forEach((item: any) => {
|
tableData.value.forEach((item: any) => {
|
||||||
|
|
@ -155,6 +140,7 @@ const resetSearch = () => {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue