Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
b978006a69
|
|
@ -15,8 +15,9 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ElMessage} from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import {Plus} from '@element-plus/icons-vue'
|
import {Plus} from '@element-plus/icons-vue'
|
||||||
import {defineModel,ref} from 'vue'
|
import {defineModel, onMounted, ref} from 'vue'
|
||||||
import {loadConfig} from "@/utils/config.ts";
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
|
import {post} from "@/utils/request.ts";
|
||||||
const url = defineModel()
|
const url = defineModel()
|
||||||
const imageUrl = ref<any>()
|
const imageUrl = ref<any>()
|
||||||
const getImageUrl = (url: any) => {
|
const getImageUrl = (url: any) => {
|
||||||
|
|
@ -41,6 +42,17 @@ const beforeUpload = (file:any) => {
|
||||||
}
|
}
|
||||||
return isLt2M;
|
return isLt2M;
|
||||||
}
|
}
|
||||||
|
const list = ref<any>([])
|
||||||
|
onMounted(async ()=>{
|
||||||
|
list.value = await post("common/config/list")
|
||||||
|
list.value.forEach((item: any) => {
|
||||||
|
if (item.k == "logoUrl") {
|
||||||
|
loadConfig().then((res: any) => {
|
||||||
|
imageUrl.value = res.base_url + 'file/getImage/' + item.val
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
defineExpose({getImageUrl})
|
defineExpose({getImageUrl})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,24 @@ import {loadConfig} from "@/utils/config.ts";
|
||||||
|
|
||||||
const decryptedText = ref<any>({})
|
const decryptedText = ref<any>({})
|
||||||
const ciphertext = ref<any>('')
|
const ciphertext = ref<any>('')
|
||||||
|
const list = 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");
|
||||||
|
list.value = await post("common/config/list")
|
||||||
|
list.value.forEach((item: any) => {
|
||||||
|
if (item.k == "logoUrl") {
|
||||||
|
loadConfig().then((res: any) => {
|
||||||
|
imageUrl.value = res.base_url + 'file/getImage/' + item.val
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
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 imageUrl = ref<any>()
|
||||||
const getImageUrl = (url: any) => {
|
|
||||||
loadConfig().then(res => {
|
|
||||||
imageUrl.value = res.base_url + 'file/getImage/' + url
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@
|
||||||
:rowspan="2"
|
:rowspan="2"
|
||||||
label="logo上传">
|
label="logo上传">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="(url)=>{ruleForm.logourl=url}" style="margin-left: 24px"></UpLoad>
|
<UpLoad v-model="uploadURL" ref="uploadRef" @uploadSuccess="uploadSuccess"
|
||||||
|
style="margin-left: 24px"></UpLoad>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="数字签名">
|
<el-descriptions-item label="数字签名">
|
||||||
|
|
@ -60,10 +61,6 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;justify-content: flex-end;padding: 0 24px">
|
<div style="display: flex;justify-content: flex-end;padding: 0 24px">
|
||||||
|
|
@ -94,11 +91,10 @@ const ruleForm = reactive<any>({
|
||||||
logoUrl: "",
|
logoUrl: "",
|
||||||
})
|
})
|
||||||
const uploadRef = ref<any>()
|
const uploadRef = ref<any>()
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
loadConfig().then((res: any) => {
|
loadConfig().then((res: any) => {
|
||||||
uploadURL.value = res.base_url + "file/upload";
|
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++) {
|
||||||
ruleForm[list[i].k] = list[i].val
|
ruleForm[list[i].k] = list[i].val
|
||||||
|
|
@ -117,13 +113,10 @@ const rules = reactive<FormRules<any>>({
|
||||||
})
|
})
|
||||||
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) => {
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -140,7 +133,12 @@ const options = Array.from({length: 10000}).map((_, idx) => ({
|
||||||
}))
|
}))
|
||||||
//上传图片
|
//上传图片
|
||||||
const uploadURL = ref<any>()
|
const uploadURL = ref<any>()
|
||||||
|
const uploadSuccess = (url: any) => {
|
||||||
|
ruleForm.logoUrl = url
|
||||||
|
post("common/config/edit", ruleForm).then(() => {
|
||||||
|
ElMessage.success("保存图片成功")
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container-wrapper {
|
.container-wrapper {
|
||||||
|
|
|
||||||
|
|
@ -64,24 +64,35 @@
|
||||||
</div>
|
</div>
|
||||||
</Mask>
|
</Mask>
|
||||||
<Mask :is-show="isUpdate1312" :width="540" :height="347" title="有效期更新" @close="close">
|
<Mask :is-show="isUpdate1312" :width="540" :height="347" title="有效期更新" @close="close">
|
||||||
|
<div class="content-new">
|
||||||
<div class="update_box">
|
<div class="update_box">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="updt_time"
|
v-model="updt_time"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择一个起始日期"
|
placeholder="选择一个起始日期"
|
||||||
size="default"
|
size="default"
|
||||||
style="flex: 1;height: 42px"
|
style="flex: 1;height: 100%"
|
||||||
/>
|
/>
|
||||||
<div class="default-btn" @click="update1312(1)"
|
<div class="default-btn startBtn" @click="update1312(1)"
|
||||||
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}" style="margin-left: 24px">
|
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}">
|
||||||
开始更新
|
开始更新
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<div class="tip">{{ tip }}</div>
|
<div class="tip">
|
||||||
|
<div class="tip-title">
|
||||||
|
{{ tip }}
|
||||||
|
</div>
|
||||||
|
<div class="demo-progress">
|
||||||
|
<el-progress v-if="tip" :text-inside="true" :stroke-width="30" :percentage="percent"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Mask>
|
</Mask>
|
||||||
<Mask :is-show="isUpdate1318" :width="540" :height="347" title="有效期更新" @close="close">
|
<Mask :is-show="isUpdate1318" :width="540" :height="347" title="限价信息更新" @close="close">
|
||||||
|
<div class="content-new">
|
||||||
<div class="update_box">
|
<div class="update_box">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="updt_time"
|
v-model="updt_time"
|
||||||
|
|
@ -90,13 +101,50 @@
|
||||||
size="default"
|
size="default"
|
||||||
style="flex: 1;height: 42px"
|
style="flex: 1;height: 42px"
|
||||||
/>
|
/>
|
||||||
<div class="default-btn" @click="update1312(1)"
|
<div class="default-btn startBtn" @click="update1318()"
|
||||||
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}" style="margin-left: 24px">
|
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}"
|
||||||
|
style="margin-left: 24px">
|
||||||
开始更新
|
开始更新
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<div class="tip">{{ tip }}</div>
|
<div class="tip">
|
||||||
|
<div class="tip-title">
|
||||||
|
{{ tip }}
|
||||||
|
</div>
|
||||||
|
<div class="demo-progress">
|
||||||
|
<el-progress v-if="tip" :text-inside="true" :stroke-width="30" :percentage="0"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Mask>
|
||||||
|
<Mask :is-show="isUpdate1319" :width="540" :height="347" title="自付比例更新" @close="close">
|
||||||
|
<div class="content-new">
|
||||||
|
<div class="update_box">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="updt_time"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择一个起始日期"
|
||||||
|
size="default"
|
||||||
|
style="flex: 1;height: 42px"
|
||||||
|
/>
|
||||||
|
<div class="default-btn startBtn" @click="update1319()"
|
||||||
|
:style="{background: showBtn ? '#EDEFF6' : '', color: showBtn ? '#333333' : ''}"
|
||||||
|
style="margin-left: 24px;height: 42px">
|
||||||
|
开始更新
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tip-body">
|
||||||
|
<div class="tip">
|
||||||
|
<div class="tip-title">
|
||||||
|
{{ tip }}
|
||||||
|
</div>
|
||||||
|
<div class="demo-progress">
|
||||||
|
<el-progress v-if="tip" :text-inside="true" :stroke-width="30" :percentage="percent"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Mask>
|
</Mask>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,11 +184,11 @@ const tabs = [
|
||||||
let tableData: any = ref([])
|
let tableData: any = ref([])
|
||||||
let content: any = ref(null);
|
let content: any = ref(null);
|
||||||
const showBtn = ref(false)
|
const showBtn = ref(false)
|
||||||
|
const percent = ref(0)
|
||||||
let update1312 = (current_page: number) => {
|
let update1312 = (current_page: number) => {
|
||||||
showBtn.value = true
|
showBtn.value = true
|
||||||
if (current_page == 1) {
|
if (current_page == 1) {
|
||||||
tip.value = "开始更新第1页"
|
tip.value = "开始更新第1页"
|
||||||
showBtn.value = false
|
|
||||||
}
|
}
|
||||||
post("social/directory_upinfo/get_page", {
|
post("social/directory_upinfo/get_page", {
|
||||||
updt_time: updt_time.value,
|
updt_time: updt_time.value,
|
||||||
|
|
@ -150,7 +198,7 @@ let update1312 = (current_page: number) => {
|
||||||
let number = res.number;
|
let number = res.number;
|
||||||
if (current_page < pages && isUpdate1312.value) {
|
if (current_page < pages && isUpdate1312.value) {
|
||||||
current_page++
|
current_page++
|
||||||
let percent = Math.floor((current_page / pages) * 100)
|
percent.value = Math.floor((current_page / pages) * 100)
|
||||||
tip.value = "开始更新第:" + current_page + "/" + pages;
|
tip.value = "开始更新第:" + current_page + "/" + pages;
|
||||||
update1312(current_page);
|
update1312(current_page);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -194,7 +242,6 @@ function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_tab() {
|
function set_tab() {
|
||||||
console.log(current_tab.value)
|
|
||||||
post("social/directory/column_list", {type: current_tab.value})
|
post("social/directory/column_list", {type: current_tab.value})
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
column_list.value = res;
|
column_list.value = res;
|
||||||
|
|
@ -236,11 +283,6 @@ let change_tab = (tab: TabsPaneContext, event: Event) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let UpdateDirectoryLoading = ref(false)
|
let UpdateDirectoryLoading = ref(false)
|
||||||
let uploadMsg = ref("正在更新目录,请稍后...")
|
|
||||||
const format = ((p: number) => {
|
|
||||||
return `正在更新`
|
|
||||||
})
|
|
||||||
let percentage = ref(0)
|
|
||||||
|
|
||||||
const tip_message = ref("正在更新目录,请稍后...")
|
const tip_message = ref("正在更新目录,请稍后...")
|
||||||
const start_type = () => {
|
const start_type = () => {
|
||||||
|
|
@ -250,6 +292,7 @@ const start_type = () => {
|
||||||
download(res.currentVersionName, current_tab.value);
|
download(res.currentVersionName, current_tab.value);
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
UpdateDirectoryLoading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
|
close()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "当前是最新版本",
|
message: "当前是最新版本",
|
||||||
|
|
@ -261,6 +304,7 @@ let download = (ver: any, type: any) => {
|
||||||
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
|
||||||
if (res == null || res == "") {
|
if (res == null || res == "") {
|
||||||
UpdateDirectoryLoading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
|
close()
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "当前是最新版本",
|
message: "当前是最新版本",
|
||||||
|
|
@ -270,8 +314,8 @@ let download = (ver: any, type: any) => {
|
||||||
}
|
}
|
||||||
get_data_list()
|
get_data_list()
|
||||||
start_type()
|
start_type()
|
||||||
|
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
|
close()
|
||||||
UpdateDirectoryLoading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|
@ -287,16 +331,15 @@ const close = () => {
|
||||||
isUpdate1319.value = false
|
isUpdate1319.value = false
|
||||||
tip.value = ""
|
tip.value = ""
|
||||||
}
|
}
|
||||||
|
const update1318 = () => {
|
||||||
|
console.log(111)
|
||||||
|
}
|
||||||
|
const update1319 = () => {
|
||||||
|
console.log(111)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.update_box {
|
|
||||||
width: 100%;
|
|
||||||
height: 90px;
|
|
||||||
padding: 24px;
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container-wrapper {
|
.container-wrapper {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
@ -365,22 +408,50 @@ const close = () => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tip-body {
|
.content-new {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 24px;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.update_box {
|
||||||
|
width: 100%;
|
||||||
|
height: 90px;
|
||||||
|
padding: 24px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.startBtn {
|
||||||
|
height: 100%;
|
||||||
|
margin-left: 24px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip-body {
|
||||||
|
flex: 1;
|
||||||
|
padding: 0 24px 24px;
|
||||||
|
min-height: 0;
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
width: 492px;
|
width: 100%;
|
||||||
height: 160px;
|
height: 100%;
|
||||||
background: #F9FAFC;
|
background: #F9FAFC;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 24px;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.updateDirectory {
|
.updateDirectory {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
|
@ -389,6 +460,10 @@ const close = () => {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
&-message {
|
&-message {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue