master
lion 2 years ago
parent 8c274381a9
commit ba26bc38fd

@ -4,4 +4,4 @@ ENV='development'
# base api # base api
VUE_APP_BASE_API=http://sstt-dangan.ali251.langye.net 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_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 # base api
VUE_APP_BASE_API = http://sstt-dangan.ali251.langye.net 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_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 # base api
VUE_APP_BASE_API=http://sstt-dangan.ali251.langye.net 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_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> <script>
export default { export default {
name: 'App' name: 'App',
} }
</script> </script>

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

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

@ -1,14 +1,14 @@
<template> <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"> :width="width">
<div slot="title"> <div slot="title">
<span class="el-dialog__title">{{title}}</span> <span class="el-dialog__title">{{title}}</span>
<slot name="searchtype"></slot> <slot name="searchtype"></slot>
</div> </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 id="iframeWin" :src="url" frameborder="0" scrolling="auto" align="center" class="iframeWeb">
</iframe> </iframe>
</div> </div>
@ -33,7 +33,7 @@
}, },
width: { width: {
type: String, type: String,
default: "60%" default: "70%"
}, },
isShow: { isShow: {
type: Boolean, type: Boolean,

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

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

@ -18,7 +18,7 @@
</app-link> </app-link>
<item v-else :icon="item.meta && item.meta.icon" :title="item.meta.title" /> <item v-else :icon="item.meta && item.meta.icon" :title="item.meta.title" />
</template> </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" /> :base-path="resolvePath(child.path)" class="nest-menu submenu-item" />
</el-submenu> </el-submenu>
</div> </div>

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

@ -42,6 +42,15 @@ const mutations = {
}, },
SET_LOGINID: (state, login_id) => { SET_LOGINID: (state, login_id) => {
state.login_id = 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('身份验证失败请重新登录') reject('身份验证失败请重新登录')
} }
response["roles"] = ["admin"]; 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 { const {
roles, roles,
name, name,
avatar, avatar,
login_id, login_id,
area_id,
auth_type,
is_admin
} = response } = response
@ -98,7 +118,11 @@ const actions = {
commit('SET_ROLES', roles) commit('SET_ROLES', roles)
commit('SET_NAME', name) commit('SET_NAME', name)
commit('SET_AVATAR', avatar) 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) resolve(response)
}).catch(error => { }).catch(error => {
reject(error) reject(error)

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

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

@ -10,19 +10,10 @@
<div class="boxcontentsubtitle">总数</div> <div class="boxcontentsubtitle">总数</div>
<div class="boxcontent"> <div class="boxcontent">
<div class="boxcontentitem"> <div class="boxcontentitem">
<div class="boxcontentitem-big"> <div class="boxcontentitem-big">
{{totaldata.record_total?totaldata.record_total:0}} <count-to separator="" :start-val="0" :end-val="totaldata.recordsTotal"
:duration="3000" />
</div> </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> </div>
</div> </div>
@ -31,26 +22,16 @@
<div class="boxtitle"> <div class="boxtitle">
<span>组织统计</span> <span>组织统计</span>
<i class="el-icon-user statIcon"></i> <i class="el-icon-s-check statIcon"></i>
</div> </div>
<div class="bline"></div> <div class="bline"></div>
<div class="boxcontentsubtitle">总数</div> <div class="boxcontentsubtitle">总数</div>
<div class="boxcontent"> <div class="boxcontent">
<div class="boxcontentitem"> <div class="boxcontentitem">
<div class="boxcontentitem-big"> <div class="boxcontentitem-big">
{{totaldata.originze_total?totaldata.originze_total:0}} <count-to separator="" :start-val="0" :end-val="totaldata.organizesTotal"
:duration="3000" />
</div> </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> </div>
</div> </div>
@ -58,54 +39,19 @@
<div class="box box3"> <div class="box box3">
<div class="boxtitle"> <div class="boxtitle">
<span>区域统计</span> <span>区域统计</span>
<i class="el-icon-s-custom statIcon"></i> <i class="el-icon-location-information statIcon"></i>
</div> </div>
<div class="bline"></div> <div class="bline"></div>
<div class="boxcontentsubtitle">总数</div> <div class="boxcontentsubtitle">总数</div>
<div class="boxcontent"> <div class="boxcontent">
<div class="boxcontentitem"> <div class="boxcontentitem">
<div class="boxcontentitem-big"> <div class="boxcontentitem-big">
{{totaldata.area_total?totaldata.area_total:0}} <count-to separator="" :start-val="0" :end-val="totaldata.areasTotal"
:duration="3000" />
</div> </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>
</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>
</div> </div>
</template> </template>
@ -121,9 +67,9 @@
totaldata: { totaldata: {
type: Object, type: Object,
default: { default: {
record_total:0, recordsTotal:0,
originze_total:0, organizesTotal:0,
area_total:0 areasTotal:0
} }
} }
}, },

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

@ -12,6 +12,33 @@
</div> </div>
</div> </div>
</template> </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> <template v-slot:sort>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold"> <div class="xy-table-item-label" style="font-weight: bold">
@ -32,7 +59,10 @@
save, save,
show, show,
index index
} from "@/api/system/baseForm.js" } from "@/api/system/baseForm.js"
import {
listCommonuser
} from "@/api/common.js"
import { import {
deepCopy, deepCopy,
isNull isNull
@ -48,8 +78,11 @@
id: '', id: '',
table_name: 'areas', table_name: 'areas',
list_types: [], list_types: [],
list_users: [],
form: { form: {
name: '', name: '',
user_ids: [],
auth_type:0,
sort: 0 sort: 0
}, },
rules: { rules: {
@ -60,8 +93,14 @@
} }
} }
}, },
created() {}, created() {
this.getUserList()
},
methods: { methods: {
changeUser(e) {
console.log("e", e)
this.form.user_ids = e
},
submit() { submit() {
if (this.id) { if (this.id) {
this.form.id = this.id this.form.id = this.id
@ -88,8 +127,17 @@
id: this.id, id: this.id,
table_name: this.table_name, table_name: this.table_name,
}).then(res => { }).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: { watch: {
@ -103,6 +151,8 @@
this.type = "add" this.type = "add"
this.form = { this.form = {
name: '', name: '',
user_ids: [],
auth_type:0,
sort: 0 sort: 0
} }
this.$refs['dialog'].reset() this.$refs['dialog'].reset()
@ -114,10 +164,10 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .description, ::v-deep .user_ids,
::v-deep .name, ::v-deep .name,
::v-deep .sort, ::v-deep .auth_type,
::v-deep .originize_type_id { ::v-deep .sort{
flex-basis: 100%; flex-basis: 100%;
} }

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

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

@ -71,8 +71,8 @@
<template slot-scope="scope"> <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="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 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> 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')" <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="确定删除吗?"> style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
@ -165,11 +165,11 @@
console.log("this.stateObj", this.stateObj) console.log("this.stateObj", this.stateObj)
// this.getCatalogList() // this.getCatalogList()
if (this.$route.path) { if (this.$route.path) {
let path = this.$route.path.split("_") let path = this.$route.path.split("_")
this.select.catalog_id = path[1] this.select.catalog_id = path[1]
} }
if(this.$route.query.searchTitle){ if (this.$route.query.searchTitle) {
this.select.title = this.$route.query.searchTitle this.select.title = this.$route.query.searchTitle
} }
this.getList() this.getList()
}, },
@ -185,7 +185,7 @@
sort_type: 'ASC', sort_type: 'ASC',
sort_name: 'sort', sort_name: 'sort',
table_name: 'catalogs', table_name: 'catalogs',
is_auth: 1, // is_auth: 1,
}) })
if (res.data.length > 0) { if (res.data.length > 0) {
this.catalogList = this.base.buildTree(res.data) this.catalogList = this.base.buildTree(res.data)

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', 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', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save