Compare commits

..

No commits in common. "3340e5f3fd044bf0f62ca87328f0e1b2bd9caf16" and "966c0ae05b7bfb75977ba9237e86e5478f7962f7" have entirely different histories.

2 changed files with 15 additions and 127 deletions

View File

@ -11,7 +11,6 @@ ul, li {
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none!important;
}
html, body {
@ -96,20 +95,3 @@ body {
padding: 0 !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;
}
}

View File

@ -12,28 +12,11 @@
</el-tabs>
</div>
<div class="tip">
<div class="search_input">
<el-input v-model="search_keyword" placeholder="名称/编号" :suffix-icon="Search" size="large" clearable @change="change_search"/>
<el-input v-model="search_keyword" style="width: 240px" placeholder="名称/编号" :suffix-icon="Search" size="large"
clearable @change="change_search"/>
<div class="right">
<el-button type="primary" @click="start_type">更新目录</el-button>
</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 class="content" ref="content">
<el-table :data="tableData" v-loading="isDownLoading" style="width: 100%" height="100%">
@ -47,27 +30,13 @@
v-model:current-page="current_page" @current-change="change_page"/>
</div>
</div>
<Mask :is-show="UpdateDirectoryLoading" :width="300" :height="300" title="更新版本" :close="false">
<Mask :is-show="loading" :width="300" :height="300" title="更新版本" :close="false">
{{ tip_message }}
<div class="demo-progress" style="margin-top: 20px">
<el-progress :percentage="100" :stroke-width="15" striped
striped-flow :show-text="false"/>
</div>
</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>
</template>
@ -77,17 +46,14 @@ import {ElNotification, type TabsPaneContext} from 'element-plus'
import {post} from '@/utils/request.ts'
import {Search} from '@element-plus/icons-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 total_page = ref(0)
let current_tab = ref(1301);
let column_list = ref([]);
let search_keyword = ref("");
let isDownLoading = ref(false);
let tip=ref("")
const tabs = [
{label: '中西成药', name: 1301},
{label: '中药饮片', name: 1302},
@ -103,47 +69,6 @@ const tabs = [
];
let tableData: any = ref([])
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(() => {
init()
});
@ -197,8 +122,10 @@ let change_tab = (tab: TabsPaneContext, event: Event) => {
nextTick(()=>{
init()
})
}
let UpdateDirectoryLoading = ref(false)
let loading = ref(false)
let uploadMsg = ref("正在更新目录,请稍后...")
const format = ((p: number) => {
return `正在更新`
@ -207,12 +134,12 @@ let percentage = ref(0)
const tip_message = ref("正在更新目录,请稍后...")
const start_type = () => {
UpdateDirectoryLoading.value = true
loading.value = true
post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => {
tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整";
download(res.currentVersionName, current_tab.value);
}).catch((err: any) => {
UpdateDirectoryLoading.value = false;
loading.value = false;
ElNotification({
title: '提示',
message: "当前是最新版本",
@ -223,7 +150,7 @@ const start_type = () => {
let download = (ver: any, type: any) => {
post("social/directory/download", {ver: ver, type: type}).then((res: any) => {
if (res == null || res == "") {
UpdateDirectoryLoading.value = false;
loading.value = false;
ElNotification({
title: '提示',
message: "当前是最新版本",
@ -235,7 +162,7 @@ let download = (ver: any, type: any) => {
start_type()
}).catch((err: any) => {
UpdateDirectoryLoading.value = false;
loading.value = false;
ElNotification({
title: '提示',
message: "当前是最新版本",
@ -247,12 +174,6 @@ let download = (ver: any, type: any) => {
</script>
<style scoped lang="scss">
.update_box{
position: relative;
width: 100%;
height: 100%;
padding: 20px;
}
.container-wrapper {
box-sizing: border-box;
padding: 20px;
@ -261,7 +182,6 @@ let download = (ver: any, type: any) => {
flex-direction: column;
height: 100%;
.top {
width: 100%;
height: 50px;
@ -273,21 +193,7 @@ let download = (ver: any, type: any) => {
.tip {
display: flex;
.search_input{
flex: 1;
}
.search_btn{
width: 140px;
padding-left: 10px;
padding-right: 10px;
}
.middel{
width: 200px;
}
.op_btn{
width: 120px;
}
justify-content: space-between;
}
.content {