
258 changed files with 33043 additions and 33974 deletions
@ -1,655 +0,0 @@ |
|||
<template> |
|||
<div style="height: 100%;"> |
|||
<div class="header"> |
|||
<p class="title"><img src="../../assets/loginImg/logo.png"/>安瑞集团信息化平台</p> |
|||
<div class="head_info" style="display: flex;flex-direction: row;justify-content:space-between;align-items: center"> |
|||
<div>欢迎您</div> |
|||
<div> |
|||
<el-select v-model="defaultOrgPathName" class="selectStyle" size="small" placeholder="" @change="changeOrg" filterable> |
|||
<el-option v-for="item in orgDept_list" :key="item.orgPath" :label="item.orgName" :value="item.orgName"/> |
|||
</el-select> |
|||
</div> |
|||
<div style="padding-right: 5px"> |
|||
<el-tooltip placement="top"> |
|||
<div slot="content">{{ roleName }}</div> |
|||
<el-button style="color: #FFFFFF;font-size: 17px" type="text">{{ postName }}</el-button> |
|||
</el-tooltip> |
|||
</div> |
|||
<div>{{ name }}</div> |
|||
<div @click="logout()" style="display: flex;flex-direction: row;justify-content:center;align-items: center;padding-left: 20px;padding-right: 10px"><img src="@/assets/images/dy.png"/></div> |
|||
</div> |
|||
</div> |
|||
<div class="container1"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="14"> |
|||
<ul class="grid-content bg-ltop"> |
|||
<li @click="todowork"> |
|||
<div style="position: relative"> |
|||
<el-badge v-if="shuliang.workCount !== 0" :value="shuliang.workCount" size="mini" class="mark"/> |
|||
<img src="@/assets/home/ltIcon1.png"> |
|||
</div> |
|||
<p>待办工作</p> |
|||
</li> |
|||
<li @click="donework"> |
|||
<img src="@/assets/home/ltIcon2.png"> |
|||
<p>已办工作</p> |
|||
</li> |
|||
<li @click="tobereadwork"> |
|||
<div style="position: relative"> |
|||
<el-badge v-if="shuliang.toBeReadCount !== 0" :value="shuliang.toBeReadCount" size="mini" class="mark"/> |
|||
<img src="@/assets/home/ltIcon4.png"> |
|||
</div> |
|||
<p>待阅工作</p> |
|||
</li> |
|||
<li @click="havereadwork"> |
|||
<img src="@/assets/home/ltIcon3.png"> |
|||
<p>已阅工作</p> |
|||
</li> |
|||
</ul> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<div class="grid-content bg-rtop"> |
|||
<img class="anrui" src="@/assets/home/anrui.png"/> |
|||
<p class="rt_title">通知公告</p> |
|||
<ul> |
|||
<li> |
|||
<img class="rtImg" src="../../assets/home/notice.png"/> |
|||
<span class="notice">关于召开2021年公司全体员工大会的通知工大会的通知工大会的通知...</span> |
|||
<span class="anrui_time">2021-09-01</span> |
|||
</li> |
|||
<li> |
|||
<img src="../../assets/home/notice.png"/> |
|||
<span class="notice">关于召开2021年公司全体员工大会的通知工大会的通知工大会的通知</span> |
|||
<span class="anrui_time">2021-09-01</span> |
|||
</li> |
|||
<li> |
|||
<img src="../../assets/home/notice.png"/> |
|||
<span class="notice">关于召开2021年公司全体员工大会的通知</span> |
|||
<span class="anrui_time">2021-09-01</span> |
|||
</li> |
|||
<li> |
|||
<img src="../../assets/home/notice.png"/> |
|||
<span class="notice">关于召开2021年公司全体员工大会的通知</span> |
|||
<span class="anrui_time">2021-09-01</span> |
|||
</li> |
|||
<li> |
|||
<img src="../../assets/home/notice.png"/> |
|||
<span class="notice">关于召开2021年公司全体员工大会的通知</span> |
|||
<span class="anrui_time">2021-09-01</span> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
<ul class="bg-bottom"> |
|||
<li @click="toNav(index)" v-for="(item,index) in menus" :key='index'> |
|||
<img :src="item.imgUrl"> |
|||
<p>{{ item.title }}</p> |
|||
</li> |
|||
</ul> |
|||
<p class="copy">Copyright © {{ year }} 安瑞集团 All Rights Reserved</p> |
|||
</div> |
|||
<!--<ul class="nav-box">--> |
|||
<!--<li style="background-color: #e87861;" @click="toNavbar('http://39.104.100.138:8081/')"> |
|||
<img src="@/assets/images/jcxx.png"> |
|||
<p>基础信息</p> |
|||
</li>--> |
|||
|
|||
<!--<template v-for="(item, i) in menus"> |
|||
<li v-if="item.sourceName == '系统管理'" :key="i" @click="toNav('index','系统管理')" :style="{backgroundColor: item.iconBgColor}"> |
|||
<img :src="item.iconUrl"> |
|||
<p>{{ item.sourceName }}</p> |
|||
</li> |
|||
<li v-else :key="i" @click="toNavbar(item.pageUrl)" :style="{backgroundColor: item.iconBgColor}"> |
|||
<img :src="item.iconUrl"> |
|||
<p>{{ item.sourceName }}</p> |
|||
</li> |
|||
</template>--> |
|||
<!-- <li style="background-color: #e87861;" @click="toNavbar('http://39.104.100.138:8081/')"> |
|||
<img src="@/assets/images/jcxx.png"> |
|||
<p>基础信息</p> |
|||
</li> |
|||
<li style="background-color: #e87861;" @click="toNavbar('http://localhost:9529/')"> |
|||
<img src="@/assets/images/jcxx.png"> |
|||
<p>基础信息</p> |
|||
</li> --> |
|||
<!-- <li @click="xxzx"> |
|||
<img src="@/assets/images/xxzx.png"> |
|||
<p>消息中心</p> |
|||
</li> |
|||
<li @click="xxzx"> |
|||
<img src="@/assets/images/xxzx.png"> |
|||
<p>消息中心</p> |
|||
</li> |
|||
<li @click="xxzx"> |
|||
<img src="@/assets/images/xxzx.png"> |
|||
<p>消息中心</p> |
|||
</li> |
|||
<li @click="xxzx"> |
|||
<img src="@/assets/images/xxzx.png"> |
|||
<p>消息中心</p> |
|||
</li> |
|||
<li style="background-color: #ffb751;" @click="xxzx"> |
|||
<img src="@/assets/images/cxjl.png"> |
|||
<p>诚信计量</p> |
|||
</li> |
|||
<li style="background-color: #6fb3e0;" @click="xxzx"> |
|||
<img src="@/assets/images/zwsm.png"> |
|||
<p>C标志自我声明</p> |
|||
</li> |
|||
<li style="background-color: #87b880;" @click="xxzx"> |
|||
<img src="@/assets/images/sjcc.png"> |
|||
<p>双随机抽查</p> |
|||
</li> |
|||
<li style="background-color: #448fb9;" @click="xxzx"> |
|||
<img src="@/assets/images/jlsc.png"> |
|||
<p>能量计量审查</p> |
|||
</li> |
|||
<li style="background-color: #24ca95;" @click="xxzx"> |
|||
<img src="@/assets/images/qjsh.png"> |
|||
<p>强检计量器具审核</p> |
|||
</li> |
|||
<li style="background-color: #b4429d;" @click="xxzx"> |
|||
<img src="@/assets/images/jsxd.png"> |
|||
<p>技术规范制修订</p> |
|||
</li> |
|||
<li style="background-color: #b3b442;" @click="toNavbar('http://39.104.100.138:8083/')"> |
|||
<img src="@/assets/images/xtbg.png"> |
|||
<p>协同办公</p> |
|||
</li> |
|||
<li style="background-color: #eab054;" @click="xxzx"> |
|||
<img src="@/assets/images/tjfx.png"> |
|||
<p>统计分析</p> |
|||
</li> |
|||
<li style="background-color: #e87861;" @click="toNavbar('http://39.104.100.138:8081/')"> |
|||
<img src="@/assets/images/jcxx.png"> |
|||
<p>基础信息</p> |
|||
</li> |
|||
<li style="background-color: #e87861;" @click="toNavbar('http://localhost:9529/')"> |
|||
<img src="@/assets/images/jcxx.png"> |
|||
<p>基础信息</p> |
|||
</li> |
|||
<li style="background-color: #617be8;" @click="toNav('index','系统管理')"> |
|||
<img src="@/assets/images/xtgl.png"> |
|||
<p>系统管理</p> |
|||
</li> --> |
|||
<!--</ul>--> |
|||
<el-dialog center :visible.sync="dialogVisible" width="40%" :show-close="false" :close-on-click-modal="false"> |
|||
<el-form :model="form" class="formadd"> |
|||
<el-row style="border-top: 1px solid #e0e3eb"> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>原密码</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input v-model="form.original" type="password" show-password/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>新密码</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input v-model="form.password" type="password" show-password/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb"> |
|||
<span>确认密码</span> |
|||
</el-col> |
|||
<el-col :span="20"> |
|||
<el-form-item><el-input v-model="form.confirmPassword" type="password" show-password/></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" size="small" @click="handleConirm">确 定</el-button> |
|||
<el-button size="small" @click="handleQuXiao">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getToken, removeToken, getStorage, removeStorage } from '@/utils/auth' |
|||
import {sourcesofrole} from '@/api/system/Role/role.js' |
|||
import User from '@/api/User/login.js' |
|||
import { getTodoNum } from '@/api/system/home/home' |
|||
import { getToBeReadNum } from '@/api/flow/read' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
menus: [{ |
|||
imgUrl: require('@/assets/home/bIcon1.png'), |
|||
title: '业务管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/scm.png'), |
|||
title: '供应链管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon2.png'), |
|||
title: '风控管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon3.png'), |
|||
title: '审计管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon4.png'), |
|||
title: '财务管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon5.png'), |
|||
title: '行政管理' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon6.png'), |
|||
title: '报表中心' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon7.png'), |
|||
title: '基础信息' |
|||
}, { |
|||
imgUrl: require('@/assets/home/notice.png'), |
|||
title: '消息中心' |
|||
}, { |
|||
imgUrl: require('@/assets/home/bIcon8.png'), |
|||
title: '系统管理' |
|||
}], |
|||
userInfo: {}, |
|||
orgDept_list: [], |
|||
shuliang: { |
|||
workCount: '', |
|||
toBeReadCount: '' |
|||
}, |
|||
dialogVisible: false, |
|||
form: { |
|||
original: '', |
|||
password: '', |
|||
confirmPassword: '', |
|||
userSid: '' |
|||
}, |
|||
timer: '', |
|||
Orgname: '', |
|||
departmentName: '', |
|||
name: '', |
|||
pNameAndDepartmentNameAndPostName: '', |
|||
defaultOrgPathName: '', |
|||
defaultOrgPath: '', |
|||
roleName: '', |
|||
postName: '', |
|||
year: '' |
|||
} |
|||
}, |
|||
beforeCreate() { |
|||
|
|||
}, |
|||
created() { |
|||
this.getsPasswordByUserSid() |
|||
}, |
|||
mounted() { |
|||
this.Orgname = window.sessionStorage.getItem('Orgname') |
|||
this.departmentName = window.sessionStorage.getItem('departmentName') |
|||
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('pNameAndDepartmentNameAndPostName') |
|||
this.defaultOrgPathName = window.sessionStorage.getItem('defaultOrgPathName') |
|||
this.defaultOrgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.roleName = window.sessionStorage.getItem('roleName') |
|||
this.postName = window.sessionStorage.getItem('postName') |
|||
this.name = window.sessionStorage.getItem('name') |
|||
var nowDate = new Date() |
|||
this.year = nowDate.getFullYear() |
|||
// sourcesofrole({ psid: '0', roleSid: this.$store.getters.userInfo.roleSid }).then(res => { |
|||
// this.menus = res.data |
|||
// }) |
|||
}, |
|||
methods: { |
|||
getsPasswordByUserSid() { |
|||
User.selectPasswordByUserSid(window.sessionStorage.getItem('userSid')).then((resp) => { |
|||
if (resp.success && resp.data) { |
|||
this.dialogVisible = true |
|||
} else { |
|||
this.getNum() |
|||
this.timer = setInterval(this.getNum, 20000) |
|||
} |
|||
}) |
|||
User.getOrgListByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|||
if (res.success) { |
|||
this.orgDept_list = res.data |
|||
} |
|||
}) |
|||
}, |
|||
getNum() { |
|||
getTodoNum(window.sessionStorage.getItem('userSid')).then((resp) => { |
|||
if (resp.success) { |
|||
this.shuliang.workCount = resp.data |
|||
} |
|||
}) |
|||
getToBeReadNum(window.sessionStorage.getItem('userSid')).then((resp) => { |
|||
if (resp.success) { |
|||
this.shuliang.toBeReadCount = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
handleConirm() { |
|||
if (this.form.original === '') { |
|||
this.$message({ showClose: true, type: 'error', message: '原密码不能为空' }) |
|||
return |
|||
} |
|||
if (this.form.password !== this.form.confirmPassword) { |
|||
this.$message({ showClose: true, type: 'error', message: '两次输入密码不一致' }) |
|||
return |
|||
} |
|||
this.form.userSid = window.sessionStorage.getItem('userSid') |
|||
User.updatePassword(this.form).then((resp) => { |
|||
if (resp.success) { |
|||
this.$alert('密码修改成功!请重新登录点击确定后退出。', '修改成功', { |
|||
confirmButtonText: '确定', |
|||
callback: action => { |
|||
this.handleQuXiao() |
|||
} |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleQuXiao() { |
|||
this.dialogVisible = false |
|||
this.form = { |
|||
original: '', |
|||
password: '', |
|||
confirmPassword: '' |
|||
} |
|||
User.logout({ token: getStorage() }).then((res) => { |
|||
if (res.success) { |
|||
removeStorage() |
|||
this.$store.commit('user/SET_UESRINFO', '') |
|||
this.$router.push({ path: '/login' }) |
|||
} |
|||
}) |
|||
}, |
|||
todowork() { |
|||
window.open('/#/todo' + '?token=' + getStorage(), '_blank') |
|||
// this.$router.push({ path: '/todo' + '?token=' + getStorage() }) |
|||
// window.open('http://127.0.0.1/message'+'?token='+getStorage(),'_blank') |
|||
}, |
|||
donework() { |
|||
window.open('/#/done' + '?token=' + getStorage(), '_blank') |
|||
// this.$router.push({ path: '/done' + '?token=' + getStorage() }) |
|||
// window.open('http://127.0.0.1/message'+'?token='+getStorage(),'_blank') |
|||
}, |
|||
tobereadwork() { |
|||
window.open('/#/toberead' + '?token=' + getStorage(), '_blank') |
|||
}, |
|||
havereadwork() { |
|||
window.open('/#/haveread' + '?token=' + getStorage(), '_blank') |
|||
}, |
|||
logout() { |
|||
this.$confirm('确定要退出吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
User.logout({token: getStorage()}).then(res => { |
|||
removeStorage() |
|||
this.$store.commit('user/SET_UESRINFO', '') |
|||
this.$router.push({ path: '/login' }) |
|||
}) |
|||
}) |
|||
}, |
|||
xxzx() { |
|||
this.$alert('项目正在开发中', '提示', { |
|||
dangerouslyUseHTMLString: true |
|||
}) |
|||
}, |
|||
toNavbar(name) { |
|||
let myPopup = window.open(name + '?token=' + getStorage(), '_blank') |
|||
}, |
|||
changeOrg(value) { |
|||
const choose = this.orgDept_list.filter((item) => item.orgName === value) |
|||
this.defaultOrgPathName = choose[0].orgName |
|||
this.defaultOrgPath = choose[0].orgPath |
|||
}, |
|||
toNav(index, name, titleName) { |
|||
const organizationData = { |
|||
defaultOrgPathName: this.defaultOrgPathName, |
|||
defaultOrgPath: this.defaultOrgPath |
|||
} |
|||
if (index == '9') { |
|||
// this.$router.push({path: '/index'}) |
|||
let myPopup = window.open('/#/index', '_blank') |
|||
} else if (index == '7') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/base/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/base/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/base/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} else if (index == '8') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/message/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/message/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/message/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} else if (index == '1') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} else if (index == '4') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/fin/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/fin/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/fin/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} else if (index == '5') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/manage/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/manage/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/manage/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} else if (index == '0') { |
|||
// let myPopup = window.open('http://127.0.0.1:9531/buscenter/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
let myPopup = window.open('http://anrui.yyundong.com/buscenter/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
// let myPopup = window.open('http://120.46.172.184/buscenter/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank') |
|||
} |
|||
// const page = this.$router.resolve({name: name}) |
|||
// window.open(page.href,'_blank') |
|||
} |
|||
}, |
|||
beforeDestroy() { |
|||
clearInterval(this.timer) |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped="scoped"> |
|||
li:hover, |
|||
p:hover { |
|||
cursor: pointer |
|||
} |
|||
</style> |
|||
<style lang="scss" scoped> |
|||
p { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
.header { |
|||
background-color: #0294d7; |
|||
color: #fff; |
|||
overflow: hidden; |
|||
height: 60px; |
|||
line-height: 60px; |
|||
|
|||
.title { |
|||
img { |
|||
width: 70px; |
|||
vertical-align: middle; |
|||
font-family: Adobe Heiti Std; |
|||
} |
|||
|
|||
float: left; |
|||
font-size: 34px; |
|||
margin-left: 35px; |
|||
height: 60px; |
|||
line-height: 60px; |
|||
} |
|||
|
|||
.head_info { |
|||
float: right; |
|||
margin-top: 0; |
|||
font-size: 17px; |
|||
} |
|||
|
|||
p { |
|||
float: left; |
|||
} |
|||
} |
|||
|
|||
//.head_info img { |
|||
// width: 25px; |
|||
// margin-top: 20px; |
|||
// margin-left: 30px; |
|||
// margin-right: 10px; |
|||
// float: left; |
|||
//} |
|||
// |
|||
//.head_info .dy { |
|||
// margin-left: 10px; |
|||
// margin-right: 20px; |
|||
//} |
|||
|
|||
.container1 { |
|||
background: #E9F1F7; |
|||
padding: 20px; |
|||
width: 100%; |
|||
height: calc(100% - 60px); |
|||
margin: 0; |
|||
|
|||
.bg-ltop { |
|||
margin: 0; |
|||
padding: 0 20px; |
|||
background-image: url(../../assets/home/ltBg.png); |
|||
border-radius: 10px; |
|||
overflow: hidden; |
|||
height: 190px; |
|||
|
|||
li { |
|||
float: left; |
|||
list-style: none; |
|||
width: 25%; |
|||
text-align: center; |
|||
|
|||
img { |
|||
width: 70px; |
|||
margin: 45px auto 10px auto; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.bg-rtop { |
|||
background-image: url(../../assets/home/rtBg.png); |
|||
border-radius: 10px; |
|||
height: 190px; |
|||
overflow: hidden; |
|||
position: relative; |
|||
|
|||
.anrui { |
|||
width: 100%; |
|||
height: 40px; |
|||
} |
|||
|
|||
.rt_title { |
|||
position: absolute; |
|||
top: 10px; |
|||
left: 15px; |
|||
font-size: 18px; |
|||
font-family: SourceHanSerifCN; |
|||
font-weight: 600; |
|||
color: #191919; |
|||
} |
|||
|
|||
ul { |
|||
margin: 0px auto; |
|||
padding: 0; |
|||
height: 148px; |
|||
width: 100%; |
|||
|
|||
li { |
|||
font-size: 14px; |
|||
height: 33px; |
|||
line-height: 28px; |
|||
list-style: none; |
|||
text-decoration: underline; |
|||
border-bottom: 1px solid #666; |
|||
width: calc(100% - 70px); |
|||
margin-left: 40px; |
|||
position: relative; |
|||
padding-top: 10px; |
|||
font-family: SimSun; |
|||
|
|||
img { |
|||
width: 16px; |
|||
margin: 5px 10px; |
|||
position: absolute; |
|||
left: -30px; |
|||
} |
|||
|
|||
.notice { |
|||
display: inline-block; |
|||
width: 65%; |
|||
text-overflow: ellipsis; |
|||
overflow: hidden; |
|||
white-space: nowrap; |
|||
} |
|||
|
|||
.anrui_time { |
|||
float: right; |
|||
display: inline-block; |
|||
margin-right: 5px; |
|||
line-height: 30px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.bg-bottom { |
|||
background-image: url(../../assets/home/bottomBg.png); |
|||
border-radius: 10px; |
|||
overflow: hidden; |
|||
margin: 20px 0 0 0; |
|||
padding: 10px 20px; |
|||
|
|||
li { |
|||
float: left; |
|||
list-style: none; |
|||
width: 11.6%; |
|||
margin: 10px 2.5%; |
|||
background: #fff; |
|||
border-radius: 40px; |
|||
text-align: center; |
|||
padding: 10px 25px 15px; |
|||
|
|||
img { |
|||
width: 80%; |
|||
margin: 10px auto; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.copy { |
|||
position: fixed; |
|||
bottom: 0; |
|||
width: calc(100% - 40px); |
|||
margin: auto; |
|||
text-align: center; |
|||
line-height: 40px; |
|||
border-top: 2px solid #4E74A6; |
|||
background: #E9F1F7; |
|||
font-size: 14px; |
|||
color: #666; |
|||
} |
|||
|
|||
.mark { |
|||
position: absolute; |
|||
top: 38%; |
|||
margin-left: 58px; |
|||
} |
|||
|
|||
.mark { |
|||
::v-deep .el-badge__content { |
|||
font-size: 14px !important; |
|||
} |
|||
} |
|||
.selectStyle { |
|||
::v-deep .el-input__inner { |
|||
border: 0px !important; |
|||
background-color: #0294d7 !important; |
|||
font-size: 17px; |
|||
color: #FFFFFF; |
|||
} |
|||
} |
|||
</style> |
File diff suppressed because it is too large
@ -1,331 +1,281 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--Start 列表页面--> |
|||
<div v-show=" viewState == 1 "> |
|||
<el-menu :default-active="activeIndex" style="" class="el-menu-demo" mode="horizontal"> |
|||
<el-menu-item |
|||
index="1" |
|||
style="margin-left: 0;text-align: center; background-color: #028ac8!important;color: #fff;"> |
|||
流程定义 |
|||
</el-menu-item> |
|||
<div class="new_" @click="handleAdd">新增</div> |
|||
<div class="new_out" @click="handleExport"></div> |
|||
</el-menu> |
|||
|
|||
<el-tabs class="my-tabs" v-model="activeName" type="card" @tab-click="handleClick"> |
|||
<el-tab-pane label="教师信息" name="roleList"> |
|||
<div class="container"> |
|||
<div class="tab-header"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
|||
<el-form-item label="表单名称" prop="formName"> |
|||
<el-input |
|||
v-model="queryParams.formName" |
|||
placeholder="请输入表单名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!-- <el-row :gutter="10" class="mb8">--> |
|||
<!-- <el-col :span="1.5">--> |
|||
<!-- <el-button--> |
|||
<!-- type="primary"--> |
|||
<!-- plain--> |
|||
<!-- icon="el-icon-plus"--> |
|||
<!-- size="mini"--> |
|||
<!-- @click="handleAdd"--> |
|||
<!-- >新增--> |
|||
<!-- </el-button>--> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="1.5">--> |
|||
<!-- <el-button--> |
|||
<!-- type="success"--> |
|||
<!-- plain--> |
|||
<!-- icon="el-icon-edit"--> |
|||
<!-- size="mini"--> |
|||
<!-- :disabled="single"--> |
|||
<!-- @click="handleUpdate"--> |
|||
<!-- >修改--> |
|||
<!-- </el-button>--> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="1.5">--> |
|||
<!-- <el-button--> |
|||
<!-- type="danger"--> |
|||
<!-- plain--> |
|||
<!-- icon="el-icon-delete"--> |
|||
<!-- size="mini"--> |
|||
<!-- :disabled="multiple"--> |
|||
<!-- @click="handleDelete"--> |
|||
<!-- >删除--> |
|||
<!-- </el-button>--> |
|||
<!-- </el-col>--> |
|||
<!-- <el-col :span="1.5">--> |
|||
<!-- <el-button--> |
|||
<!-- type="warning"--> |
|||
<!-- plain--> |
|||
<!-- icon="el-icon-download"--> |
|||
<!-- size="mini"--> |
|||
<!-- @click="handleExport"--> |
|||
<!-- >导出--> |
|||
<!-- </el-button>--> |
|||
<!-- <!– </el-col>–></el-row>--> |
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|||
|
|||
|
|||
<el-table v-loading="loading" :data="formList" @selection-change="handleSelectionChange"> |
|||
<el-table-column type="selection" width="55" align="center"/> |
|||
<el-table-column label="表单主键" align="center" prop="formId"/> |
|||
<el-table-column label="表单名称" align="center" prop="formName"/> |
|||
<el-table-column label="备注" align="center" prop="remark"/> |
|||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|||
<el-table :data="tableData" border style="width: 100%;"> |
|||
<el-table-column label="序号" width="70px" type="index" align="center"> |
|||
</el-table-column> |
|||
<el-table-column label="操作" width="150px" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-view" |
|||
@click="handleDetail(scope.row)" |
|||
>详情 |
|||
<el-button type="primary" size="mini" @click="editRow(scope.row)"> |
|||
修改 |
|||
</el-button> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
>修改 |
|||
</el-button> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
>删除 |
|||
<el-button type="danger" size="mini" @click.native.prevent="deleteRow(scope.row)"> |
|||
删除 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="name" label="教师姓名" width="100px" align="center"> |
|||
</el-table-column> |
|||
<el-table-column prop="infoId" label="教师工号" align="center" width="150px"> |
|||
</el-table-column> |
|||
<el-table-column prop="sex" label="性别" align="center" width="70px"> |
|||
</el-table-column> |
|||
<el-table-column prop="calss" label="所属班级" align="center" width="100px"> |
|||
</el-table-column> |
|||
<el-table-column prop="department" label="系别" align="center" width="100px"> |
|||
</el-table-column> |
|||
<el-table-column prop="speciality" label="专业" align="center" width="150px"> |
|||
</el-table-column> |
|||
<el-table-column prop="studyYear" label="入职年份" align="center" width="150px"> |
|||
</el-table-column> |
|||
<el-table-column prop="remarks" label="成绩录入" align="center"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total>0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size" @pagination="pagination"/> |
|||
<!-- 编辑角色信息 --> |
|||
<el-dialog :title="dialogTitle + '教师信息'" :visible.sync="editDialog" width="40%"> |
|||
<table class="e-table" cellspacing="0"> |
|||
<tr> |
|||
<td>教师姓名</td> |
|||
<td> |
|||
<el-input v-model="form.name" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>教师工号</td> |
|||
<td> |
|||
<el-input v-model="form.infoId" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>性别</td> |
|||
<td> |
|||
<el-input v-model="form.sex" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>所属班级</td> |
|||
<td> |
|||
<el-input v-model="form.calss" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>系别</td> |
|||
<td> |
|||
<el-input v-model="form.department" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>专业</td> |
|||
<td> |
|||
<el-input v-model="form.speciality" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
|
|||
<!-- 添加或修改流程表单对话框 --> |
|||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="表单名称" prop="formName"> |
|||
<el-input v-model="form.formName" placeholder="请输入表单名称"/> |
|||
</el-form-item> |
|||
<el-form-item label="表单内容"> |
|||
<editor v-model="form.formContent" :min-height="192"/> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="remark"> |
|||
<el-input v-model="form.remark" placeholder="请输入备注"/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!--表单配置详情--> |
|||
<el-dialog :title="formTitle" :visible.sync="formConfOpen" width="60%" append-to-body> |
|||
<div class="test-form"> |
|||
<parser :key="new Date().getTime()" :form-conf="formConf"/> |
|||
<tr> |
|||
<td>入职年份</td> |
|||
<td> |
|||
<el-input v-model="form.studyYear" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>资源描述</td> |
|||
<td> |
|||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<div style="margin-top: 20px; text-align: center;"> |
|||
<el-button type="primary" @click="save()">保存</el-button> |
|||
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</el-tab-pane> |
|||
<el-tab-pane label="新增教师" name="addrole"> |
|||
<table class="e-table" cellspacing="0"> |
|||
<tr> |
|||
<td>教师姓名</td> |
|||
<td> |
|||
<el-input v-model="form.name" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>教师工号</td> |
|||
<td> |
|||
<el-input v-model="form.infoId" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>性别</td> |
|||
<td> |
|||
<el-input v-model="form.sex" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>所属班级</td> |
|||
<td> |
|||
<el-input v-model="form.calss" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>系别</td> |
|||
<td> |
|||
<el-input v-model="form.department" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>专业</td> |
|||
<td> |
|||
<el-input v-model="form.speciality" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
|
|||
<!--Start 新增页面--> |
|||
<form-add v-show=" viewState == 2"></form-add> |
|||
<tr> |
|||
<td>入职年份</td> |
|||
<td> |
|||
<el-input v-model="form.studyYear" style="width:300px"></el-input> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td>资源描述</td> |
|||
<td> |
|||
<el-input type="textarea" v-model="form.remarks"></el-input> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<div style="margin-top: 20px; text-align: center;"> |
|||
<el-button type="primary" @click="save()">保存</el-button> |
|||
<!--<el-button @click="editDialog = false">关闭</el-button>--> |
|||
</div> |
|||
<!--</el-dialog>--> |
|||
<!--</div>--> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
</template> |
|||
|
|||
<script> |
|||
import {listForm, getForm, delForm, addForm, updateForm, exportForm} from "@/api/workflow/form"; |
|||
// import Editor from '@/components/Editor'; |
|||
// import Parser from '@/components/parser/Parser' |
|||
import formAdd from "./formAdd"; |
|||
import { |
|||
pageList, |
|||
saveSourcesInfo, |
|||
putSourcesInfo, |
|||
delSources, |
|||
} from '@/api/system/sources/index.js' |
|||
|
|||
export default { |
|||
name: "form", |
|||
components: { |
|||
Editor, |
|||
// Parser, |
|||
formAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
activeIndex: '1', |
|||
viewState: 1, |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 流程表单表格数据 |
|||
formList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
formConf: {}, // 默认表单数据 |
|||
formConfOpen: false, |
|||
formTitle: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
size: 10, // 每页的数据条数 |
|||
activeName: 'roleList', |
|||
dialogTitle: '', |
|||
editDialog: false, |
|||
form: {}, |
|||
type:'js', |
|||
formBackup: Object.assign({}, this.form), |
|||
page: { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
params: { |
|||
formName: null, |
|||
formContent: null, |
|||
} |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {} |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询流程表单列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listForm(this.queryParams).then(response => { |
|||
this.formList = response.data.records; |
|||
this.total = response.data.total; |
|||
this.loading = false; |
|||
}); |
|||
psid: '', |
|||
sourceId: '', |
|||
sourceName: '' |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
formId: null, |
|||
formName: null, |
|||
formContent: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
createBy: null, |
|||
updateBy: null, |
|||
remark: null |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
tableData: [], |
|||
zylb: [], |
|||
sourceList: [] |
|||
} |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetForm("queryForm"); |
|||
this.handleQuery(); |
|||
mounted() { |
|||
this.getPageList(this.page) |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map(item => item.formId) |
|||
this.single = selection.length !== 1 |
|||
this.multiple = !selection.length |
|||
methods: { |
|||
pagination(val) { // 分页 |
|||
this.page.current = val.pageNum |
|||
this.page.size = val.pageSize |
|||
this.getPageList(this.page) |
|||
}, |
|||
/** 表单配置信息 */ |
|||
handleDetail(row) { |
|||
this.formConfOpen = true; |
|||
this.formTitle = "流程表单配置详细"; |
|||
this.formConf = JSON.parse(row.formContent) |
|||
resetSearch() { // 重置 |
|||
this.page = { |
|||
total: 0, // 默认数据总数 |
|||
current: 1, // 默认开始页面 |
|||
size: 10, // 每页的数据条数 |
|||
params: { |
|||
name:'', |
|||
psid: '', |
|||
sourceId: '', |
|||
sourceName: '' |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
// this.reset(); |
|||
// this.open = true; |
|||
// this.title = "添加流程表单"; |
|||
this.$router.push({path: '/tool/build/index', query: {formId: null}}) |
|||
} |
|||
this.getPageList() |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
// this.reset(); |
|||
// const formId = row.formId || this.ids |
|||
// getForm(formId).then(response => { |
|||
// this.form = response.data; |
|||
// this.open = true; |
|||
// this.title = "修改流程表单"; |
|||
// }); |
|||
this.$router.push({path: '/tool/build/index', query: {formId: row.formId}}) |
|||
getPageList() { // 获取列表 |
|||
pageList(this.type).then((res) => { |
|||
this.tableData = res.data |
|||
this.page.total = res.data.total |
|||
}) |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate(valid => { |
|||
if (valid) { |
|||
if (this.form.formId != null) { |
|||
updateForm(this.form).then(response => { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
handleClick(tab, event) { |
|||
if (tab.name == 'addrole') { |
|||
this.dialogTitle = '新增' |
|||
this.roleForm = Object.assign({}, this.formBackup) |
|||
} else { |
|||
addForm(this.form).then(response => { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
}); |
|||
this.getPageList() |
|||
} |
|||
}, |
|||
save() { |
|||
if (this.form.sid) { |
|||
putSourcesInfo(this.form).then(res => { |
|||
this.editDialog = false |
|||
this.getPageList(this.page) |
|||
this.$message({ |
|||
message: res.msg, |
|||
type: 'success' |
|||
}) |
|||
}) |
|||
} else { |
|||
saveSourcesInfo(this.form).then(res => { |
|||
this.getPageList() |
|||
this.activeName = "roleList" |
|||
this.$message({ |
|||
message: res.msg, |
|||
type: 'success' |
|||
}) |
|||
}) |
|||
} |
|||
}); |
|||
this.reset() |
|||
}, |
|||
reset() { |
|||
this.form = {} |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const formIds = row.formId || this.ids; |
|||
this.$confirm('是否确认删除流程表单编号为"' + formIds + '"的数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}).then(function () { |
|||
return delForm(formIds); |
|||
editRow(row) { |
|||
this.dialogTitle = '编辑' |
|||
this.editDialog = true |
|||
this.form = Object.assign({}, row) |
|||
}, |
|||
deleteRow(row) { |
|||
this.$confirm('确定要删除该资源吗, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
delSources({sid: row.sid}).then(res => { |
|||
this.getPageList() |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '删除成功!' |
|||
}); |
|||
}) |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
this.$confirm('是否确认导出所有流程表单数据项?', "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning" |
|||
}).then(function () { |
|||
return exportForm(queryParams); |
|||
}).then(response => { |
|||
this.download(response.msg); |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
<style scoped="scoped" lang="scss"> |
|||
.my-tabs { |
|||
margin-top: 10px; |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue