dev
This commit is contained in:
parent
6fd2c14396
commit
a69f1c39a6
|
|
@ -11,6 +11,7 @@ ul, li {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
outline: none!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|
@ -95,3 +96,20 @@ body {
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
//border: 1px solid #4D6DE4 !important;
|
//border: 1px solid #4D6DE4 !important;
|
||||||
}
|
}
|
||||||
|
$btn-color: #4d99e4;
|
||||||
|
$lighter-color: #6eaeed;
|
||||||
|
.btn{
|
||||||
|
cursor: pointer;
|
||||||
|
width: 120px;
|
||||||
|
height: 42px;
|
||||||
|
line-height: 42px;
|
||||||
|
background: $btn-color;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: #FFF;
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
&:hover{
|
||||||
|
background: $lighter-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -12,11 +12,28 @@
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<div class="tip">
|
<div class="tip">
|
||||||
<el-input v-model="search_keyword" style="width: 240px" placeholder="名称/编号" :suffix-icon="Search" size="large"
|
<div class="search_input">
|
||||||
clearable @change="change_search"/>
|
<el-input v-model="search_keyword" placeholder="名称/编号" :suffix-icon="Search" size="large" clearable @change="change_search"/>
|
||||||
<div class="right">
|
|
||||||
<el-button type="primary" @click="start_type">更新目录</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="search_btn"><div class="btn" @click="change_search">搜索</div></div>
|
||||||
|
<div class="middel">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="op_btn">
|
||||||
|
<el-dropdown placement="bottom">
|
||||||
|
<div class="btn">目录更新</div>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item @click="start_type">基础更新</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="openUpdateBox(1312)">有效期更新</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="openUpdateBox(1318)">限价信息更新</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="openUpdateBox(1319)">自付比例更新</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content" ref="content">
|
<div class="content" ref="content">
|
||||||
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
|
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
|
||||||
|
|
@ -30,13 +47,27 @@
|
||||||
v-model:current-page="current_page" @current-change="change_page"/>
|
v-model:current-page="current_page" @current-change="change_page"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Mask :is-show="loading" :width="300" :height="300" title="更新版本" :close="false">
|
<Mask :is-show="UpdateDirectoryLoading" :width="300" :height="300" title="更新版本" :close="false">
|
||||||
{{ tip_message }}
|
{{ tip_message }}
|
||||||
<div class="demo-progress" style="margin-top: 20px">
|
<div class="demo-progress" style="margin-top: 20px">
|
||||||
<el-progress :percentage="100" :stroke-width="15" striped
|
<el-progress :percentage="100" :stroke-width="15" striped
|
||||||
striped-flow :show-text="false"/>
|
striped-flow :show-text="false"/>
|
||||||
</div>
|
</div>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
||||||
|
<Mask :is-show="isUpdate1312" :width="600" :height="300" title="有效期更新" @close="isUpdate1312=false">
|
||||||
|
<div class="update_box">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="updt_time"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择一个起始日期"
|
||||||
|
size="default"
|
||||||
|
/>
|
||||||
|
<div class="btn" @click="update1312(1)">开始更新</div>
|
||||||
|
<div class="tip">{{tip}}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Mask>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -46,14 +77,17 @@ import {ElNotification, type TabsPaneContext} from 'element-plus'
|
||||||
import {post} from '@/utils/request.ts'
|
import {post} from '@/utils/request.ts'
|
||||||
import {Search} from '@element-plus/icons-vue'
|
import {Search} from '@element-plus/icons-vue'
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
|
let isUpdate1312=ref(false)
|
||||||
|
let isUpdate1318=ref(false)
|
||||||
|
let isUpdate1319=ref(false)
|
||||||
|
let updt_time = ref(new Date())
|
||||||
let current_page = ref(1);
|
let current_page = ref(1);
|
||||||
let total_page = ref(0)
|
let total_page = ref(0)
|
||||||
let current_tab = ref(1301);
|
let current_tab = ref(1301);
|
||||||
let column_list = ref([]);
|
let column_list = ref([]);
|
||||||
let search_keyword = ref("");
|
let search_keyword = ref("");
|
||||||
let isDownLoading = ref(false);
|
let isDownLoading = ref(false);
|
||||||
|
let tip=ref("")
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{label: '中西成药', name: 1301},
|
{label: '中西成药', name: 1301},
|
||||||
{label: '中药饮片', name: 1302},
|
{label: '中药饮片', name: 1302},
|
||||||
|
|
@ -69,6 +103,47 @@ const tabs = [
|
||||||
];
|
];
|
||||||
let tableData: any = ref([])
|
let tableData: any = ref([])
|
||||||
let content: any = ref(null);
|
let content: any = ref(null);
|
||||||
|
let update1312 = (current_page:number) => {
|
||||||
|
if(current_page==1){
|
||||||
|
tip.value="开始更新第1页"
|
||||||
|
}
|
||||||
|
post("social/directory_upinfo/get_page", {
|
||||||
|
updt_time: updt_time.value,
|
||||||
|
page:current_page
|
||||||
|
}, {catch_error: true}).then((res: any) => {
|
||||||
|
let pages = res.pages;
|
||||||
|
let number = res.number;
|
||||||
|
if (current_page < pages&&isUpdate1312.value) {
|
||||||
|
current_page++
|
||||||
|
let percent = Math.floor((current_page / pages) * 100)
|
||||||
|
tip.value= "开始更新第:" + current_page + "/" + pages;
|
||||||
|
update1312(current_page);
|
||||||
|
} else {
|
||||||
|
tip.value= "所有更新已完成"
|
||||||
|
isUpdate1312.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((err: any) => {
|
||||||
|
isUpdate1312.value = false;
|
||||||
|
current_page=1;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const openUpdateBox = (type:number) => {
|
||||||
|
//获取30天前时间
|
||||||
|
let start_time = new Date();
|
||||||
|
start_time.setDate(start_time.getDate() - 30);
|
||||||
|
updt_time.value = start_time;
|
||||||
|
if(type==1312){
|
||||||
|
isUpdate1312.value = true
|
||||||
|
}
|
||||||
|
if(type==1318){
|
||||||
|
isUpdate1318.value = true
|
||||||
|
}
|
||||||
|
if(type==1319){
|
||||||
|
isUpdate1319.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
});
|
});
|
||||||
|
|
@ -122,10 +197,8 @@ let change_tab = (tab: TabsPaneContext, event: Event) => {
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
let loading = ref(false)
|
let UpdateDirectoryLoading = ref(false)
|
||||||
let uploadMsg = ref("正在更新目录,请稍后...")
|
let uploadMsg = ref("正在更新目录,请稍后...")
|
||||||
const format = ((p: number) => {
|
const format = ((p: number) => {
|
||||||
return `正在更新`
|
return `正在更新`
|
||||||
|
|
@ -134,12 +207,12 @@ let percentage = ref(0)
|
||||||
|
|
||||||
const tip_message = ref("正在更新目录,请稍后...")
|
const tip_message = ref("正在更新目录,请稍后...")
|
||||||
const start_type = () => {
|
const start_type = () => {
|
||||||
loading.value = true
|
UpdateDirectoryLoading.value = true
|
||||||
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
|
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
|
||||||
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
|
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
|
||||||
download(res.currentVersionName, current_tab.value);
|
download(res.currentVersionName, current_tab.value);
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
loading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "当前是最新版本",
|
message: "当前是最新版本",
|
||||||
|
|
@ -150,7 +223,7 @@ const start_type = () => {
|
||||||
let download = (ver: any, type: any) => {
|
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 == "") {
|
||||||
loading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "当前是最新版本",
|
message: "当前是最新版本",
|
||||||
|
|
@ -162,7 +235,7 @@ let download = (ver: any, type: any) => {
|
||||||
start_type()
|
start_type()
|
||||||
|
|
||||||
}).catch((err: any) => {
|
}).catch((err: any) => {
|
||||||
loading.value = false;
|
UpdateDirectoryLoading.value = false;
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: "当前是最新版本",
|
message: "当前是最新版本",
|
||||||
|
|
@ -174,6 +247,12 @@ let download = (ver: any, type: any) => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.update_box{
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
.container-wrapper {
|
.container-wrapper {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
@ -182,6 +261,7 @@ let download = (ver: any, type: any) => {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
@ -193,7 +273,21 @@ let download = (ver: any, type: any) => {
|
||||||
|
|
||||||
.tip {
|
.tip {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
.search_input{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.search_btn{
|
||||||
|
width: 140px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
.middel{
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.op_btn{
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue