Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-11-21 17:25:36 +08:00
21 changed files with 1249 additions and 262 deletions
+145 -61
View File
@@ -1,58 +1,128 @@
<template> <template>
<div id="app"> <div id="app">
<router-view v-if="!isBoolean"/> <!-- <router-view v-if="!isBoolean"/>-->
<div class="content-box" v-if="isBoolean"> <span v-if="this.$route.name === 'Login'">
<nav-menu></nav-menu> <router-view />
<div class="sub-container"> </span>
<div style="background-color: #0068B7; height: 65px; width: 100%"> <span v-else>
<span style="color: #fff; line-height: 65px; float: left; font-size: 20px; font-weight: 600;"> <div class="content-box" v-if="isCollapse">
标准法规管理系统 Standard and Regulation Management System <el-container>
</span> <el-header>
<!-- header头部 右侧内容 当前登录人和退出--> <div>
<div class="header-right" style="display: inline-block; float: right; margin-right: 20px; color: #fff"> <img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
<div class="user-info"> </div>
<el-dropdown <div style="float: right; margin-right: 20px;">
<div class="user-info">
<el-dropdown
trigger="click" trigger="click"
@command="handleCommand" @command="handleCommand"
> >
<div class="user-box" style="margin-top: 23px;"> <div class="user-box">
<img :src="userAvator" v-if="$store.getters.userInfo.avator"> <img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #FFFFFF;">&#xe69b;</span> <span class="iconfont" v-else style="color: #000;">&#xe69b;</span>
<span style="color: #FFFFFF;">{{ $store.getters.userInfo.uName }}</span> <span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
<i style="color: #FFFFFF;" class="el-icon-arrow-down"/> <i style="color: #000;" class="el-icon-arrow-down"/>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item> <el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div>
</div> </div>
</div> </el-header>
<!-- <div class="logo">--> <el-main>
<!-- <img :src="logo" />--> <nav-menu></nav-menu>
<!-- </div>--> <div class="sub-container" style="margin-left: 60px">
</div> <div class="container-box">
<!-- <com-header></com-header>--> <router-view/>
<div class="container-box"> </div>
<router-view /> </div>
</div> </el-main>
</el-container>
</div> </div>
</div> <div class="content-box" v-else>
<el-container>
<el-header>
<div>
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
</div>
<div style="float: right; margin-right: 20px;">
<div class="user-info">
<el-dropdown
trigger="click"
@command="handleCommand"
>
<div class="user-box">
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #000;">&#xe69b;</span>
<span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
<i style="color: #000;" class="el-icon-arrow-down"/>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</el-header>
<el-main>
<nav-menu></nav-menu>
<div class="sub-container" style="margin-left: 200px">
<!-- <div style="background-color: #0068B7; height: 65px; width: 100%">
<span style="color: #fff; line-height: 65px; float: left; font-size: 20px; font-weight: 600;">
标准法规管理系统 Standard and Regulation Management System
</span>
header头部 右侧内容 当前登录人和退出
<div class="header-right" style="display: inline-block; float: right; margin-right: 20px; color: #fff">
<div class="user-info">
<el-dropdown
trigger="click"
@command="handleCommand"
>
<div class="user-box" style="margin-top: 23px;">
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #FFFFFF;">&#xe69b;</span>
<span style="color: #FFFFFF;">{{ $store.getters.userInfo.uName }}</span>
<i style="color: #FFFFFF;" class="el-icon-arrow-down"/>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<div class="logo">
<img :src="logo" />
</div>
</div>
<com-header></com-header>-->
<div class="container-box">
<router-view/>
</div>
</div>
</el-main>
</el-container>
</div>
</span>
</div> </div>
</template> </template>
<script> <script>
import {mapGetters, mapState} from 'vuex' import {mapGetters, mapState} from 'vuex'
import { webLoginType } from '@/sysConfig' import {webLoginType} from '@/sysConfig'
export default { export default {
name: 'App', name: 'App',
data () { data() {
return { return {
isBoolean: false isBoolean: false
} }
}, },
methods: { methods: {
// 点击下拉选项事件 // 点击下拉选项事件
handleCommand (command) { handleCommand(command) {
// 退出登录 // 退出登录
if (command === 'loginOut') { if (command === 'loginOut') {
this.$confirm('您确认要退出吗?', '提示', { this.$confirm('您确认要退出吗?', '提示', {
@@ -62,19 +132,20 @@ export default {
confirmButtonClass: 'common-button-primary', confirmButtonClass: 'common-button-primary',
roundButton: false roundButton: false
}).then(() => { }).then(() => {
if(webLoginType != null && webLoginType === 'idm' ) { if (webLoginType != null && webLoginType === 'idm') {
window.location.href= 'http://sso.foton.com.cn/logout?service=' window.location.href = 'http://sso.foton.com.cn/logout?service='
// this.$http.post('logout', {}, res => { // this.$http.post('logout', {}, res => {
// window.location.href= 'http://testsso1.foton.com.cn/logout?service=' // window.location.href= 'http://testsso1.foton.com.cn/logout?service='
// }) // })
}else if(webLoginType != null && webLoginType === 'dev'){ } else if (webLoginType != null && webLoginType === 'dev') {
this.$store.commit('setTypeFlag', 'loginOut') this.$store.commit('setTypeFlag', 'loginOut')
this.$http.get('logout', {}, { this.$http.get('logout', {}, {
_this: this _this: this
}, res => { }, res => {
this.$store.dispatch('logout') this.$store.dispatch('logout')
this.$router.push('/login') this.$router.push('/login')
}, e => {}) }, e => {
})
} }
// this.$http.post('/logout', {}, res => { // this.$http.post('/logout', {}, res => {
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code' // window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
@@ -96,7 +167,7 @@ export default {
* @author: xx * @author: xx
* @date: 2018-08-29 14:56:39 * @date: 2018-08-29 14:56:39
*/ */
setTheme (theme) { setTheme(theme) {
document.getElementById('app').className = theme document.getElementById('app').className = theme
}, },
@@ -108,32 +179,32 @@ export default {
banBackSpace(e) { banBackSpace(e) {
var ev = e || window.event; var ev = e || window.event;
//各种浏览器下获取事件对象 //各种浏览器下获取事件对象
var obj = ev.relatedTarget || ev.srcElement || ev.target ||ev.currentTarget; var obj = ev.relatedTarget || ev.srcElement || ev.target || ev.currentTarget;
//按下Backspace键 //按下Backspace键
if(ev.keyCode == 8){ if (ev.keyCode == 8) {
var tagName = obj.nodeName //标签名称 var tagName = obj.nodeName //标签名称
//如果标签不是input或者textarea则阻止Backspace //如果标签不是input或者textarea则阻止Backspace
if(tagName!='INPUT' && tagName!='TEXTAREA'){ if (tagName != 'INPUT' && tagName != 'TEXTAREA') {
return this.stopIt(ev); return this.stopIt(ev);
} }
var tagType = obj.type.toUpperCase();//标签类型 var tagType = obj.type.toUpperCase();//标签类型
//input标签除了下面几种类型,全部阻止Backspace //input标签除了下面几种类型,全部阻止Backspace
if(tagName=='INPUT' && (tagType!='TEXT' && tagType!='TEXTAREA' && tagType!='PASSWORD')){ if (tagName == 'INPUT' && (tagType != 'TEXT' && tagType != 'TEXTAREA' && tagType != 'PASSWORD')) {
return this.stopIt(ev); return this.stopIt(ev);
} }
//input或者textarea输入框如果不可编辑则阻止Backspace //input或者textarea输入框如果不可编辑则阻止Backspace
if((tagName=='INPUT' || tagName=='TEXTAREA') && (obj.readOnly==true || obj.disabled ==true)){ if ((tagName == 'INPUT' || tagName == 'TEXTAREA') && (obj.readOnly == true || obj.disabled == true)) {
return this.stopIt(ev); return this.stopIt(ev);
} }
} }
}, },
stopIt(ev) { stopIt(ev) {
if(ev.preventDefault){ if (ev.preventDefault) {
//preventDefault()方法阻止元素发生默认的行为 //preventDefault()方法阻止元素发生默认的行为
ev.preventDefault(); ev.preventDefault();
} }
if(ev.returnValue){ if (ev.returnValue) {
//IE浏览器下用window.event.returnValue = false;实现阻止元素发生默认的行为 //IE浏览器下用window.event.returnValue = false;实现阻止元素发生默认的行为
ev.returnValue = false; ev.returnValue = false;
} }
@@ -148,25 +219,25 @@ export default {
}, },
computed: { computed: {
// 获取用户头像 // 获取用户头像
userAvator () { userAvator() {
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png') return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
}, },
...mapGetters([ ...mapGetters([
'getWebSocketList', 'getTheme', 'getMenuList' 'getWebSocketList', 'getTheme', 'getMenuList'
]), ]),
...mapState(['userInfoModifyTime','isCollapse']) ...mapState(['userInfoModifyTime', 'isCollapse'])
}, },
watch: { watch: {
// 'userInfoModifyTime'() { // 'userInfoModifyTime'() {
// // console.log('watch global, userInfoModifyTime') // // console.log('watch global, userInfoModifyTime')
// this.refresh() // this.refresh()
// }, // },
getTheme (val) { getTheme(val) {
// 主题修改 // 主题修改
this.setTheme(val) this.setTheme(val)
}, },
// 监听路由 控制isBoolean // 监听路由 控制isBoolean
$route () { $route() {
if (this.$route.name !== 'Login' && this.$route.name !== 'Home' && !this.$route.meta.isBoolean && this.$route.name !== 'beeEChungLogin' && this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin' && this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin' && this.$route.name !== 'StandardSearch') { if (this.$route.name !== 'Login' && this.$route.name !== 'Home' && !this.$route.meta.isBoolean && this.$route.name !== 'beeEChungLogin' && this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin' && this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin' && this.$route.name !== 'StandardSearch') {
this.isBoolean = true this.isBoolean = true
} else { } else {
@@ -174,7 +245,7 @@ export default {
} }
} }
}, },
mounted () { mounted() {
this.setTheme(this.getTheme) this.setTheme(this.getTheme)
//实现对字符码的截获,keypress中屏蔽了这些功能按键 //实现对字符码的截获,keypress中屏蔽了这些功能按键
document.onkeypress = this.banBackSpace document.onkeypress = this.banBackSpace
@@ -195,7 +266,9 @@ export default {
this.$store.dispatch('syncStorageData') this.$store.dispatch('syncStorageData')
const currentPage = this.$route.name const currentPage = this.$route.name
if (currentPage === 'Login') {return} if (currentPage === 'Login') {
return
}
this.currentMinute = 3 this.currentMinute = 3
this.loading && this.loading.close() this.loading && this.loading.close()
this.loading = this.$loading({ this.loading = this.$loading({
@@ -285,35 +358,45 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: hidden;
background-color: #F0F2F5; background-color: #F0F2F5;
//background: url('~@/assets/images/shangqi/home/BG.png') no-repeat; //background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
font-family: MicrosoftYaHei,微软雅黑; font-family: MicrosoftYaHei, 微软雅黑;
& > div{
& > div {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
} }
.el-main {
padding: 10px 10px 0 10px;
}
.content-box { .content-box {
display: flex; display: flex;
height: 100%; height: 100%;
.el-header {
padding: 0;
}
.sub-container { .sub-container {
height: 100%; height: 100%;
flex: 1; flex: 1;
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.container-box { .container-box {
position: relative; position: relative;
height: calc(~'100% - 65px'); height: calc(~'100% - 10px');
//flex: 1; //flex: 1;
background: #F4F4F4; background: #F4F4F4;
overflow-y: auto; overflow-y: auto;
padding: 10px 0 10px 0;
//padding: 10px 10px 0;
.pagination { .pagination {
border-top: 1px solid #f4f4f4; border-top: 1px solid #f4f4f4;
width: calc(~'100% - 20px'); width: calc(~'100% - 20px');
@@ -322,7 +405,8 @@ export default {
} }
} }
} }
/deep/.el-menu--vertical {
/deep/ .el-menu--vertical {
background: red; background: red;
} }
} }
+110 -11
View File
@@ -138,7 +138,7 @@ export function CgfyDetail(data) {
export function CgfysEdit (data) { export function CgfysEdit (data) {
return axios({ return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/modCgfy', url: 'api/wgdCensusLeo/wgd-cgfy/modCgfy',
method: 'get', method: 'post',
params: data params: data
}) })
} }
@@ -146,15 +146,7 @@ export function CgfysEdit (data) {
export function CgfysAdd (data) { export function CgfysAdd (data) {
return axios({ return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/addCgfy', url: 'api/wgdCensusLeo/wgd-cgfy/addCgfy',
method: 'get', method: 'post',
params: data
})
}
// 单条删除
export function CgfysDelOne (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/delCgfy',
method: 'get',
params: data params: data
}) })
} }
@@ -162,8 +154,115 @@ export function CgfysDelOne (data) {
export function CgfysDelMore (data) { export function CgfysDelMore (data) {
return axios({ return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/delCgfys', url: 'api/wgdCensusLeo/wgd-cgfy/delCgfys',
method: 'post',
params: data
})
}
/** 翻译费用信息统计 */
// 查询
export function fyQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/queryAllFyfys',
method: 'get', method: 'get',
params: data params: data
}) })
} }
// 查看
export function fyDetail (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/getFyfyById',
method: 'get',
params: data
})
}
// 编辑
export function fyEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/modFyfy',
method: 'post',
params: data
})
}
// 新增
export function fyAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/addFyfy',
method: 'post',
params: data
})
}
// 删除
// 查看
export function fyDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/delFyfys',
method: 'post',
params: data
})
}
/** 资金收支统计(收入) */
// 查询
export function inComeQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/queryAllSrbs',
method: 'get',
params: data
})
}
// 编辑
export function inComeEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/modSrb',
method: 'post',
params: data
})
}
// 新增
export function inComeAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/addSrb',
method: 'post',
params: data
})
}
// 删除
export function inComeDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/delSrbs',
method: 'post',
params: data
})
}
/** 资金收支统计(支出) */
// 查询
export function exportQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/queryAllZcbs',
method: 'get',
params: data
})
}
// 编辑
export function exportEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/modZcb',
method: 'post',
params: data
})
}
// 新增
export function exportAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/addZcb',
method: 'post',
params: data
})
}
// 删除
export function exportDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/delZcbs',
method: 'post',
params: data
})
}
+5
View File
@@ -389,3 +389,8 @@
.clearfix{ .clearfix{
*zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/ *zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
} }
.el-button--primary {
background-color: #4788c0 ;
border-color: #3986c9
}
+30 -30
View File
@@ -1,13 +1,13 @@
<!--左侧导航菜单 liuyan --> <!--左侧导航菜单 liuyan -->
<template> <template>
<div class="nav-menu v-class" :class="{'is-collapse': isCollapse}"> <div class="nav-menu v-class" :class="{'is-collapse': isCollapse}">
<div class="nav-menu-header" style="height: 65px; background-color: #0068B7;"> <!-- <div class="nav-menu-header" style="height: 65px; background-color: #4788c0;">
<div class="header-left"> <div class="header-left">
<div class="logo"> <div class="logo">
<img :src="logo" height="58" width="149" /> <img :src="logo" height="58" width="149" />
</div> </div>
</div> </div>
</div> </div>-->
<!-- <div class="toggle-btn el-icon-s-fold" v-if="isCollapse === false" style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">--> <!-- <div class="toggle-btn el-icon-s-fold" v-if="isCollapse === false" style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">-->
<!-- <div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div><i class=""></i></div>--> <!-- <div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div><i class=""></i></div>-->
<!-- <div class="toggle-btn el-icon-s-unfold" v-else style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">--> <!-- <div class="toggle-btn el-icon-s-unfold" v-else style="margin: 10px 0; display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar">-->
@@ -16,7 +16,7 @@
<el-menu <el-menu
unique-opened unique-opened
:default-active="defaultActive" :default-active="defaultActive"
background-color="#0068B7" background-color="#4788c0"
text-color="#fff" text-color="#fff"
active-text-color="#000" active-text-color="#000"
router router
@@ -40,6 +40,7 @@
v-for="(children, childrenIndex) in item.children" v-for="(children, childrenIndex) in item.children"
:key="childrenIndex" :key="childrenIndex"
:index="children.path" :index="children.path"
style="text-align: center;"
v-if="!children.menuId || $hasPermission(children.menuId)"itemSplitInfo v-if="!children.menuId || $hasPermission(children.menuId)"itemSplitInfo
> >
<el-badge :value="getDynamicTotal.msgCount" class="item" v-if="children.title === '我的消息' && getDynamicTotal.msgCount !== 0"> <el-badge :value="getDynamicTotal.msgCount" class="item" v-if="children.title === '我的消息' && getDynamicTotal.msgCount !== 0">
@@ -69,8 +70,8 @@
</div> </div>
<div class="tree-collapse" @click="handleToggleSideBar" :class="{ 'tree-close': isCollapse }"> <div class="tree-collapse" @click="handleToggleSideBar" :class="{ 'tree-close': isCollapse }">
<!--切换折叠样式--> <!--切换折叠样式-->
<i class="el-icon-arrow-left" style="font-weight: 600; font-size: 16px;" v-if="isCollapse === false"></i> <i class="el-icon-arrow-left" style="font-weight: 600; font-size: 16px;margin-top: 300px;" v-if="isCollapse === false"></i>
<i class="el-icon-arrow-right" style="font-weight: 600; font-size: 16px;" v-if="isCollapse === true"></i> <i class="el-icon-arrow-right" style="font-weight: 600; font-size: 16px;margin-top: 300px;" v-if="isCollapse === true"></i>
</div> </div>
</div> </div>
</template> </template>
@@ -116,7 +117,7 @@ export default {
// menuId: 'ad9db496772c075f78495382b7581fe9' // menuId: 'ad9db496772c075f78495382b7581fe9'
// }, // },
{ {
title: '标准法规工作组数据统计', title: '工作组数据统计',
path: '/dataStatisComments', path: '/dataStatisComments',
menuId: '' menuId: ''
}, },
@@ -517,35 +518,31 @@ export default {
} }
.el-menu--collapse { .el-menu--collapse {
.is-active { .is-active {
background-color: #fff !important; background-color: #697178 !important;
.shangqi-icon { .shangqi-icon {
color: #0068B7 !important; color: #fff !important;
} }
color: #0068B7 !important; color: #697178 !important;
} }
} }
.nav-menu { .nav-menu {
width: 58px; width: 58px;
height: 100%; height: 90%;
overflow-y: auto; overflow-y: auto;
user-select: none; user-select: none;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: absolute;
background: rgb(255, 255, 255); background: #697178;
background-size: 100% 100%; background-size: 100% 100%;
/deep/.el-tooltip { /deep/.el-tooltip {
padding: 0px 16px !important; padding: 0px 16px !important;
} }
.left-tree {
height: calc(~'100% - 115px');
overflow-y: auto;
}
.left-tree::-webkit-scrollbar { .left-tree::-webkit-scrollbar {
display: none; display: none;
} }
&:not(.is-collapse) { &:not(.is-collapse) {
width: 180px; width: 200px;
background: #0068B7; background: #697178;
background-size: 100% 100%; background-size: 100% 100%;
.logo { .logo {
padding: 10px; padding: 10px;
@@ -558,18 +555,18 @@ export default {
} }
} }
.tree-collapse{ .tree-collapse{
display: inline-block;
position: absolute; position: absolute;
right: 0; right: 0;
top: 65px; top: 0px;
display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 15px; width: 15px;
height: calc(100% - 65px); min-height: 140%;
background: #EEE; background: #EEE;
cursor: pointer; cursor: pointer;
&:hover{ &:hover{
background-color: #3391CE; background-color: #f0f2f5;
} }
} }
.logo{ .logo{
@@ -584,8 +581,8 @@ export default {
/*background:url("../../assets/images/shangqi/home/logo3.png");*/ /*background:url("../../assets/images/shangqi/home/logo3.png");*/
} }
/deep/:not(.is-collapse) .el-menu-item.is-active{ /deep/:not(.is-collapse) .el-menu-item.is-active{
background: #fff !important; background: #4788c0 !important;
color: #0068B7 !important; color: #fff !important;
} }
} }
.has-no-read{ .has-no-read{
@@ -608,7 +605,7 @@ export default {
/* }*/ /* }*/
/*}*/ /*}*/
.is-active /deep/.shangqi-icon { .is-active /deep/.shangqi-icon {
color: #0068B7; color: #fff;
} }
/deep/.el-submenu__title i { /deep/.el-submenu__title i {
color: #fff; color: #fff;
@@ -617,7 +614,7 @@ export default {
color: #fff; color: #fff;
} }
.nav-menu{ .nav-menu{
background-color: #0068B7; background-color: #697178;
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; /* IE 10+ */ -ms-overflow-style: none; /* IE 10+ */
} }
@@ -629,19 +626,19 @@ export default {
} }
.nav-menu-popper .el-menu .el-menu-item.is-active { .nav-menu-popper .el-menu .el-menu-item.is-active {
background-color: #fff !important; background-color: #fff !important;
color: #0068B7 !important; color: #4788c0 !important;
font-weight: bold; font-weight: bold;
} }
.nav-menu-popper .el-menu .el-menu-item:hover { .nav-menu-popper .el-menu .el-menu-item:hover {
background-color: #fff !important; background-color: #697178 !important;
color: #0068B7 !important; color: #fff !important;
font-weight: bold; font-weight: bold;
} }
.el-menu-item { .el-menu-item {
padding: 0 16px !important;
span { span {
margin-left: 5px; margin-left: 5px;
font-weight: normal;
} }
.shangqi-icon { .shangqi-icon {
display: inline-block; display: inline-block;
@@ -671,6 +668,9 @@ export default {
} }
} }
.el-submenu { .el-submenu {
.is-opened {
background-color: red;
}
/deep/.el-submenu__title { /deep/.el-submenu__title {
padding: 0 16px !important; padding: 0 16px !important;
span { span {
+45 -4
View File
@@ -1,8 +1,12 @@
<template> <template>
<div @click="toPage"> <div @click="toPage">
<div> <div>
<div v-if="label"> <div v-if="label" class="icon-style">
<span class="card-font">{{ label }}</span> <span v-for="item in icons" v-if="item.label === label" :class="item.icon">
<span style="padding-left: 10px">
{{ label }}
</span>
</span>
</div> </div>
<div v-else> <div v-else>
<div class="labelNull"> <div class="labelNull">
@@ -17,7 +21,43 @@
export default { export default {
name: 'EnterCard', name: 'EnterCard',
props: ['icon', 'label', 'path'], props: ['icon', 'label', 'path'],
data () {
return {
icons: [],
iconList: ['el-icon-help','el-icon-s-order',
'el-icon-document-remove','el-icon-document-checked',
'el-icon-folder','el-icon-notebook-2',
'el-icon-bangzhu','el-icon-reading'],
iconInfo: [],
}
},
mounted() {
this.getData()
},
methods: { methods: {
getData (){
this.$http.get('/sarPersonalCenter/sar-user-personal-menu/getList',
{
userId: this.$store.getters.userInfo.userId
}, {_this: this}, res => {
if (res.ok) {
res.data.records.forEach(item => {
this.icons.push({
label: item.menuName,
icon: ''
})
})
}
this.icons.forEach((item,index)=>{
if (index > this.iconList.length) {
let i = index % this.iconList.length
item.icon = this.iconList[i]
} else {
item.icon = this.iconList[index]
}
})
})
},
toPage() { toPage() {
this.$router.push(this.path) this.$router.push(this.path)
} }
@@ -40,13 +80,14 @@
border-radius: 5px; border-radius: 5px;
width: 100%; width: 100%;
height: 70px; height: 70px;
background-color: #99BEDB; color: #fff;
background-color: #4788c0;
} }
} }
.wx-card:hover { .wx-card:hover {
& > div { & > div {
color: #fff; color: #fff;
background-color: #0068B7; background-color: #3a8ee6;
} }
} }
.wx-card1 { .wx-card1 {
+94 -6
View File
@@ -1,13 +1,91 @@
<!-- 尾部链接 --> <!-- 尾部链接 -->
<template> <template>
<div class="link" id="link"> <div class="link" id="link">
<!-- 此部分暂时这样写到后面做修改 -->
<div style="display: inline-block;width: 15%;">
<span class="title borderRight">友情链接</span>
</div>
<div style="display: inline-block;width: 80%;text-align: center">
<div> <div>
<span class="title borderRight">友情链接</span> <el-row>
<el-col :span="4">
<a style="color: #0068B7;" href="http://www.sac.gov.cn/">国标委</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://www.catarc.org.cn/">汽标委</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://openstd.samr.gov.cn/bzgk/gb/index">国标全文公开</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://std.samr.gov.cn/">全国标准信息公共服务</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="http://jtst.mot.gov.cn/">交通部标准信息</a>
</el-col>
</el-row>
</div>
<div>
<el-row>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.un.org/zh/aboutun/structure/unece/">欧洲经济委员会</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://eur-lex.europa.eu">欧盟</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.interregs.com/">InterRegs </a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://tbt.sist.org.cn/cslm/wtotbttb/">WTO/TBT通报</a>
</el-col>
<el-col :span="1">
<span class="borderMiddle"></span>
</el-col>
<el-col :span="4">
<a style="color: #0068B7;" href="https://www.iso.org/home.html">ISO</a>
</el-col>
</el-row>
</div>
</div>
<div style="display: inline-block;width: 15%;">
<span class="borderLeft"></span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span></div>
<!-- <div>
<span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" > <span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" >
{{ link.name }} {{ link.name }}
</span> </span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span> <span class="myLi1" @click="$router.push('linkManage')">更多链接 </span>
</div> </div>
<div v-show="false">
<span class="myLi1 borderRight" v-for="(link, index) in linkList" :key="index" @click="openLinkUrl(link.url)" :title="link.name" >
{{ link.name }}
</span>
<span class="myLi1" @click="$router.push('linkManage')">更多链接 </span>
</div>-->
</div> </div>
</template> </template>
@@ -70,6 +148,7 @@
} }
let list let list
list = res.data.slice(0, c) list = res.data.slice(0, c)
console.log(list)
this.linkList = list this.linkList = list
}) })
} }
@@ -85,16 +164,25 @@
border-radius: 3px; border-radius: 3px;
height: 100%; height: 100%;
align-items: center; align-items: center;
justify-content: space-around;
box-shadow: 1px 1px 10px rgba(0,0,0,0.1); box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
.borderRight { .borderRight {
padding-right: 30px; //padding-right: 50px;
margin-right: 30px; //margin-right: 50px;
border-right: 2px dotted #aaa; border-right: 2px dotted #aaa;
} }
.borderLeft {
margin-right: 50px;
//padding-left: 50px;
//margin-left: 50px;
border-left: 2px dotted #aaa;
}
.borderMiddle {
border-left: 2px dotted #aaa;
}
.title { .title {
padding-right: 50px;
font-weight: bold; font-weight: bold;
padding-left: 10px; padding-left: 40px;
width: 80px; width: 80px;
} }
.myLi1 { .myLi1 {
@@ -105,7 +105,7 @@ export default {
width: 18vm; width: 18vm;
height: 40px; height: 40px;
color: #333333; color: #333333;
font-size: 13px; font-size: 14px;
border: 0; border: 0;
border-radius: 3px; border-radius: 3px;
background-color: #FFFFFF; background-color: #FFFFFF;
@@ -1289,10 +1289,10 @@ export default {
} }
.more { .more {
float: right; float: right;
color: #5ea9f6; color: #4788c0;
margin: 15px 15px; margin: 15px 15px;
&:hover { &:hover {
color: #5ea9f6; color: #3a8ee6;
cursor: pointer; cursor: pointer;
} }
} }
+8 -5
View File
@@ -28,10 +28,10 @@
<todo-list></todo-list> <todo-list></todo-list>
</div> </div>
</div> </div>
<div calss="home_footer"> <div calss="home_footer" style="padding: 0">
<div class="footer"> <el-card class="footer">
<Empennage></Empennage> <Empennage></Empennage>
</div> </el-card>
</div> </div>
</div> </div>
</template> </template>
@@ -182,9 +182,12 @@ export default {
} }
} }
} }
/deep/.el-card__body {
padding: 0;
}
.footer { .footer {
height: 49px; height: 90px;
line-height: 49px; line-height: 44px;
//margin-top: 0.3vh; //margin-top: 0.3vh;
//line-height: 5.2vh; //line-height: 5.2vh;
background: #FFFFFF; background: #FFFFFF;
+1 -1
View File
@@ -73,7 +73,7 @@
</div> </div>
<div class="content_text"> <div class="content_text">
<span>会议附件 : <span>会议附件 :
<span v-if="item.files.length === '0'">{{ '-' }}</span> <span v-if="item.files.length === 0">{{ '-' }}</span>
<span v-for="res in item.files" :key="res.id" style="color: #409EFF;" @click="previews(res.id)"> <span v-for="res in item.files" :key="res.id" style="color: #409EFF;" @click="previews(res.id)">
{{ res.name }} {{ ';'}} {{ res.name }} {{ ';'}}
</span> </span>
@@ -128,7 +128,7 @@
<h4>责任部门对接人</h4> <h4>责任部门对接人</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.dockUserList" style="display: none;"></el-input> <el-input v-model="roleForm.dockUserList" style="display: none;"></el-input>
<el-input v-model="roleForm.dockUserName" placeholder="选择责任人" @click.native="choiceZRRS"> <el-input v-model="roleForm.dockUserName" :title="roleForm.dockUserName" placeholder="选择责任人" readonly="readonly" @click.native="choiceZRRS">
</el-input> </el-input>
</div> </div>
</el-form-item> </el-form-item>
@@ -140,7 +140,7 @@
<h4>标准法规部部长</h4> <h4>标准法规部部长</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.ministerUser" style="display: none;"></el-input> <el-input v-model="roleForm.ministerUser" style="display: none;"></el-input>
<el-input v-model="roleForm.ministerUserName" placeholder="选择标准法规部部长" @click.native="choiceZRR('ministerUser', '选择标准法规部部长', roleForm.ministerUser)"></el-input> <el-input v-model="roleForm.ministerUserName" placeholder="选择标准法规部部长" readonly="readonly" @click.native="choiceZRR('ministerUser', '选择标准法规部部长', roleForm.ministerUser)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
@@ -151,7 +151,7 @@
<h4>技术管理中心主任</h4> <h4>技术管理中心主任</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.directorUser" style="display: none;"></el-input> <el-input v-model="roleForm.directorUser" style="display: none;"></el-input>
<el-input v-model="roleForm.directorUserName" placeholder="选择技术管理中心主任" @click.native="choiceZRR('directorUser', '选择技术管理中心主任', roleForm.directorUser)"></el-input> <el-input v-model="roleForm.directorUserName" placeholder="选择技术管理中心主任" readonly="readonly" @click.native="choiceZRR('directorUser', '选择技术管理中心主任', roleForm.directorUser)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
@@ -162,7 +162,7 @@
<h4>工程研究总院院长</h4> <h4>工程研究总院院长</h4>
<div style="margin-top: 10px;width: 300px;"> <div style="margin-top: 10px;width: 300px;">
<el-input v-model="roleForm.presidentUser" style="display: none;"></el-input> <el-input v-model="roleForm.presidentUser" style="display: none;"></el-input>
<el-input v-model="roleForm.presidentUserName" placeholder="选择工程研究总院院长" @click.native="choiceZRR('presidentUser', '选择工程研究总院院长', roleForm.presidentUser)"></el-input> <el-input v-model="roleForm.presidentUserName" placeholder="选择工程研究总院院长" readonly="readonly" @click.native="choiceZRR('presidentUser', '选择工程研究总院院长', roleForm.presidentUser)"></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-card> </el-card>
@@ -347,12 +347,15 @@ export default {
upload(row, title) { upload(row, title) {
var params = { var params = {
columnName: { columnName: {
chapterNumber: '章条编号', chapterNumber: "章条编号",
chapterName: '章节名称', chapterName: "章节名称",
commentText: '修改意见内容(包括理由或依据)', commentText: "修改意见内容(包括理由或依据)",
department: '提出部门', oldText: "修改前",
responUserName: '提出人', newText: "修改后",
stateText: '处理意见' reason: "修改理由",
department: "提出部门",
responUserName: "提出人",
stateText: "处理意见"
}, },
dataList: [] dataList: []
} }
@@ -347,12 +347,15 @@ export default {
upload(row, title) { upload(row, title) {
var params = { var params = {
columnName: { columnName: {
chapterNumber: '章条编号', chapterNumber: "章条编号",
chapterName: '章节名称', chapterName: "章节名称",
commentText: '修改意见内容(包括理由或依据)', commentText: "修改意见内容(包括理由或依据)",
department: '提出部门', oldText: "修改前",
responUserName: '提出人', newText: "修改后",
stateText: '处理意见' reason: "修改理由",
department: "提出部门",
responUserName: "提出人",
stateText: "处理意见"
}, },
dataList: [] dataList: []
} }
@@ -350,6 +350,9 @@ export default {
chapterNumber: "章条编号", chapterNumber: "章条编号",
chapterName: "章节名称", chapterName: "章节名称",
commentText: "修改意见内容(包括理由或依据)", commentText: "修改意见内容(包括理由或依据)",
oldText: "修改前",
newText: "修改后",
reason: "修改理由",
department: "提出部门", department: "提出部门",
responUserName: "提出人", responUserName: "提出人",
stateText: "处理意见" stateText: "处理意见"
@@ -14,12 +14,12 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button> <el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" onclick="">清空</el-button> <el-button type="" size="small" onclick="">清空</el-button>
</el-form-item> </el-form-item>
<el-divider/> <el-divider/>
<div style="float: left"> <div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button> <el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button> <el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button> <el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button> <el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -61,7 +61,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="payMoney" prop="money"
label="支出金额"> label="支出金额">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -71,8 +71,16 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="detailAnnex" prop="annex"
show-overflow-tooltip
label="详细附件"> label="详细附件">
<template slot-scope="scope">
<span v-if="scope.row.annex.length === 0">{{ '-' }}</span>
<span v-for="res in scope.row.annex" :key="res.id" style="color: #409EFF;">
{{ res.name }} {{ ';'}}
</span>
<!--<el-button size="mini" type="primary" @click="fileDetail(scope.row)"></el-button>-->
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right"> <el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -111,26 +119,53 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="支出金额"> <el-form-item label="支出金额">
<el-input v-model="formShowData.payMoney" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.money" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用途"> <el-form-item label="用途">
<el-input v-model="formShowData.use" type="text" placeholder="请填写"> <el-input v-model="formShowData.use" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="详细附件"> <el-form-item label="详细附件">
<el-input v-model="formShowData.detailAnnex" type="text"> <el-input v-model="formShowData.annex" type="text">
</el-input> </el-input>
<el-upload
:disabled="acceptShow"
multiple
ref="uploadFile"
:action="actionPath"
name="file"
:file-list="annexList"
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
:before-upload="handleBeforeUpload"
:before-remove="handleBeforeRemove"
:on-success="handleOnsuccess"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="demo-drawer-footer"> <div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button> <el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button> <el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
<el-dialog
:visible.sync="annexDialog"
width="30%"
:before-close="handleClose">
<el-upload
:action="''"
name="file"
:file-list="annexList"
:on-preview="handleOnPreview"
>
</el-upload>
</el-dialog>
<!-- <div> <!-- <div>
&lt;!&ndash; 导入弹框 &ndash;&gt; &lt;!&ndash; 导入弹框 &ndash;&gt;
<el-dialog <el-dialog
@@ -149,6 +184,7 @@
</template> </template>
<script> <script>
import { exportQuery, exportEdit, exportAdd, exportDel } from '@/api/statisticsApi'
export default { export default {
name: "child2", name: "child2",
data() { data() {
@@ -166,15 +202,24 @@ export default {
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
formShowData: { formShowData: {
id: '',
name: '', name: '',
payMoney: '', money: '',
use: '', use: '',
detailAnnex: '' annex: ''
}, },
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {}, formRules: {},
submitLoading: false,
// 上传路径
actionPath: 'api/att/attFile/upload',
acceptShow: false,
annexDialog: false,
annexList: [],
} }
}, },
@@ -183,14 +228,102 @@ export default {
}, },
methods: { methods: {
getTableData() {
exportQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
//新增方法 //新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 查询按钮
queryData() {
this.getTableData()
},
//清空
resetForm() {
this.formQuery = {}
this.getTableData()
},
// 提交按钮
submit() { submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
exportAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
exportEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
}, },
//删除方法 //删除方法
deleteDetail() { deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
exportDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
}, },
// 列表更多按钮 // 列表更多按钮
handleCommand(command) { handleCommand(command) {
@@ -199,13 +332,48 @@ export default {
this.editRowOne(command[0]); this.editRowOne(command[0]);
break; break;
case "删除": case "删除":
this.deleteRowOne("delOne", command[0].id); this.deleteRowOne(command[0].id);
break; break;
} }
}, },
editRowOne() { editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
name: item.name,
money: item.money,
use: item.use,
annex: item.annex
}
this.drawerTable = true
}, },
deleteRowOne() { deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
exportDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}, },
/** 分页 */ /** 分页 */
pageChange(page) { pageChange(page) {
@@ -216,6 +384,81 @@ export default {
this.formQuery.pageSize = pageSize this.formQuery.pageSize = pageSize
this.getTableData() this.getTableData()
}, },
/** 附件详情 */
fileDetail(val) {
this.tableFile = val
this.annexList = this.tableFile.annex
this.annexDialog = true
this.acceptShow = true
},
// 文件上传成功
handleOnsuccess(res, file, fileList) {
if (res.ok) {
if (this.annexList !== undefined) {
this.newDataList = this.annexList
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
} else {
this.newDataList.push({
id: res.data.attId,
name: res.data.standName
})
}
this.tableFile.annex = this.newDataList
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
this.newDataList = []
this.fileMadel = false
}
},
// 移除上传的文件
handleBeforeRemove(file, fileList) {
this.annexList.forEach((item, index) => {
if (item.name === file.name || item.id === file.id ) {
this.annexList.splice(index,1)
}
})
this.tableFile.annex = this.annexList
},
// 文件上传限制条件
handleBeforeUpload(file) {
var filename = file.name
var index1 = filename.lastIndexOf('.')
var index2 = filename.length
var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式
if (fileSuffix === '.ZIP' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.zip' || fileSuffix === '.xls' || fileSuffix === '.xlsx') {
return true
} else {
this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传ZIP/DOCX或XLS文件')
return false
}
// 判断文件上传大小
// eslint-disable-next-line no-unreachable
if (file.size / 1024 / 1024 <= 200) {
return true
} else {
this.$message.error('文件' + file.name + '大小不超过200M')
return false
}
return true
},
// 点击上传的文件进行下载
handleOnPreview(file) {
let attId = file.id
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
}
},
} }
} }
</script> </script>
@@ -7,18 +7,18 @@
<el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称"></el-input> <el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准编号"> <el-form-item label="标准编号">
<el-input v-model="formQuery.num" size="small" placeholder="请输入标准编号"></el-input> <el-input v-model="formQuery.number" size="small" placeholder="请输入标准编号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="补助来源"> <el-form-item label="补助来源">
<el-input v-model="formQuery.source" size="small" placeholder="请输入补助来源"></el-input> <el-input v-model="formQuery.source" size="small" placeholder="请输入补助来源"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="">查询</el-button> <el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button> <el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item> </el-form-item>
<el-divider/> <el-divider/>
<div style="float: left"> <div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button> <el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button> <el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button> <el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button> <el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="num" prop="number"
label="标准编号"> label="标准编号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -66,13 +66,16 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="money" prop="cost"
label="补助金额"> label="补助金额">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="time" prop="time"
label="入账时间"> label="入账时间">
<template slot-scope="scope">
{{ scope.row.time ? $moment(scope.row.time).format("YYYY-MM-DD HH:mm:ss") : '' }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right"> <el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -111,25 +114,30 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准编号"> <el-form-item label="标准编号">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="补助来源"> <el-form-item label="补助来源">
<el-input v-model="formShowData.source" type="text" placeholder="请填写"> <el-input v-model="formShowData.source" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="补助金额"> <el-form-item label="补助金额">
<el-input v-model="formShowData.money" type="text" placeholder="请填写"> <el-input v-model="formShowData.cost" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="入账时间"> <el-form-item label="入账时间">
<el-input v-model="formShowData.time" type="text" placeholder="请填写"> <el-date-picker
</el-input> v-model="formShowData.time"
type="datetime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="demo-drawer-footer"> <div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button> <el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button> <el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
@@ -171,6 +179,7 @@
</template> </template>
<script> <script>
import { inComeQuery, inComeEdit, inComeAdd, inComeDel } from '@/api/statisticsApi'
export default { export default {
name: "child1", name: "child1",
data() { data() {
@@ -178,7 +187,7 @@ export default {
loading: false, loading: false,
formQuery: { formQuery: {
name: '', name: '',
num: '', number: '',
source: '', source: '',
current: 1, current: 1,
page: 1, page: 1,
@@ -188,33 +197,120 @@ export default {
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
formShowData: { formShowData: {
id: '',
name: '', name: '',
num: '', number: '',
source: '', source: '',
money: '', cost: '',
time: '' time: ''
}, },
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {}, formRules: {},
submitLoading: false
} }
}, },
created() { created() {
this.getTableData()
}, },
methods: { methods: {
getTableData() {
inComeQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
//新增方法 //新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 提交按钮
submit() { submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
inComeAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
inComeEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val
}, },
//删除方法 //删除方法
deleteDetail() { deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
inComeDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
}, },
//点击确定(编辑)(没出) // 查询按钮
handleSelectionChange() { queryData() {
this.getTableData()
}, },
//清空 //清空
resetForm(formName) { resetForm() {
this.formQuery = {}
this.getTableData()
}, },
// 列表更多按钮 // 列表更多按钮
handleCommand(command) { handleCommand(command) {
@@ -223,13 +319,50 @@ export default {
this.editRowOne(command[0]); this.editRowOne(command[0]);
break; break;
case "删除": case "删除":
this.deleteRowOne("delOne", command[0].id); this.deleteRowOne(command[0].id);
break; break;
} }
}, },
editRowOne() { editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
source: item.source,
cost: item.cost,
time: this.$moment(item.time).format('YYYY-MM-DD HH:mm:ss'),
}
this.drawerTable = true
}, },
deleteRowOne() { deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
inComeDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}, },
/** 分页 */ /** 分页 */
pageChange(page) { pageChange(page) {
@@ -116,7 +116,7 @@
:visible.sync="drawerTable"> :visible.sync="drawerTable">
<div style="margin: 10px;height: inherit"> <div style="margin: 10px;height: inherit">
<el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules"> <el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="类型"> <el-form-item label="类型" prop="type">
<el-select v-model="formShowData.type" type="text" placeholder="请填写"> <el-select v-model="formShowData.type" type="text" placeholder="请填写">
<el-option <el-option
v-for="item in typeOptions" v-for="item in typeOptions"
@@ -126,18 +126,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="项目编号"> <el-form-item label="项目编号" prop="proId">
<el-input v-model="formShowData.proId" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.proId" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目名称"> <el-form-item label="项目名称" prop="proName">
<el-input v-model="formShowData.proName" type="text" placeholder="请填写"> <el-input v-model="formShowData.proName" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用列支项"> <el-form-item label="费用列支项" prop="costOutlay">
<el-input v-model="formShowData.costOutlay" placeholder="请选择"> <el-input v-model="formShowData.costOutlay" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用支出"> <el-form-item label="费用支出" prop="cost">
<el-input v-model="formShowData.cost" placeholder="请选择"> <el-input v-model="formShowData.cost" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -193,7 +193,13 @@ export default {
}, },
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {}, formRules: {
type: [{ required: true, message: '请选择类型', trigger: 'blur' }],
proId: [{ required: true, message: '请填写项目编号', trigger: 'blur' }],
proName: [{ required: true, message: '请填写项目名称', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请填写费用列支项', trigger: 'blur' }],
cost: [{ required: true, message: '请填写费用支出', trigger: 'blur' }],
},
submitLoading: false, submitLoading: false,
typeOptions: [ typeOptions: [
@@ -381,7 +387,7 @@ export default {
position: inherit!important; position: inherit!important;
} }
.el-form-item { .el-form-item {
margin-bottom: 10px; margin-bottom: 20px;
} }
.el-divider--horizontal { .el-divider--horizontal {
@@ -7,19 +7,19 @@
<el-input v-model="formQuery.type" size="small" placeholder="请输入标准类型"></el-input> <el-input v-model="formQuery.type" size="small" placeholder="请输入标准类型"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准代号"> <el-form-item label="标准代号">
<el-input v-model="formQuery.num" size="small" placeholder="请输入标准代号"></el-input> <el-input v-model="formQuery.number" size="small" placeholder="请输入标准代号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准名称"> <el-form-item label="标准名称">
<el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称"> <el-input v-model="formQuery.name" size="small" placeholder="请输入标准名称">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button> <el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button> <el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item> </el-form-item>
<el-divider/> <el-divider/>
<div style="float: left"> <div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button> <el-button type="primary" size="small" @click="formDataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button> <el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button> <el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button> <el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -47,44 +47,33 @@
align="center" align="center"
type="index" type="index"
label="序号" label="序号"
width="50" width="50">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="type" prop="type"
label="标准类型" label="标准类型">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="num" prop="number"
label="标准代号" label="标准代号">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="name" prop="name"
label="标准名称" label="标准名称">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="pages" prop="pages"
label="页数" label="页数">
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="cost" prop="cost"
label="费用" label="费用">
>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right"> <el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -107,7 +96,7 @@
<loading :loading="loading">加载中...</loading> <loading :loading="loading">加载中...</loading>
<pagination <pagination
:page="formQuery.page" :page="formQuery.page"
:total="formQuery.tableTotal" :total="tableTotal"
@pageChange="pageChange" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"/> @pageSizeChange="pageSizeChange"/>
</div> </div>
@@ -116,26 +105,26 @@
size="50%" size="50%"
:title="drawerTitle" :title="drawerTitle"
:visible.sync="drawerTable"> :visible.sync="drawerTable">
<div style="margin: 10px;height: inherit"> <div style="margin: 10px 50px 10px 20px;height: inherit">
<el-form label-width="150px" ref="formShowData" :model="formShowData" :rules="formRules"> <el-form label-width="150px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="标准类型"> <el-form-item label="标准类型" prop="type">
<el-select v-model="formShowData.type" type="text" placeholder="请填写"> <el-select v-model="formShowData.type" type="text" placeholder="请填写">
<el-option label="1" value="one"></el-option> <el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option> <el-option label="2" value="two"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准代号"> <el-form-item label="标准代号" prop="number">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准名称"> <el-form-item label="标准名称" prop="name">
<el-input v-model="formShowData.name" type="text" placeholder="请填写"> <el-input v-model="formShowData.name" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="页数"> <el-form-item label="页数" prop="pages">
<el-input v-model="formShowData.pages" type="text" placeholder="请填写"> <el-input v-model="formShowData.pages" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用"> <el-form-item label="费用" prop="cost">
<el-input v-model="formShowData.cost" placeholder="请选择"> <el-input v-model="formShowData.cost" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -143,7 +132,7 @@
</div> </div>
<div class="demo-drawer-footer"> <div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button> <el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button> <el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
@@ -186,6 +175,7 @@
</template> </template>
<script> <script>
import { CgfysAll, CgfysEdit, CgfysAdd, CgfysDelMore } from '@/api/statisticsApi'
export default { export default {
name: "child4", name: "child4",
data() { data() {
@@ -193,20 +183,34 @@ export default {
loading: false, loading: false,
formQuery: { formQuery: {
type: '', type: '',
num: '', number: '',
name: '', name: '',
current: 1, current: 1,
page: 1, page: 1,
pageSize: this.$store.getters.userInfo.configContent, pageSize: this.$store.getters.userInfo.configContent,
tableTotal: 0
}, },
tableTotal: 0,
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
formShowData: {}, formShowData: {
id: '',
type: '',
number: '',
name: '',
pages: '',
cost: ''
},
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {} formRules: {
type: [{ required: true, message: '请选择标准类型', trigger: 'blur' }],
number: [{ required: true, message: '请填写标准代号', trigger: 'blur' }],
name: [{ required: true, message: '请填写标准代号', trigger: 'blur' }],
pages: [{ required: true, message: '请填写页数', trigger: 'blur' }],
cost: [{ required: true, message: '请填写费用', trigger: 'blur' }],
},
submitLoading: false,
} }
}, },
@@ -215,17 +219,104 @@ export default {
}, },
methods: { methods: {
getTableData() {
CgfysAll(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
//新增方法 //新增方法
formDataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
// 提交方法
submit() { submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
CgfysAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
CgfysEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
}, },
//删除方法 //删除方法
deleteDetail() { deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
CgfysDelMore(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
// 查询
queryData() {
this.getTableData()
}, },
//清空 //清空
resetForm() { resetForm() {
this.formQuery = {}
this.getTableData()
}, },
// 列表更多按钮 // 列表更多按钮
handleCommand(command) { handleCommand(command) {
@@ -234,13 +325,49 @@ export default {
this.editRowOne(command[0]); this.editRowOne(command[0]);
break; break;
case "删除": case "删除":
this.deleteRowOne("delOne", command[0].id); this.deleteRowOne(command[0].id);
break; break;
} }
}, },
editRowOne() { editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
pages: item.pages,
cost: item.cost
}
this.drawerTable = true
}, },
deleteRowOne() { deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
CgfysDelMore(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}, },
/** 分页 */ /** 分页 */
pageChange(page) { pageChange(page) {
@@ -264,10 +391,10 @@ export default {
.pagination { .pagination {
position: inherit!important; position: inherit!important;
} }
.el-form-item {
margin-bottom: 0px;
}
.el-form-item {
margin-bottom: 20px;
}
.el-divider--horizontal { .el-divider--horizontal {
height: 0.5px; height: 0.5px;
margin: 10px 0; margin: 10px 0;
@@ -131,16 +131,13 @@
:visible.sync="drawerTable"> :visible.sync="drawerTable">
<div style="margin: 10px;height: inherit"> <div style="margin: 10px;height: inherit">
<el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules"> <el-form label-width="100px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="主办单位"> <el-form-item label="主办单位" prop="unit">
<el-select v-model="formShowData.unit" type="text" placeholder="请填写"> <el-input v-model="formShowData.unit" placeholder="请填写"></el-input>
<el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="会议名称"> <el-form-item label="会议名称" prop="meetName">
<el-input v-model="formShowData.meetName" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.meetName" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="会议时间"> <el-form-item label="会议时间" prop="meetTime">
<el-date-picker <el-date-picker
v-model="formShowData.meetTime" v-model="formShowData.meetTime"
type="datetime" type="datetime"
@@ -149,17 +146,23 @@
placeholder="选择日期时间"> placeholder="选择日期时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="会费标准"> <el-form-item label="会费标准" prop="payStandard">
<el-input v-model="formShowData.payStandard" type="text" placeholder="请填写"> <el-input v-model="formShowData.payStandard" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="实际发生"> <el-form-item label="实际发生" prop="payReality">
<el-input v-model="formShowData.payReality" placeholder="请选择"> <el-input v-model="formShowData.payReality" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用列支"> <el-form-item label="费用列支" prop="costOutlay">
<el-input v-model="formShowData.costOutlay" placeholder="请选择"> <el-select size="small" v-model="formShowData.costOutlay">
</el-input> <el-option
v-for="item in costOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -229,7 +232,14 @@ export default {
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {}, formRules: {
unit: [{ required: true, message: '请填写主办单位', trigger: 'blur' }],
meetName: [{ required: true, message: '请填写会议名称', trigger: 'blur' }],
meetTime: [{ required: true, message: '请选择会议时间', trigger: 'blur' }],
payStandard: [{ required: true, message: '请填写会费标准', trigger: 'blur' }],
payReality: [{ required: true, message: '请填写实际发生', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请选择费用列支', trigger: 'blur' }],
},
formShowData: { formShowData: {
id: '', id: '',
unit: '', unit: '',
@@ -425,7 +435,7 @@ export default {
position: inherit!important; position: inherit!important;
} }
.el-form-item { .el-form-item {
margin-bottom: 10px; margin-bottom: 20px;
} }
.el-divider--horizontal { .el-divider--horizontal {
@@ -112,34 +112,41 @@
:title="drawerTitle" :title="drawerTitle"
:visible.sync="drawerTable"> :visible.sync="drawerTable">
<div style="margin: 10px 50px 10px 20px;height: inherit"> <div style="margin: 10px 50px 10px 20px;height: inherit">
<el-form label-width="120px" ref="formShowData" :model="formShowData" :rules="formRules"> <el-form label-width="150px" ref="formShowData" :model="formShowData" :rules="formRules">
<el-form-item label="协会名称-标委会"> <el-form-item label="协会名称-标委会" prop="scName">
<el-select v-model="formShowData.scName" type="text" placeholder="请填写"> <el-select v-model="formShowData.scName" type="text" placeholder="请填写">
<el-option label="1" value="one"></el-option> <el-option label="1" value="one"></el-option>
<el-option label="2" value="two"></el-option> <el-option label="2" value="two"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="协会名称-分委会"> <el-form-item label="协会名称-分委会" prop="sscName">
<el-input v-model="formShowData.sscName" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.sscName" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="协会名称-工作组"> <el-form-item label="协会名称-工作组" prop="wgName">
<el-input v-model="formShowData.wgName" type="text" placeholder="请填写"> <el-input v-model="formShowData.wgName" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="会费标准"> <el-form-item label="会费标准" prop="payStandard">
<el-input v-model="formShowData.payStandard" type="text" placeholder="请填写"> <el-input v-model="formShowData.payStandard" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="实际发生"> <el-form-item label="实际发生" prop="payReality">
<el-input v-model="formShowData.payReality" placeholder="请选择"> <el-input v-model="formShowData.payReality" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="费用列支"> <el-form-item label="费用列支" prop="costOutlay">
<el-input v-model="formShowData.costOutlay" placeholder="请选择"> <el-input v-model="formShowData.costOutlay" placeholder="请选择">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="每年缴费情况"> <el-form-item label="每年缴费情况" prop="annualPayment">
<el-input v-model="formShowData.annualPayment" type="text" placeholder="请填写"></el-input> <el-select v-model="formShowData.annualPayment" size="small" placeholder="请选择缴费情况">
<el-option
v-for="item in payOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@@ -190,7 +197,15 @@ export default {
drawerTable: false, drawerTable: false,
// 提交按钮loading // 提交按钮loading
submitLoading: false, submitLoading: false,
formRules: {}, formRules: {
scName: [{ required: true, message: '请填写协会名称-标委会', trigger: 'blur' }],
sscName: [{ required: true, message: '请填写协会名称-分委会', trigger: 'blur' }],
wgName: [{ required: true, message: '请填写协会名称-工作组', trigger: 'blur' }],
payStandard: [{ required: true, message: '请填写会费标准', trigger: 'blur' }],
payReality: [{ required: true, message: '请填写实际发生', trigger: 'blur' }],
costOutlay: [{ required: true, message: '请填写费用列支', trigger: 'blur' }],
annualPayment: [{ required: true, message: '请选择每年缴费情况', trigger: 'blur' }],
},
// 新增、编辑数组 // 新增、编辑数组
formShowData: { formShowData: {
id: '', id: '',
@@ -400,7 +415,7 @@ export default {
position: inherit!important; position: inherit!important;
} }
.el-form-item { .el-form-item {
margin-bottom: 10px; margin-bottom: 20px;
} }
.el-divider--horizontal { .el-divider--horizontal {
@@ -7,18 +7,18 @@
<el-input v-model="formQuery.type" size="small" placeholder="根据标准类型搜索"></el-input> <el-input v-model="formQuery.type" size="small" placeholder="根据标准类型搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准代号"> <el-form-item label="标准代号">
<el-input v-model="formQuery.num" size="small" placeholder="根据标准代号搜索"></el-input> <el-input v-model="formQuery.number" size="small" placeholder="根据标准代号搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准名称"> <el-form-item label="标准名称">
<el-input v-model="formQuery.name" size="small" placeholder="根据标准名称搜索"></el-input> <el-input v-model="formQuery.name" size="small" placeholder="根据标准名称搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" onclick="">查询</el-button> <el-button type="primary" size="small" @click="queryData">查询</el-button>
<el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button> <el-button type="" size="small" @click="resetForm('formQuery')">清空</el-button>
</el-form-item> </el-form-item>
<el-divider/> <el-divider/>
<div style="float: left"> <div style="float: left">
<el-button type="primary" size="small" @click="drawer1 = true">新增</el-button> <el-button type="primary" size="small" @click="dataAdd">新增</el-button>
<el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button> <el-button type="primary" size="small" @click="dialogVisible1 = true">导入</el-button>
<el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button> <el-button type="primary" size="small" @click="dialogVisible2 = true">导出</el-button>
<el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button> <el-button type="danger" size="small" @click="deleteDetail" icon="el-icon-delete">批量删除</el-button>
@@ -56,7 +56,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="num" prop="number"
label="标准代号"> label="标准代号">
</el-table-column> </el-table-column>
@@ -67,7 +67,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="translateType" prop="translation"
label="翻译类型"> label="翻译类型">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -82,7 +82,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="completeTime" prop="time"
label="翻译完成时间"> label="翻译完成时间">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right"> <el-table-column label="操作" align="center" width="50" fixed="right">
@@ -124,14 +124,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准代号"> <el-form-item label="标准代号">
<el-input v-model="formShowData.num" type="text" placeholder="请填写"></el-input> <el-input v-model="formShowData.number" type="text" placeholder="请填写"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="标准名称"> <el-form-item label="标准名称">
<el-input v-model="formShowData.name" type="text" placeholder="请填写"> <el-input v-model="formShowData.name" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="翻译类型"> <el-form-item label="翻译类型">
<el-input v-model="formShowData.translateType" type="text" placeholder="请填写"> <el-input v-model="formShowData.translation" type="text" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
@@ -144,14 +144,14 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="翻译完成时间"> <el-form-item label="翻译完成时间">
<el-input v-model="formShowData.completeTime" placeholder="请填写"> <el-input v-model="formShowData.time" placeholder="请填写">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="demo-drawer-footer"> <div class="demo-drawer-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button> <el-button size="small" @click="drawerTable = false">取消</el-button>
<el-button size="small" type="primary" @click="submit()">提交</el-button> <el-button size="small" type="primary" :loading="submitLoading" @click="submit()">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
@@ -193,6 +193,7 @@
</template> </template>
<script> <script>
import { fyQuery, fyDetail, fyEdit, fyAdd, fyDel } from '@/api/statisticsApi'
export default { export default {
name: "children", name: "children",
data() { data() {
@@ -200,7 +201,7 @@ export default {
loading: false, loading: false,
formQuery: { formQuery: {
type: '', type: '',
num: '', number: '',
name: '', name: '',
current: 1, current: 1,
page: 1, page: 1,
@@ -210,17 +211,19 @@ export default {
tableData: [], tableData: [],
multipleSelection: [], multipleSelection: [],
formShowData: { formShowData: {
id: '',
type: '', type: '',
num: '', number: '',
name: '', name: '',
translateType: '', translation: '',
pages: '', pages: '',
cost: '', cost: '',
completeTime: '' time: ''
}, },
drawerTable: false, drawerTable: false,
drawerTitle: '', drawerTitle: '',
formRules: {}, formRules: {},
submitLoading: false,
} }
}, },
@@ -229,19 +232,102 @@ export default {
}, },
methods: { methods: {
getTableData() {
fyQuery(this.formQuery).then(res=>{
this.tableData = res.data.list
this.tableTotal = res.data.count
})
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
//新增方法 //新增方法
dataAdd() {
this.drawerTitle = '新增'
this.formShowData = {}
this.drawerTable = true
},
submit() { submit() {
this.$refs['formShowData'].validate((valid) => {
if (valid) {
this.submitLoading = true
if (this.drawerTitle === '新增') {
fyAdd(this.formShowData).then(res=>{
if (res.ok) {
this.$message.success('新增成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('新增失败')
this.submitLoading = false
}
this.drawerTable = false
}, e => {
})
} else {
fyEdit(this.formShowData).then(res => {
if (res.ok) {
this.$message.success('编辑成功')
this.submitLoading = false
this.getTableData()
} else {
this.$message.warning('编辑失败')
this.submitLoading = false
}
this.drawerTable = false
},e => {
})
}
}
})
}, },
//删除方法 //删除方法
deleteDetail() { deleteDetail() {
if (this.multipleSelection.length > 0) {
let msgIds = []
for (let i = 0; i < this.multipleSelection.length; i++) {
let msgId = this.multipleSelection[i].id
msgIds.push(msgId)
}
let delId = {
ids: msgIds.join(',')
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
fyDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = ''
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
} else {
this.$message.warning('请选择一条数据进行删除')
}
},
// 查询按钮
queryData() {
this.getTableData()
}, },
//清空 //清空
resetForm() { resetForm() {
this.formQuery = {}
this.getTableData()
}, },
// 列表更多按钮 // 列表更多按钮
handleCommand(command) { handleCommand(command) {
switch (command[1]) { switch (command[1]) {
@@ -249,13 +335,51 @@ export default {
this.editRowOne(command[0]); this.editRowOne(command[0]);
break; break;
case "删除": case "删除":
this.deleteRowOne("delOne", command[0].id); this.deleteRowOne(command[0].id);
break; break;
} }
}, },
editRowOne() { editRowOne(item) {
this.drawerTitle = '编辑'
this.formShowData = {
id: item.id,
type: item.type,
number: item.number,
name: item.name,
translation: item.translation,
pages: item.pages,
cost: item.cost,
time: item.time,
}
this.drawerTable = true
}, },
deleteRowOne() { deleteRowOne(val) {
let delId = {
ids: val
}
this.$confirm('确定删除这些数据?', '提示', {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
fyDel(delId).then(res => {
if (res.ok) {
this.$message.success('删除成功')
this.pageNo = 1
this.multipleSelection = []
this.getTableData()
} else {
this.$message.warning('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}, },
/** 分页 */ /** 分页 */
pageChange(page) { pageChange(page) {