master
lion 12 months ago
parent 8c274381a9
commit ba26bc38fd

@ -4,4 +4,4 @@ ENV='development'
# base api
VUE_APP_BASE_API=http://sstt-dangan.ali251.langye.net
VUE_APP_UPLOAD_API=http://sstt-dangan.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview
VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview

@ -4,4 +4,4 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = http://sstt-dangan.ali251.langye.net
VUE_APP_UPLOAD_API =http://sstt-dangan.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview
VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview

@ -6,4 +6,4 @@ ENV = 'staging'
# base api
VUE_APP_BASE_API=http://sstt-dangan.ali251.langye.net
VUE_APP_UPLOAD_API=http://sstt-dangan.ali251.langye.net/api/admin/upload-file
#VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview
VUE_APP_PREVIEW_API=https://view.langye.net/preview/onlinePreview

@ -6,6 +6,6 @@
<script>
export default {
name: 'App'
name: 'App',
}
</script>

@ -3,7 +3,7 @@ import request from "@/utils/request";
export function home(params){
return request({
method:'get',
url:'/api/admin/chart/home',
url:'/api/chart',
params
})
}

@ -38,7 +38,7 @@
type: Array,
default: () => {
return [
"#5470c6",
"#b3241d",
"#91cc75",
"#fac858",
"#ee6666",

@ -1,14 +1,14 @@
<template>
<el-dialog class="common-dialog" :fullscreen='isfullscreen' :title="title" :modal="false" top="2vh" :visible.sync="diaShow" @close="coloseDia"
<el-dialog class="common-dialog" :fullscreen='isfullscreen' :title="title" :modal="false" top="10vh" :visible.sync="diaShow" @close="coloseDia"
:width="width">
<div slot="title">
<span class="el-dialog__title">{{title}}</span>
<slot name="searchtype"></slot>
</div>
<div class="dialogConcent" :style="{height:wheight+'px'}">
<div class="dialogConcent" style="max-height: 65vh !important;min-height: 300px;overflow: scroll;">
<iframe id="iframeWin" :src="url" frameborder="0" scrolling="auto" align="center" class="iframeWeb">
</iframe>
</div>
@ -33,7 +33,7 @@
},
width: {
type: String,
default: "60%"
default: "70%"
},
isShow: {
type: Boolean,

@ -1,7 +1,7 @@
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
<router-view :key="key"/>
</transition>
</section>
</template>
@ -11,6 +11,7 @@ export default {
name: 'AppMain',
computed: {
key() {
return this.$route.path
}
}

@ -53,7 +53,10 @@
...mapGetters([
'sidebar',
'avatar'
])
]),
},
created() {
this.searchword = this.$route.query.searchTitle ? this.$route.query.searchTitle : ''
},
data() {
return {
@ -73,8 +76,7 @@
this.$Message.warning("请输入关键词")
return
} else {
this.$router.push('/record/index?searchTitle='+this.searchword)
this.$router.push('/record/index?searchTitle=' + this.searchword)
}
}
}

@ -18,7 +18,7 @@
</app-link>
<item v-else :icon="item.meta && item.meta.icon" :title="item.meta.title" />
</template>
<sidebar-item v-for="(child,index) in item.children" :key="child.path" :is-nest="true" :item="child"
<sidebar-item v-for="(child,cindex) in item.children" :key="child.path" :is-nest="true" :item="child"
:base-path="resolvePath(child.path)" class="nest-menu submenu-item" />
</el-submenu>
</div>

@ -1,93 +1,103 @@
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
</div>
<app-main />
</div>
</div>
</template>
<script>
import { Navbar, Sidebar, AppMain } from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
Navbar,
Sidebar,
AppMain
},
mixins: [ResizeMixin],
computed: {
sidebar() {
return this.$store.state.app.sidebar
},
device() {
return this.$store.state.app.device
},
fixedHeader() {
return this.$store.state.settings.fixedHeader
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar{
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.mobile .fixed-header {
width: 100%;
}
<template>
<div :class="classObj" class="app-wrapper">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" />
<div class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
</div>
<el-scrollbar :style="{height:'100%','padding':'50px 20px 0 20px'}">
<app-main />
</el-scrollbar>
</div>
</div>
</template>
<script>
import {
Navbar,
Sidebar,
AppMain
} from './components'
import ResizeMixin from './mixin/ResizeHandler'
export default {
name: 'Layout',
components: {
Navbar,
Sidebar,
AppMain
},
mixins: [ResizeMixin],
computed: {
sidebar() {
return this.$store.state.app.sidebar
},
device() {
return this.$store.state.app.device
},
fixedHeader() {
return this.$store.state.settings.fixedHeader
},
classObj() {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
}
}
},
methods: {
handleClickOutside() {
this.$store.dispatch('app/closeSideBar', {
withoutAnimation: false
})
}
}
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";
@import "~@/styles/variables.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
}
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px)
}
.mobile .fixed-header {
width: 100%;
}
</style>

