14 changed files with 1784 additions and 220 deletions
@ -0,0 +1,334 @@ |
|||
import Vue from 'vue' |
|||
import Router from 'vue-router' |
|||
|
|||
Vue.use(Router) |
|||
|
|||
/* Layout */ |
|||
import Layout from '@/layout' |
|||
|
|||
/** |
|||
* Note: sub-menu only appear when route children.length >= 1 |
|||
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
|||
* |
|||
* hidden: true if set true, item will not show in the sidebar(default is false) |
|||
* alwaysShow: true if set true, will always show the root menu |
|||
* if not set alwaysShow, when item has more than one children route, |
|||
* it will becomes nested mode, otherwise not show the root menu |
|||
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb |
|||
* name:'router-name' the name is used by <keep-alive> (must set!!!) |
|||
* meta : { |
|||
roles: ['admin','editor'] control the page roles (you can set multiple roles) |
|||
title: 'title' the name show in sidebar and breadcrumb (recommend set) |
|||
icon: 'svg-name'/'el-icon-x' the icon show in the sidebar |
|||
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) |
|||
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set |
|||
} |
|||
*/ |
|||
|
|||
/** |
|||
* constantRoutes |
|||
* a base page that does not have permission requirements |
|||
* all roles can be accessed |
|||
*/ |
|||
export const constantRoutes = [ |
|||
{ |
|||
path: '/login', |
|||
component: () => import('@/views/login/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/ceshi', |
|||
component: () => import('@/views/ceshi/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/zerenLogin', |
|||
component: () => import('@/views/login/zerenLogin'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/zhenggaiLogin', |
|||
component: () => import('@/views/login/zhenggaiLogin'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/quantitativeListLogin', |
|||
component: () => import('@/views/login/quantitativeListLogin'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/dingxingLogin', |
|||
component: () => import('@/views/login/dingxingLogin'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/responsible', |
|||
component: () => import('@/views/responsible/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/quantitativeList', |
|||
component: () => import('@/views/quantitativeList/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/approvalList', |
|||
component: () => import('@/views/approvalList/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/rectification', |
|||
component: () => import('@/views/rectification/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/approval', |
|||
component: () => import('@/views/approval/index'), |
|||
hidden: true |
|||
}, |
|||
// {
|
|||
// path: '/details',
|
|||
// component: () => import('@/views/record/details'),
|
|||
// hidden: true
|
|||
// },
|
|||
{ |
|||
path: '/index', |
|||
component: () => import('@/views/index'), |
|||
hidden: true |
|||
}, |
|||
{ |
|||
path: '/404', |
|||
component: () => import('@/views/404'), |
|||
hidden: true |
|||
}, |
|||
|
|||
{ |
|||
path: '/', |
|||
component: Layout, |
|||
redirect: '/qualitative', |
|||
name: 'qualitative', |
|||
meta: { title: '数据提报'}, |
|||
children: [ |
|||
{ |
|||
path: 'qualitative', |
|||
name: 'qualitative', |
|||
component: () => import('@/views/qualitative/index'), |
|||
meta: { title: '定性考核'} |
|||
}, |
|||
{ |
|||
path: 'mete', |
|||
name: 'mete', |
|||
component: () => import('@/views/mete/index'), |
|||
meta: { title: '定量考核'} |
|||
} |
|||
] |
|||
}, |
|||
// {
|
|||
// path: '/',
|
|||
// component: Layout,
|
|||
// redirect: '/qualitative',
|
|||
|
|||
// children: [{
|
|||
// path: 'qualitative',
|
|||
// name: 'Qualitative',
|
|||
// component: () => import('@/views/qualitative/index'),
|
|||
// meta: { title: '定性考核'}
|
|||
// }]
|
|||
// },
|
|||
// {
|
|||
// path: '/mete',
|
|||
// component: Layout,
|
|||
// redirect: '/mete',
|
|||
// children: [{
|
|||
// path: 'mete',
|
|||
// name: 'Mete',
|
|||
// component: () => import('@/views/mete/index'),
|
|||
// meta: { title: '定量考核'}
|
|||
// }]
|
|||
// },
|
|||
// {
|
|||
// path: '/dashboard',
|
|||
// component: () => import('@/views/dashboard/index'),
|
|||
// hidden: true
|
|||
// },
|
|||
// {
|
|||
// path: '/dashboard',
|
|||
// component: Layout,
|
|||
// redirect: '/dashboard',
|
|||
// children: [{
|
|||
// path: 'dashboard',
|
|||
// name: 'dashboard',
|
|||
// component: () => import('@/views/dashboard/index'),
|
|||
// meta: { title: '企业微信'}
|
|||
// }]
|
|||
// },
|
|||
{ |
|||
path: '/approvalData', |
|||
component: Layout, |
|||
redirect: '/approvalData', |
|||
children: [{ |
|||
path: 'approvalData', |
|||
name: 'approvalData', |
|||
component: () => import('@/views/approvalData/index'), |
|||
meta: { title: '审批记录'} |
|||
}] |
|||
}, |
|||
// {
|
|||
// path: '/',
|
|||
// component: Layout,
|
|||
// redirect: '/dashboard',
|
|||
// children: [{
|
|||
// path: 'dashboard',
|
|||
// name: 'Dashboard',
|
|||
// component: () => import('@/views/dashboard/index'),
|
|||
// meta: { title: '考核项目'}
|
|||
// }]
|
|||
// },
|
|||
// {
|
|||
// path: '/record',
|
|||
// component: Layout,
|
|||
// redirect: '/record',
|
|||
// children: [{
|
|||
// path: 'record',
|
|||
// name: 'Record',
|
|||
// component: () => import('@/views/record/index'),
|
|||
// meta: { title: '考核记录'}
|
|||
// }]
|
|||
// },
|
|||
{ |
|||
path: '/details', |
|||
component: Layout, |
|||
redirect: '/details', |
|||
children: [{ |
|||
path: 'details', |
|||
name: 'Details', |
|||
component: () => import('@/views/record/details'), |
|||
// meta: { title: '考核记录详情'}
|
|||
}] |
|||
}, |
|||
|
|||
|
|||
// {
|
|||
// path: '/example',
|
|||
// component: Layout,
|
|||
// redirect: '/example/table',
|
|||
// name: 'Example',
|
|||
// meta: { title: '表格', icon: 'el-icon-s-help' },
|
|||
// children: [
|
|||
// {
|
|||
// path: 'table',
|
|||
// name: 'Table',
|
|||
// component: () => import('@/views/table/index'),
|
|||
// meta: { title: 'Table', icon: 'table' }
|
|||
// },
|
|||
// {
|
|||
// path: 'tree',
|
|||
// name: 'Tree',
|
|||
// component: () => import('@/views/tree/index'),
|
|||
// meta: { title: 'Tree', icon: 'tree' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
|
|||
// {
|
|||
// path: '/form',
|
|||
// component: Layout,
|
|||
// children: [
|
|||
// {
|
|||
// path: 'index',
|
|||
// name: 'Form',
|
|||
// component: () => import('@/views/form/index'),
|
|||
// meta: { title: 'Form', icon: 'form' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
|
|||
// {
|
|||
// path: '/nested',
|
|||
// component: Layout,
|
|||
// redirect: '/nested/menu1',
|
|||
// name: 'Nested',
|
|||
// meta: {
|
|||
// title: 'Nested',
|
|||
// icon: 'nested'
|
|||
// },
|
|||
// children: [
|
|||
// {
|
|||
// path: 'menu1',
|
|||
// component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
|||
// name: 'Menu1',
|
|||
// meta: { title: 'Menu1' },
|
|||
// children: [
|
|||
// {
|
|||
// path: 'menu1-1',
|
|||
// component: () => import('@/views/nested/menu1/menu1-1'),
|
|||
// name: 'Menu1-1',
|
|||
// meta: { title: 'Menu1-1' }
|
|||
// },
|
|||
// {
|
|||
// path: 'menu1-2',
|
|||
// component: () => import('@/views/nested/menu1/menu1-2'),
|
|||
// name: 'Menu1-2',
|
|||
// meta: { title: 'Menu1-2' },
|
|||
// children: [
|
|||
// {
|
|||
// path: 'menu1-2-1',
|
|||
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
|||
// name: 'Menu1-2-1',
|
|||
// meta: { title: 'Menu1-2-1' }
|
|||
// },
|
|||
// {
|
|||
// path: 'menu1-2-2',
|
|||
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
|||
// name: 'Menu1-2-2',
|
|||
// meta: { title: 'Menu1-2-2' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
// {
|
|||
// path: 'menu1-3',
|
|||
// component: () => import('@/views/nested/menu1/menu1-3'),
|
|||
// name: 'Menu1-3',
|
|||
// meta: { title: 'Menu1-3' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
// {
|
|||
// path: 'menu2',
|
|||
// component: () => import('@/views/nested/menu2/index'),
|
|||
// name: 'Menu2',
|
|||
// meta: { title: 'menu2' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
|
|||
// {
|
|||
// path: 'external-link',
|
|||
// component: Layout,
|
|||
// children: [
|
|||
// {
|
|||
// path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
|
|||
// meta: { title: 'External Link', icon: 'link' }
|
|||
// }
|
|||
// ]
|
|||
// },
|
|||
|
|||
// 404 page must be placed at the end !!!
|
|||
{ path: '*', redirect: '/404', hidden: true } |
|||
] |
|||
|
|||
const createRouter = () => new Router({ |
|||
// mode: 'history', // require service support
|
|||
scrollBehavior: () => ({ y: 0 }), |
|||
routes: constantRoutes |
|||
}) |
|||
|
|||
const router = createRouter() |
|||
|
|||
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|||
export function resetRouter() { |
|||
const newRouter = createRouter() |
|||
router.matcher = newRouter.matcher // reset router
|
|||
} |
|||
|
|||
export default router |
|||
@ -0,0 +1,518 @@ |
|||
<template> |
|||
<!-- 定性考核打分 --> |
|||
<div class="dashboard-container"> |
|||
<!-- <div class="gva-search-box"> |
|||
<el-form ref="searchForm" :inline="true" :model="searchInfo"> |
|||
<el-form-item label="考核维度名称"> |
|||
<el-input |
|||
placeholder="请输入名称" |
|||
v-model="searchInfo.title" |
|||
clearable> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="考核维度状态"> |
|||
<el-select v-model="searchInfo.state" clearable placeholder="请选择状态"> |
|||
<el-option :value=1 label="正常">正常</el-option> |
|||
<el-option :value=2 label="禁止">禁止</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button> |
|||
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> --> |
|||
<div class="gva-table-box"> |
|||
<!-- <div class="gva-btn-list"> |
|||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="showAdd()">新增</el-button> |
|||
</div> --> |
|||
<el-table :data="tableData" border :span-method="objectSpanMethod"> |
|||
<el-table-column align="left" label="部门" prop="parentname"/> |
|||
<el-table-column align="left" label="考核标准" prop="detailedtargetname"/> |
|||
<el-table-column align="left" label="考核办法" prop="content"/> |
|||
|
|||
<el-table-column align="left" fixed="right" label="操作" width="200"> |
|||
<template #default="scope"> |
|||
<el-button |
|||
icon="el-icon-circle-plus-outline" |
|||
size="small" |
|||
type="text" |
|||
@click="showJia(scope.row)" |
|||
>加分</el-button> |
|||
<el-button |
|||
icon="el-icon-remove-outline" |
|||
size="small" |
|||
type="text" |
|||
@click="showJian(scope.row)" |
|||
>减分</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- 加分弹框 --> |
|||
<el-dialog :visible.sync="dialogFormVisible" :before-close="closeDialog" title="加分" width="30%"> |
|||
<el-form ref="addForm" :model="form" :rules="rules" label-width="150px"> |
|||
<el-form-item label="分值"> |
|||
<el-input v-model.number="form.score" autocomplete="off" /> |
|||
</el-form-item> |
|||
<el-form-item label="原因"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="4" |
|||
placeholder="请输入内容" |
|||
v-model="form.reason"> |
|||
</el-input> |
|||
|
|||
</el-form-item> |
|||
<el-form-item label="发生时间"> |
|||
<el-date-picker |
|||
v-model="form.time" |
|||
value-format="yyyy-MM-dd HH:mm:ss" |
|||
type="datetime" |
|||
placeholder="选择日期时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="是否整改"> |
|||
<el-select v-model="form.rectification" clearable placeholder="请选择状态"> |
|||
<el-option :value=1 label="是">是</el-option> |
|||
<el-option :value=2 label="否">否</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<template #footer> |
|||
<div class="dialog-footer"> |
|||
<el-button size="small" @click="closeDialog">取 消</el-button> |
|||
<el-button size="small" type="primary" @click="enterDialog">确 定</el-button> |
|||
</div> |
|||
</template> |
|||
</el-dialog> |
|||
<!-- 减分弹框 --> |
|||
<el-dialog :visible.sync="jiandialogFormVisible" :before-close="jiancloseDialog" title="减分" width="30%"> |
|||
<el-form ref="jianForm" :model="jianForm" label-width="150px"> |
|||
<el-form-item label="分值"> |
|||
<el-input v-model.number="jianForm.score" autocomplete="off" /> |
|||
</el-form-item> |
|||
<el-form-item label="原因"> |
|||
<el-input |
|||
type="textarea" |
|||
:rows="4" |
|||
placeholder="请输入内容" |
|||
v-model="jianForm.reason"> |
|||
</el-input> |
|||
|
|||
</el-form-item> |
|||
<el-form-item label="发生时间"> |
|||
<el-date-picker |
|||
v-model="jianForm.time" |
|||
value-format="yyyy-MM-dd HH:mm:ss" |
|||
type="datetime" |
|||
placeholder="选择日期时间"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item label="是否整改"> |
|||
<el-select v-model="jianForm.rectification" clearable placeholder="请选择状态"> |
|||
<el-option :value=1 label="是">是</el-option> |
|||
<el-option :value=2 label="否">否</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<!-- <el-upload |
|||
:action="uploadActionUrl" |
|||
accept="image/jpeg,image/gif,image/png" |
|||
multiple |
|||
:limit="3" |
|||
|
|||
:file-list="files"> |
|||
<el-button size="small" type="primary">点击上传</el-button> |
|||
<div slot="tip" class="el-upload__tip">请上传图片格式文件</div> |
|||
</el-upload> --> |
|||
<template #footer> |
|||
<div class="dialog-footer"> |
|||
<el-button size="small" @click="jiancloseDialog">取 消</el-button> |
|||
<el-button size="small" type="primary" @click="jianenterDialog">确 定</el-button> |
|||
</div> |
|||
</template> |
|||
</el-dialog> |
|||
<!-- 编辑弹框 --> |
|||
<el-dialog :visible.sync="editDialogFormVisible" :before-close="editCloseDialog" title="修改" width="20%"> |
|||
<el-form ref="editForm" :model="editAdd" :rules="editRules" label-width="150px"> |
|||
<el-form-item label="考核维度名称" prop="title"> |
|||
<el-input v-model="editAdd.title" autocomplete="off" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<template #footer> |
|||
<div class="dialog-footer"> |
|||
<el-button size="small" @click="editCloseDialog">取 消</el-button> |
|||
<el-button size="small" type="primary" @click="editEnterDialog">确 定</el-button> |
|||
</div> |
|||
</template> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { qualevalulist,additionandsubtractionscore,upordown } from '@/api/dutys' |
|||
export default { |
|||
|
|||
name: 'Qualitative', |
|||
data() { |
|||
return { |
|||
files:[], |
|||
uploadActionUrl:'http://gin.admin.net/upordown', |
|||
jianForm:{}, |
|||
jiandialogFormVisible:false, |
|||
fileList:[], |
|||
spanArr:[], |
|||
pos:'', |
|||
// 查询详情的数据 |
|||
editFrom:{}, |
|||
// 修改状态提交数据 |
|||
switchFrom:{}, |
|||
// 删除数据提交 |
|||
deleFrom:{}, |
|||
// 编辑时数据 |
|||
editAdd:{}, |
|||
assessList:{}, |
|||
// 添加数据 |
|||
form:{}, |
|||
// 弹窗变量 |
|||
dialogFormVisible:false, |
|||
// 修改弹窗 |
|||
editDialogFormVisible:false, |
|||
total: 0, |
|||
tableData:[], |
|||
// 条件查询变量 |
|||
searchInfo: { |
|||
page: 1, |
|||
pagesize: 10 |
|||
}, |
|||
// 条件查询变量 |
|||
abc:{ |
|||
aaa:"111", |
|||
bbb:"222" |
|||
}, |
|||
// 添加时验证规则 |
|||
rules: { |
|||
title: [{ required: true, message: '请输入名称', trigger: 'blur' }], |
|||
}, |
|||
editRules:{ |
|||
title: [{ required: true, message: '请输入名称', trigger: 'blur' }], |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log(this.$store.state.user.token) |
|||
if (this.$store.state.user.token=='') { |
|||
this.$router.push('/login') |
|||
} |
|||
// 页面渲染时获取初始数据 |
|||
this.getDataList() |
|||
}, |
|||
// 监听数据 |
|||
watch: { |
|||
tableData() { |
|||
this.$nextTick(() => { |
|||
this.spanArr=[], |
|||
this.pos='', |
|||
//此时就可以获取到在created赋值后的dataList了 |
|||
this.getSpanArr(this.tableData); |
|||
}); |
|||
}, |
|||
// } |
|||
}, |
|||
methods: { |
|||
fileImage:function(e){ |
|||
var that=this; |
|||
var file = e.target.files[0]; |
|||
var imgSize=file.size/1024; |
|||
if(imgSize>200){ |
|||
alert('请上传大小不要超过200KB的图片') |
|||
}else{ |
|||
var reader = new FileReader(); |
|||
reader.readAsDataURL(file); // 读出 base64 |
|||
reader.onloadend = async function () { |
|||
// 图片的 base64 格式, 可以直接当成 img 的 src 属性值 |
|||
var dataURL = reader.result; |
|||
// 下面逻辑处理 |
|||
const from={ |
|||
file:dataURL, |
|||
} |
|||
const res = await upordown(from) |
|||
// $.ajax({ |
|||
// type:"post", |
|||
// url:"/v1/userSet", |
|||
// async:true, |
|||
// data:{ |
|||
// avatar:dataURL, |
|||
// avatar_wx:1, |
|||
// token:token, |
|||
// uid:uid, |
|||
// }, |
|||
// success:function(e){ |
|||
// that.avatar=dataURL; |
|||
// alert('修改成功'); |
|||
// $(".tsk").show().delay(1500).hide(0); |
|||
// } |
|||
// }); |
|||
}; |
|||
} |
|||
|
|||
}, |
|||
async aaaaa(){ |
|||
// const res = await upordown() |
|||
}, |
|||
changeFile(file, fileList){ |
|||
|
|||
console.log("file") |
|||
console.log(file) |
|||
console.log("fileList") |
|||
console.log(fileList) |
|||
|
|||
}, |
|||
handleRemove(file, fileList) { |
|||
console.log(file, fileList); |
|||
}, |
|||
handlePreview(file) { |
|||
console.log(file); |
|||
}, |
|||
handleExceed(files, fileList) { |
|||
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
|||
}, |
|||
beforeRemove(file, fileList) { |
|||
return this.$confirm(`确定移除 ${ file.name }?`); |
|||
}, |
|||
// 加分弹窗 |
|||
showJia(row){ |
|||
this.form.planid=row.id |
|||
this.dialogFormVisible=true |
|||
}, |
|||
// 减分弹窗 |
|||
showJian(row){ |
|||
this.jianForm.planid=row.id |
|||
this.jiandialogFormVisible=true |
|||
}, |
|||
// 部门列合并 |
|||
getSpanArr(data) { |
|||
// data就是我们从后台拿到的数据 |
|||
for (var i = 0; i < data.length; i++) { |
|||
if (i === 0) { |
|||
this.spanArr.push(1); |
|||
this.pos = 0; |
|||
} else { |
|||
// 判断当前元素与上一个元素是否相同 |
|||
if (data[i].parentid === data[i - 1].parentid) { |
|||
this.spanArr[this.pos] += 1; |
|||
this.spanArr.push(0); |
|||
} else { |
|||
this.spanArr.push(1); |
|||
this.pos = i; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 合并行 |
|||
objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
|||
if (columnIndex === 0) { |
|||
const _row = this.spanArr[rowIndex]; |
|||
const _col = _row > 0 ? 1 : 0; |
|||
console.log(`rowspan:${_row} colspan:${_col}`); |
|||
return { |
|||
// [0,0] 表示这一行不显示, [2,1]表示行的合并数 |
|||
rowspan: _row, |
|||
colspan: _col |
|||
}; |
|||
} |
|||
}, |
|||
// 删除操作 |
|||
//删除操作 |
|||
async deleteOperate(row) { |
|||
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}) |
|||
.then(async() => { |
|||
this.deleFrom.state=3; |
|||
this.deleFrom.outid=row.outId; |
|||
const res = await statedutyclass(this.deleFrom) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '删除成功!' |
|||
}) |
|||
|
|||
this.getDataList() |
|||
} |
|||
}) |
|||
}, |
|||
// 新增按钮 |
|||
showAdd(){ |
|||
this.dialogFormVisible=true; |
|||
console.log(this.dialogFormVisible) |
|||
}, |
|||
// 编辑按钮 |
|||
async showEdit(row){ |
|||
this.editFrom.outid=row.outId |
|||
const res = await getdutyclassinfo(this.editFrom) |
|||
this.editAdd = res.data |
|||
this.editDialogFormVisible=true; |
|||
|
|||
}, |
|||
// 开关状态监听 |
|||
async changeVal(val,id){ |
|||
console.log(val) |
|||
this.switchFrom.outid=id |
|||
if (val==1) { |
|||
this.switchFrom.state=1; |
|||
const res = await statedutyclass(this.switchFrom) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '修改状态成功', |
|||
showClose: true |
|||
}) |
|||
this.getDataList() |
|||
} |
|||
} else { |
|||
this.switchFrom.state=2; |
|||
const res = await statedutyclass(this.switchFrom) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '修改状态成功', |
|||
showClose: true |
|||
}) |
|||
this.getDataList() |
|||
} |
|||
} |
|||
}, |
|||
// 重置搜索条件 |
|||
onReset() { |
|||
this.searchInfo = {} |
|||
}, |
|||
// 条件搜索 |
|||
onSubmit() { |
|||
this.page = 1 |
|||
this.pageSize = 10 |
|||
this.getDataList() |
|||
}, |
|||
// 日期时间戳转日期格式 |
|||
formatDate(nS) { |
|||
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' '); |
|||
}, |
|||
|
|||
// 提交按钮 |
|||
async enterDialog(){ |
|||
this.$refs.addForm.validate(async valid => { |
|||
if (valid) { |
|||
this.form.type=1 |
|||
const res = await additionandsubtractionscore(this.form) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '成功', |
|||
showClose: true |
|||
}) |
|||
} |
|||
this.getDataList(); |
|||
this.closeDialog(); |
|||
} |
|||
}) |
|||
}, |
|||
// 减分提交按钮 |
|||
async jianenterDialog(){ |
|||
this.jianForm.type=2 |
|||
const res = await additionandsubtractionscore(this.jianForm) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '成功', |
|||
showClose: true |
|||
}) |
|||
} |
|||
this.getDataList(); |
|||
this.jiancloseDialog(); |
|||
|
|||
|
|||
|
|||
}, |
|||
|
|||
// 编辑提交按钮 |
|||
async editEnterDialog(){ |
|||
this.$refs.editForm.validate(async valid => { |
|||
if (valid) { |
|||
const res = await eitedutyclassinfo(this.editAdd) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '编辑成功', |
|||
showClose: true |
|||
}) |
|||
} |
|||
this.getDataList(); |
|||
this.editCloseDialog(); |
|||
} |
|||
}) |
|||
}, |
|||
// 加分框关闭 |
|||
closeDialog() { |
|||
console.log("closeDialog") |
|||
this.initForm() |
|||
this.dialogFormVisible = false |
|||
}, |
|||
// 减分框关闭 |
|||
jiancloseDialog() { |
|||
console.log("closeDialog") |
|||
this.jianInitForm() |
|||
this.jiandialogFormVisible = false |
|||
}, |
|||
// 修改框关闭 |
|||
editCloseDialog() { |
|||
this.editInitForm() |
|||
this.editDialogFormVisible = false |
|||
}, |
|||
// 加分重置表单 |
|||
initForm() { |
|||
this.$refs.addForm.resetFields() |
|||
this.form = {} |
|||
}, |
|||
// 减分重置表单 |
|||
jianInitForm() { |
|||
this.$refs.jianForm.resetFields() |
|||
this.jianForm = {} |
|||
}, |
|||
// 修改重置表单 |
|||
editInitForm() { |
|||
this.$refs.editForm.resetFields() |
|||
this.editAdd = {} |
|||
}, |
|||
// 改变pageSize |
|||
handleSizeChange(val) { |
|||
this.searchInfo.pagesize=val |
|||
this.getDataList(this.searchInfo) |
|||
}, |
|||
// 改变page |
|||
handleCurrentChange(val) { |
|||
this.searchInfo.page=val |
|||
this.getDataList(this.searchInfo) |
|||
}, |
|||
// 获取初始数据 |
|||
async getDataList() { |
|||
const res = await qualevalulist() |
|||
this.tableData = res.data |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.dashboard { |
|||
&-container { |
|||
margin: 30px; |
|||
} |
|||
&-text { |
|||
font-size: 30px; |
|||
line-height: 46px; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,116 @@ |
|||
{ |
|||
"folders": [ |
|||
{ |
|||
"path": "..\\..\\..\\代码\\vuecliDemo" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\aaa" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\代码\\gin-vue-admin-master\\gin-vue-admin-master\\server" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\代码\\gin-vue-admin-master\\gin-vue-admin-master\\web" |
|||
}, |
|||
{ |
|||
"path": "..\\gin-vue-admin" |
|||
}, |
|||
{ |
|||
"path": "..\\RuoYi-Vue\\ruoyi-ui" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\..\\工作目录(任)\\www.zbzlchgs.com" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\代码\\zxAcademyVue" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\代码\\ruoyi-ui" |
|||
}, |
|||
{ |
|||
"path": "..\\tank-front" |
|||
}, |
|||
{ |
|||
"path": "..\\gin-vue-admin-new" |
|||
}, |
|||
{ |
|||
"path": "..\\gin-vue-admin-dev" |
|||
}, |
|||
{ |
|||
"path": "..\\visual-drag-demo" |
|||
}, |
|||
{ |
|||
"path": "..\\easy-flow" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-mxgraph" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-bpmn-element" |
|||
}, |
|||
{ |
|||
"path": "..\\bpmn-demo" |
|||
}, |
|||
{ |
|||
"path": "..\\RuoYi-Vue-Process" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-activiti-demo" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-with-bpmn" |
|||
}, |
|||
{ |
|||
"path": "..\\logicflow_vue_demo" |
|||
}, |
|||
{ |
|||
"path": "..\\LogicFlow" |
|||
}, |
|||
{ |
|||
"path": "..\\jw-workflow-engine" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-flow-topology" |
|||
}, |
|||
{ |
|||
"path": "..\\logic-low-demo" |
|||
}, |
|||
{ |
|||
"path": "..\\..\\..\\aaa\\ruoyi-ui-new" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-workflow-chart" |
|||
}, |
|||
{ |
|||
"path": "..\\imitating-dingding-flow-chart" |
|||
}, |
|||
{ |
|||
"path": "..\\Workflow" |
|||
}, |
|||
{ |
|||
"path": "..\\tdesign-vue-develop" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-element-admin-master" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-element-admin" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-admin-template-master" |
|||
}, |
|||
{ |
|||
"path": "..\\vue_shop" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-element-admin-i18n" |
|||
}, |
|||
{ |
|||
"path": "..\\vue-admin-gin" |
|||
}, |
|||
{ |
|||
"path": "." |
|||
} |
|||
], |
|||
"settings": {} |
|||
} |
|||
Loading…
Reference in new issue