提交修改

This commit is contained in:
quyixiao 2020-09-21 17:21:08 +08:00
parent 8ebaee9668
commit 368f2e39b1
5 changed files with 48 additions and 60 deletions

View File

@ -17,6 +17,10 @@ export const apiSysRoleList = (params, id) => {
return http({url: `/lz_management/user/lzstaffrole/role/list/${id}`, method: 'get', params})
}
export const apiSysRoleConfirm = (data, type) => {
return http({ url: `/lz_management/user/lzstaffrole/updateOrAdd`, method: 'post', data })
export const apiDelete = params => {
return http({url: `/lz_management/user/lzstaffrole/delete/${params}`, method: 'post'})
}
export const apiSysRoleConfirm = (data, type) => {
return http({url: `/lz_management/user/lzstaffrole/updateOrAdd`, method: 'post', data})
}

View File

@ -57,7 +57,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
<el-button type="danger" @click="dataFormDelete()" >删除</el-button>
<el-button v-if="auth.deleteDetail == 1 " type="danger" @click="dataFormDelete()" >删除</el-button>
</span>
</el-dialog>
</template>

View File

@ -27,25 +27,28 @@
<span >直属上级:<b>{{ superStaff }}</b></span>
<div class="titleBottom">
<div class="bottom" v-show="this.auth.commit == 1" >
<p> <el-button type="primary" @click="commitApprovalYes('你确认要提交审批吗?')">提交审批</el-button></p>
<div class="bottom" v-if="this.auth.commit == 1" >
<el-button size="mini" type="primary" @click="commitApprovalYes('你确认要提交审批吗?')">提交审批</el-button>
</div>
<div class="bottom" v-show="this.auth.approvel == 1">
<p>
<el-button type="primary" @click="commitApprovalAddOrUpdate(1)">
<label >审批</label>
</el-button>
</p>
<div class="bottom" v-if=" auth.add == 1 " >
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate(0,1)" >添加</el-button>
</div>
<div class="bottom" v-show="this.auth.confirmCommit == 1">
<p><el-button type="primary" style="" @click="commitApprovalYes('你要确认得分吗?')">确认得分</el-button></p>
<div class="bottom" v-if="this.auth.confirmCommit == 1">
<el-button size="mini" type="primary" style="" @click="commitApprovalYes('你要确认得分吗?')">确认得分</el-button>
</div>
<div class="bottom" v-if="this.auth.approvel == 1">
<el-button type="primary" size="mini" @click="commitApprovalAddOrUpdate(1)"><label >审批</label></el-button>
</div>
<div class="bottom" v-show="this.auth.reject === 1">
<p><el-button type="warning" @click="commitApprovalAddOrUpdate(5)" ><label >驳回</label></el-button></p>
<el-button size="mini" type="warning" @click="commitApprovalAddOrUpdate(5)" ><label >驳回</label></el-button>
</div>
<div class="bottom" v-show="this.auth.uploadFile === 1 ">
@ -55,6 +58,11 @@
<div class="bottom" >
<p><span @click="uploadDownFile(2)" ><label :class="'label bg-info my_pointer'">下载附件{{fileCount}}</label></span></p>
</div>
<div class="bottom" >
<p><span @click="uploadDownFile(2)" ><label :class="'label bg-info my_pointer'">下载附件{{fileCount}}</label></span></p>
</div>
</div>
</div>
@ -81,21 +89,6 @@
</template>
</el-table-column>
<!--
<el-table-column label="3.5-考核标准" prop="keyResult35" align="left" width="280">
<template slot-scope="scope" >
<div v-html="scope.row.keyResult35" class="rich">
</div>
</template>
</el-table-column>
<el-table-column label="3.75-考核标准" prop="keyResult37" align="left" width="280">
<template slot-scope="scope" >
<div v-html="scope.row.keyResult37" class="rich">
</div>
</template>
</el-table-column>-->
<el-table-column label="考核权重" prop="checkWeight" align="center" >
<template slot-scope="scope">
<div class="conatnt-name">
@ -125,8 +118,8 @@
</el-table-column>
<el-table-column width="80" label="操作" v-if="(auth.add === 1 || auth.edit == 1) && hasOperator" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate(0,scope.row.type )" v-if="scope.row.isAdd===1 && auth.add == 1 ">添加</el-button>
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isEdit > 0 && auth.edit == 1">编辑</el-button>
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isEdit > 0 && auth.edit == 1 && auth.editScore == 0">编辑</el-button>
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isEdit > 0 && auth.editScore == 1">评分</el-button>
</template>
</el-table-column>
</el-table>
@ -352,8 +345,8 @@ export default {
if (rowIndex >= this.yeJiCheckNum + 1 && rowIndex < this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
if (columnIndex === 1) {
return [1, 4]
} else if (columnIndex === 2 || columnIndex === 3 || columnIndex === 4) {
return [1, 2]
} else if (columnIndex === 2) {
return [0, 0]
}
}

View File

@ -6,7 +6,7 @@
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
label-width="80px">
<el-form-item label="员工姓名">
<el-select v-model="dataForm.staffId" placeholder="请选择" clearable filterable>
<el-select v-model="dataForm.staffId" prop="staffId" placeholder="请选择" clearable filterable>
<el-option
v-for="item in staffs"
:key="item.id"
@ -22,7 +22,7 @@
v-for="item in departmentLevels"
:key="item.id"
:label="item.departmentLevel"
:value="item.id">
:value="item.departmentLevel">
</el-option>
</el-select>
</el-form-item>
@ -192,7 +192,6 @@ export default {
this.visible = false
return
}
alert( this.dataForm.departmentLevel)
this.$refs['dataForm'].validate((valid) => {
if (valid) {
let params = {

View File

@ -2,12 +2,11 @@
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
<el-input v-model="dataForm.name" placeholder="参数名" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button v-if="isAuth('user:lzstaffrole:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
<el-button v-if="isAuth('user:lzstaffrole:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
</el-form-item>
</el-form>
<el-table
@ -86,13 +85,13 @@
<script>
import AddOrUpdate from './lzstaffrole-add-or-update'
import {apiGetRoleList} from '@/api/api_staff_role'
import {apiGetRoleList,apiDelete} from '@/api/api_staff_role'
export default {
data () {
return {
dataForm: {
key: ''
name: ''
},
dataList: [],
pageIndex: 1,
@ -150,7 +149,7 @@
})
},
//
deleteHandle (id) {
async deleteHandle (id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
@ -159,24 +158,17 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/user/lzstaffrole/delete'),
method: 'post',
data: this.$http.adornData(ids, false)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
const data = apiDelete(id)
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
}
})
}
}