@ -42,6 +42,15 @@ const mutations = {
},
SET_LOGINID: (state, login_id) => {
state.login_id = login_id
},
SET_AREAID: (state, area_id) => {
state.area_id = area_id
},
SET_AUTHTYPE: (state, auth_type) => {
state.auth_type = auth_type
},
SET_ISADMIN: (state, is_admin) => {
state.is_admin = is_admin
},
}
@ -85,12 +94,23 @@ const actions = {
reject('身份验证失败请重新登录')
}
response["roles"] = ["admin"];
response["login_id"] = response['id'];
response["login_id"] = response['id'];
response["area_id"] = response["area"]?response["area"]["id"]:''
response["auth_type"] = response["area"]?response["area"]["auth_type"]:0
for(var k of response["role"]){
if(k.name==='系统管理员'){
response["is_admin"] = true
}
}
const {
roles,
name,
avatar,
login_id,
login_id,
area_id,
auth_type,
is_admin
} = response
@ -98,7 +118,11 @@ const actions = {
commit('SET_ROLES', roles)
commit('SET_NAME', name)
commit('SET_AVATAR', avatar)
commit('SET_LOGINID', login_id)
commit('SET_LOGINID', login_id)
commit('SET_AREAID', area_id)
commit('SET_AUTHTYPE', auth_type)
commit('SET_ISADMIN', is_admin)
resolve(response)
}).catch(error => {
reject(error)

@ -94,7 +94,7 @@
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
is_auth: 1
// is_auth: 1
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)

@ -77,7 +77,7 @@
bottom: 26, //
handleColor: '#EFEFEF', //h
handleStyle: {
borderColor: '#409EFF',
borderColor: '#b3241d',
borderWidth: '1',
shadowBlur: 2,
background: '#EFEFEF',
@ -87,11 +87,11 @@
// 410
//01
offset: 0,
color: '#409EFF'
color: '#b3241d'
},
{
offset: 1,
color: '#409EFF'
color: '#b3241d'
}
]),
backgroundColor: '#EFEFEF', //

@ -10,19 +10,10 @@
<div class="boxcontentsubtitle">总数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.record_total?totaldata.record_total:0}}
<div class="boxcontentitem-big">
<count-to separator="" :start-val="0" :end-val="totaldata.recordsTotal"
:duration="3000" />
</div>
<!-- <div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.business.nurse_money_total}}</span>
<span>护工金额</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.business.remain_money_total}}</span>
<span>留存金额</span>
</div>
</div> -->
</div>
</div>
</div>
@ -31,26 +22,16 @@
<div class="boxtitle">
<span>组织统计</span>
<i class="el-icon-user statIcon"></i>
<i class="el-icon-s-check statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">总数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.originze_total?totaldata.originze_total:0}}
<div class="boxcontentitem-big">
<count-to separator="" :start-val="0" :end-val="totaldata.organizesTotal"
:duration="3000" />
</div>
<!-- <div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.person_efficiency.expect}}</span>
<span> 照护人员数</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.person_efficiency.act}} </span>
<span>天数</span>
</div>
</div> -->
</div>
</div>
</div>
@ -58,54 +39,19 @@
<div class="box box3">
<div class="boxtitle">
<span>区域统计</span>
<i class="el-icon-s-custom statIcon"></i>
<i class="el-icon-location-information statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">总数</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">
{{totaldata.area_total?totaldata.area_total:0}}
<div class="boxcontentitem-big">
<count-to separator="" :start-val="0" :end-val="totaldata.areasTotal"
:duration="3000" />
</div>
<!-- <div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.customer.add}}</span>
<span>新增</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.customer.wash}}</span>
<span>流失</span>
</div>
</div> -->
</div>
</div>
</div>
<!-- <div class="box box4">
<div class="boxtitle">
<span>订单统计</span>
<i class="el-icon-document statIcon"></i>
</div>
<div class="bline"></div>
<div class="boxcontentsubtitle">服务订单</div>
<div class="boxcontent">
<div class="boxcontentitem">
<div class="boxcontentitem-big">{{totaldata.order.server_total}}
</div>
<div style="display: flex;justify-content: space-around;">
<div class="boxcontentitem-small">
<span>{{totaldata.order.cycle_total}}</span>
<span>周期性订单</span>
</div>
<div class="boxcontentitem-small">
<span>{{totaldata.order.unit_total}}</span>
<span>单次订单</span>
</div>
</div>
</div>
</div>
</div> -->
</div>
</div>
</template>
@ -121,9 +67,9 @@
totaldata: {
type: Object,
default: {
record_total:0,
originze_total:0,
area_total:0
recordsTotal:0,
organizesTotal:0,
areasTotal:0
}
}
},

@ -22,6 +22,9 @@
<script>
import myecharts from '@/components/myecharts';
import PanelGroup from './components/PanelGroup';
import {
home
} from "@/api/home"
export default {
components: {
myecharts,
@ -29,7 +32,11 @@
},
data() {
return {
list: {},
list: {
recordsTotal: 0,
organizesTotal: 0,
areasTotal: 0
},
overall_month_data: {},
overall_originze_data: {}
}
@ -38,25 +45,56 @@
},
created() {
this.listHome()
this.init()
},
mounted() {
},
methods: {
async listHome() {
const res = await home()
this.list = {
recordsTotal: res?.recordsTotal,
organizesTotal: res?.organizesTotal,
areasTotal: res?.areasTotal
}
let xMonth = []
let dMonth = []
res.list.map(item => {
xMonth.push(item.month)
dMonth.push(item.count)
})
this.overall_month_data.x = xMonth
this.overall_month_data.list[0].data = dMonth
let oData = []
res.organizesList.map(o => {
oData.push({
value: o.total,
name: o.name
})
})
this.overall_originze_data.list[0].data = oData
},
init() {
this.overall_month_data = {
xShow: true,
yShow: true,
rotate: 0,
rotate: 20,
// formatter:function(params){
// return that.chartFomatter(params)
// },
x: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
xAxis: {
axisLabel: {
show: true,
rotate: 35, //35
},
},
x: [],
list: [{
name: "上传数",
data: [3, 10, 12, 4, 20, 13, 1, 21, 8, 2, 1, 14],
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
type: 'bar',
barGap: '0%',
}]
@ -66,19 +104,11 @@
xShow: false,
yShow: false,
list: [{
name: '上传数',
name: '档案数',
type: 'pie',
radius: '80%',
// center:['20%','20%'],
data: [{
value: 30,
name: '集团'
},
{
value: 22,
name: '子公司'
}
],
data: [],
label: {
show: false,
position: 'center'
@ -99,8 +129,8 @@
}
.chartSize {
width: calc(50% - 20px)!important;
margin: 10px!important;
width: calc(50% - 20px) !important;
margin: 10px !important;
background: #fff;
}
}

@ -12,6 +12,33 @@
</div>
</div>
</template>
<template v-slot:user_ids>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>授权人员
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" @change="changeUser" v-model="form.user_ids" multiple collapse-tags
placeholder="请选择">
<el-option v-for="item in list_users" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:auth_type>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>数据权限
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.auth_type">
<el-radio :label="0">所有</el-radio>
<el-radio :label="1">区域</el-radio>
</el-radio-group>
</div>
</div>
</template>
<template v-slot:sort>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -32,7 +59,10 @@
save,
show,
index
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import {
listCommonuser
} from "@/api/common.js"
import {
deepCopy,
isNull
@ -48,8 +78,11 @@
id: '',
table_name: 'areas',
list_types: [],
list_users: [],
form: {
name: '',
user_ids: [],
auth_type:0,
sort: 0
},
rules: {
@ -60,8 +93,14 @@
}
}
},
created() {},
created() {
this.getUserList()
},
methods: {
changeUser(e) {
console.log("e", e)
this.form.user_ids = e
},
submit() {
if (this.id) {
this.form.id = this.id
@ -88,8 +127,17 @@
id: this.id,
table_name: this.table_name,
}).then(res => {
this.form = this.base.requestToForm(res,this.form)
this.form = this.base.requestToForm(res, this.form)
this.form.user_ids = res.user_ids ? res.user_ids : [],
this.form.auth_type = res.auth_type?res.auth_type:0
})
},
async getUserList() {
const res = await listCommonuser({
page_size: 999,
page: 1,
})
this.list_users = res.data
},
},
watch: {
@ -103,6 +151,8 @@
this.type = "add"
this.form = {
name: '',
user_ids: [],
auth_type:0,
sort: 0
}
this.$refs['dialog'].reset()
@ -114,10 +164,10 @@
</script>
<style scoped lang="scss">
::v-deep .description,
::v-deep .name,
::v-deep .sort,
::v-deep .originize_type_id {
::v-deep .user_ids,
::v-deep .name,
::v-deep .auth_type,
::v-deep .sort{
flex-basis: 100%;
}

@ -30,7 +30,7 @@
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属区域
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.area_ids" multiple placeholder="请选择">
<el-select :disabled="stateObj.auth_type==1" style="width:100%" v-model="form.area_ids" multiple placeholder="请选择">
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@ -107,12 +107,14 @@
import {
getToken
} from '@/utils/auth'
import state from '@/store/modules/user.js'
export default {
components: {
wangEditor
},
data() {
return {
stateObj: {},
isShow: false,
id: '',
showTinymce: false,
@ -157,14 +159,15 @@
}
},
created() {
this.stateObj = state.state
this.uploadOther.token = getToken();
this.getCatalogList()
this.getAreaList()
this.getTagList()
},
methods: {
changeEditor(e){
this.form.content = e
methods: {
changeEditor(e) {
this.form.content = e
},
async getCatalogList() {
const res = await index({
@ -173,7 +176,7 @@
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
is_auth: 1
// is_auth: 1
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)
@ -209,25 +212,25 @@
this.form.catalog_name = data.name
this.form.catalog_id = data.id
this.$forceUpdate()
},
setCheck(e){
if(e){
this.checkArr = [e]
this.form.catalog_id = e
}else{
this.checkArr = []
this.form.catalog_id = ''
}
},
setCheck(e) {
if (e) {
this.checkArr = [e]
this.form.catalog_id = e
} else {
this.checkArr = []
this.form.catalog_id = ''
}
},
handleRemove(file, fileList) {
this.filesList = fileList
},
handlesuccess(response, file, fileList) {
console.log("response",response)
if(response && response.hasOwnProperty('errcode')){
this.$Message.warning(response.errmsg||'')
this.filesList = []
return
handlesuccess(response, file, fileList) {
console.log("response", response)
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
this.filesList = []
return
}
this.filesList = fileList
},
@ -291,8 +294,8 @@
this.checkArr = res.catalog_id ? [res.catalog_id] : [],
this.form.area_ids = res.area_ids ? res.area_ids : []
this.form.tag_ids = res.tag_ids ? res.tag_ids : []
this.form.files = res.files ? res.files : [],
this.form.content = res.content?res.content:''
this.form.files = res.files ? res.files : [],
this.form.content = res.content ? res.content : ''
if (res.files_details && res.files_details.length > 0) {
this.filesList = []
res.files_details.map(item => {
@ -313,7 +316,8 @@
if (newVal) {
if (this.type === 'editor') {
this.getDetail()
} else {
} else {
this.form.area_ids = this.stateObj.area_id?[this.stateObj.area_id]:[]
this.showTinymce = true
}

@ -80,8 +80,7 @@
console.log("this.form", this.form)
})
},
toshowFile(url) {
console.log("url",url)
toshowFile(url) {
this.$refs.viewFile.url = url
this.$refs.viewFile.diaShow = true
},

@ -71,8 +71,8 @@
<template slot-scope="scope">
<!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> -->
<el-button type="primary" size="small" @click="showIndex('show',scope.row.id)"></el-button>
<el-button v-if="stateObj.login_id===scope.row.admin_id || stateObj.roles.includes('admin')"
<!-- -->
<el-button v-if="stateObj.login_id===scope.row.admin_id || stateObj.is_admin"
type="primary" size="small" @click="editIndex('editor',scope.row.id)">编辑</el-button>
<el-popconfirm v-if="stateObj.login_id===scope.row.admin_id || stateObj.roles.includes('admin')"
style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
@ -165,11 +165,11 @@
console.log("this.stateObj", this.stateObj)
// this.getCatalogList()
if (this.$route.path) {
let path = this.$route.path.split("_")
let path = this.$route.path.split("_")
this.select.catalog_id = path[1]
}
if(this.$route.query.searchTitle){
this.select.title = this.$route.query.searchTitle
}
if (this.$route.query.searchTitle) {
this.select.title = this.$route.query.searchTitle
}
this.getList()
},
@ -185,7 +185,7 @@
sort_type: 'ASC',
sort_name: 'sort',
table_name: 'catalogs',
is_auth: 1,
// is_auth: 1,
})
if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data)

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-四世同堂-档案/sstt_dangan/public/admin_test',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save