mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 07:04:21 +08:00
增加检索栏目和右侧边栏待办信息,并修改BUG
This commit is contained in:
parent
befcbe0b05
commit
4105503024
104
src/components/HeaderMessage/index.vue
Normal file
104
src/components/HeaderMessage/index.vue
Normal file
@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-badge :value="122" class="item">
|
||||
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
title="待办提醒"
|
||||
width="380"
|
||||
trigger="click"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-help" />
|
||||
待整改
|
||||
<span>({{ 11 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-s-help" />
|
||||
待验收
|
||||
<span>({{ 22 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-s-operation" />
|
||||
其他
|
||||
<span>({{ 8 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-s-release" />
|
||||
待整改
|
||||
<span>({{ 11 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-s-data" />
|
||||
待验收
|
||||
<span>({{ 22 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-link>
|
||||
<i class="el-icon-s-grid" />
|
||||
其他
|
||||
<span>({{ 18 }})</span>
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="reference" class="el-icon-s-order" />
|
||||
</el-popover>
|
||||
</el-badge>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// fuse is a lightweight fuzzy-search module
|
||||
// make search results more in line with expectations
|
||||
|
||||
export default {
|
||||
name: 'HeaderMessage',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
options: [],
|
||||
searchPool: [],
|
||||
show: false,
|
||||
fuse: undefined
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
routes() {
|
||||
return this.$store.getters.permission_routes
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-icon-s-order{
|
||||
font-size: 22px !important;
|
||||
margin-top: 13px !important;
|
||||
}
|
||||
::v-deep .el-popover__title {
|
||||
font-size: 12px;
|
||||
}
|
||||
i{
|
||||
color:#1890ff;
|
||||
}
|
||||
::v-deep .el-badge__content.is-fixed{
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
</style>
|
28
src/components/Search/api/index.js
Normal file
28
src/components/Search/api/index.js
Normal file
@ -0,0 +1,28 @@
|
||||
import request from '@/utils/request'
|
||||
import store from '@/store/modules/user'
|
||||
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, data_id, table_name) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=editgrid&query_funid=sys_attach&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=sys_attach.data_id = ? and sys_attach.table_name = ?&where_type=string;string&where_value=${data_id};${table_name}`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getFunCol(funId) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=subeditgrid&query_funid=sys_fun_col&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=0&limit=50&where_sql=fun_col.fun_id = ?&where_value=${funId}&where_type=string`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getSelect(control_code) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=editgrid&query_funid=sys_control&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=0&limit=50&where_sql=(funall_control.control_code = ? )&where_value=${control_code}&where_type=string&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
}
|
||||
}
|
188
src/components/Search/index.vue
Normal file
188
src/components/Search/index.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="search">
|
||||
<el-select v-model="funCode" placeholder="请选择" @change="change">
|
||||
<el-option
|
||||
v-for="item in fun"
|
||||
:key="item.fun_col__col_code"
|
||||
:label="item.fun_col__col_name"
|
||||
:value="item.fun_col__col_code"
|
||||
/>
|
||||
</el-select>
|
||||
<div v-if="control === 'text' || control === 'selectwin'">
|
||||
<el-input v-model="searchVal" clearable placeholder="请输入内容" @keyup.enter.native="search" />
|
||||
</div>
|
||||
<div v-else-if="control === 'date'" class="combo-select">
|
||||
<el-date-picker
|
||||
v-model="searchVal"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="search"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="control === 'combo' || 'checkbox'" class="combo-select">
|
||||
<el-select v-model="searchVal" placeholder="请选择" clearable @change="search">
|
||||
<el-option
|
||||
v-for="item in combo"
|
||||
:key="item.funall_control__value_data"
|
||||
:label="item.funall_control__display_data"
|
||||
:value="item.funall_control__value_data"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-else-if="control === ''">
|
||||
<el-input v-model="searchVal" clearable placeholder="请输入内容" @keyup.enter.native="search" />
|
||||
</div>
|
||||
<el-button slot="append" icon="el-icon-search" @click="search" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from './api'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
// buttons
|
||||
},
|
||||
props: {
|
||||
dataId: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
tableName: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
funid: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
data: [],
|
||||
funCode: '',
|
||||
fun: [],
|
||||
searchVal: '',
|
||||
selData: [],
|
||||
control: 'text',
|
||||
control_name: '',
|
||||
combo: [],
|
||||
where_sql: '',
|
||||
where_value: '',
|
||||
where_type: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getFunCol()
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
getFunCol() {
|
||||
api.getFunCol(this.funid).then(data => {
|
||||
if (data.success) {
|
||||
this.fun = data.data.root
|
||||
this.funCode = this.fun[0].fun_col__col_code
|
||||
this.where_sql = `${this.fun[0].fun_col__col_code}`
|
||||
this.where_type = this.fun[0].fun_col__data_type
|
||||
setTimeout(() => {
|
||||
this.loading = false
|
||||
}, 200)
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
change(val) {
|
||||
this.searchVal = ''
|
||||
this.control = ''
|
||||
this.control_name = ''
|
||||
this.where_sql = ''
|
||||
this.where_type = ''
|
||||
this.selData = this.fun.filter(d => {
|
||||
return val === d.fun_col__col_code
|
||||
})
|
||||
|
||||
this.control = this.selData[0].fun_col__col_control
|
||||
this.control_name = this.selData[0].fun_col__control_name
|
||||
this.where_sql = `${this.selData[0].fun_col__col_code}`
|
||||
this.where_type = this.selData[0].fun_col__data_type
|
||||
if (this.control === 'combo') {
|
||||
this.getCombo()
|
||||
} else if (this.control === 'checkbox') {
|
||||
this.control_name = 'yesno'
|
||||
this.getCombo()
|
||||
}
|
||||
},
|
||||
getCombo() {
|
||||
api.getSelect(this.control_name).then(data => {
|
||||
if (data.success) {
|
||||
this.combo = data.data.root
|
||||
console.log(this.combo, 'this.combo')
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
search() {
|
||||
let whereValue
|
||||
let whereSql
|
||||
if (this.searchVal) {
|
||||
if (this.control === 'date') {
|
||||
const where_sql = `${this.where_sql} >= ?`
|
||||
const whereValue = `${this.searchVal}`
|
||||
const where_type = `date`
|
||||
whereSql = `where_sql=${where_sql}&where_value=${whereValue}&where_type=${where_type}`
|
||||
} else {
|
||||
whereValue = encodeURI(`\%${this.searchVal}\%`)
|
||||
whereSql = `where_sql=${this.where_sql} like ?&where_value=${whereValue}&where_type=${this.where_type}`
|
||||
}
|
||||
} else {
|
||||
whereSql = `where_sql=&where_value=&where_type=`
|
||||
}
|
||||
console.log(whereSql)
|
||||
this.$emit('search', `${whereSql}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.search{
|
||||
display: flex;
|
||||
.el-select,.el-select--medium{
|
||||
width: 30%;
|
||||
margin-left: 20%;
|
||||
}
|
||||
.el-input--medium,.el-input__inner{
|
||||
margin-right: 20%;
|
||||
width: 80%;
|
||||
float: right;
|
||||
}
|
||||
.combo-select{
|
||||
.el-select,.el-select--medium{
|
||||
margin-right: 20%;
|
||||
width: 80%;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.el-button--medium {
|
||||
height: 26.8px;
|
||||
width: 50px;
|
||||
padding: 0px;
|
||||
background-color: #1890ff;
|
||||
color:#fff;
|
||||
margin-left: -9%;
|
||||
}
|
||||
}
|
||||
::v-deep .el-input--medium .el-input__inner {
|
||||
height: 26.8px;
|
||||
line-height: 26.8px;
|
||||
}
|
||||
::v-deep .el-input--medium .el-input__icon {
|
||||
line-height: 26.8px;
|
||||
}
|
||||
</style>
|
@ -33,8 +33,8 @@ export default {
|
||||
const timestamp = new Date().getTime()
|
||||
return request({
|
||||
url: `fileAction.do?funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`,
|
||||
method: 'post',
|
||||
data: `funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`
|
||||
}).then(response => response.data)
|
||||
method: 'get'
|
||||
// data: `funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div v-if="d.label==='附件名称'">
|
||||
<a @click="downLoadAttach(scope.row)">
|
||||
<a :href="href" @click="downLoadAttach(scope.row)">
|
||||
{{
|
||||
scope.row.sys_attach__attach_name
|
||||
}}
|
||||
@ -79,7 +79,9 @@
|
||||
|
||||
<script>
|
||||
import api from './api'
|
||||
// import buttons from '@/components/Buttons'
|
||||
import store from '@/store/modules/user'
|
||||
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
@ -167,7 +169,8 @@ export default {
|
||||
whereValue: '',
|
||||
formData: {},
|
||||
attach_path: null,
|
||||
baseUrl: window.location.origin + '/bwhse/fileAction.do'
|
||||
baseUrl: window.location.origin + '/bwhse/fileAction.do',
|
||||
href: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -280,8 +283,10 @@ export default {
|
||||
console.log(val)
|
||||
this.ids = val.map(d => d.sys_attach__attach_id)
|
||||
},
|
||||
downLoadAttach(row) {
|
||||
api.downLoad(row.sys_attach__attach_id).then()
|
||||
async downLoadAttach(row) {
|
||||
const timestamp = new Date().getTime()
|
||||
this.href = `${this.baseUrl}?funid=sys_attach&keyid=${row.sys_attach__attach_id}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`
|
||||
// await api.downLoad(row.sys_attach__attach_id)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList)
|
||||
|
@ -5,10 +5,14 @@
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
|
||||
<template v-if="device!=='mobile'">
|
||||
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<error-log class="errLog-container right-menu-item hover-effect" />
|
||||
<message id="header-search" class="right-menu-item message" />
|
||||
|
||||
<!-- <error-log class="errLog-container right-menu-item hover-effect" /> -->
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
@ -37,20 +41,22 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import ErrorLog from '@/components/ErrorLog'
|
||||
// import ErrorLog from '@/components/ErrorLog'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
// import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import Message from '@/components/HeaderMessage'
|
||||
import { logout } from '@/api/user'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
ErrorLog,
|
||||
// ErrorLog,
|
||||
Screenfull,
|
||||
// SizeSelect,
|
||||
Search
|
||||
Search,
|
||||
Message
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
@ -117,9 +123,13 @@ export default {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.message{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
padding: 0 12px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
|
@ -146,3 +146,15 @@
|
||||
.el-dialog__footer {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
// 设置el-select样式
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
// .el-input--medium .el-input__inner {
|
||||
// height: 26.8px;
|
||||
// line-height: 26.8px;
|
||||
// }
|
||||
// .el-input--medium .el-input__icon {
|
||||
// line-height: 26.8px;
|
||||
// }
|
||||
|
@ -2,6 +2,7 @@ import axios from 'axios'
|
||||
import { MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import router from '@/router'
|
||||
|
||||
// create an axios instance
|
||||
const service = axios.create({
|
||||
@ -68,8 +69,8 @@ service.interceptors.response.use(
|
||||
return Promise.reject(new Error(res.message || 'Error'))
|
||||
} else {
|
||||
if (res.data.message === '当前用户没有登录!') {
|
||||
// store.dispatch('user/logout')
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
store.dispatch('user/logout')
|
||||
router.push(`/login`)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `commonAction.do?eventcode=query_data&funid=queryevent&pagetype=grid&query_funid=hidden_check&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="检查人">
|
||||
<el-form-item ref="hidden_danger__check_man" label="检查人" prop="hidden_danger__check_man">
|
||||
<el-input v-model="form.hidden_danger__check_man" placeholder="请选择检查人" class="input-with-select" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="checkManVisible = !checkManVisible" />
|
||||
</el-input>
|
||||
@ -41,7 +41,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="检查时间">
|
||||
<el-form-item label="检查时间" prop="hidden_danger__check_date">
|
||||
<el-date-picker
|
||||
v-model="form.hidden_danger__check_date"
|
||||
type="date"
|
||||
@ -199,6 +199,12 @@ export default {
|
||||
hidden_danger__check_dept_id: ''
|
||||
},
|
||||
rules: {
|
||||
hidden_danger__check_man: [
|
||||
{ required: true, message: '请选择检查人', trigger: 'blur' }
|
||||
],
|
||||
hidden_danger__check_date: [
|
||||
{ required: true, message: '请选择检查时间', trigger: 'blur' }
|
||||
],
|
||||
hidden_danger__check_problem: [
|
||||
{ required: true, message: '请输入隐患描述', trigger: 'blur' }
|
||||
]
|
||||
@ -215,6 +221,14 @@ export default {
|
||||
hiddenState: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.hidden_danger__check_man': {
|
||||
handler(val, oldVal) {
|
||||
this.$refs['hidden_danger__check_man'].clearValidate()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getHiddenState()
|
||||
},
|
||||
|
@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="检查人">
|
||||
<el-form-item ref="hidden_danger__check_man" label="检查人" prop="hidden_danger__check_man">
|
||||
<el-input v-model="form.hidden_danger__check_man" placeholder="请选择检查人" class="input-with-select" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="checkManVisible = !checkManVisible" />
|
||||
</el-input>
|
||||
@ -41,7 +41,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="检查时间">
|
||||
<el-form-item label="检查时间" prop="hidden_danger__check_date">
|
||||
<el-date-picker
|
||||
v-model="form.hidden_danger__check_date"
|
||||
type="date"
|
||||
@ -200,6 +200,12 @@ export default {
|
||||
hidden_danger__check_dept_id: ''
|
||||
},
|
||||
rules: {
|
||||
hidden_danger__check_man: [
|
||||
{ required: true, message: '请选择检查人', trigger: 'blur' }
|
||||
],
|
||||
hidden_danger__check_date: [
|
||||
{ required: true, message: '请选择检查时间', trigger: 'blur' }
|
||||
],
|
||||
hidden_danger__check_problem: [
|
||||
{ required: true, message: '请输入隐患描述', trigger: 'blur' }
|
||||
]
|
||||
@ -214,6 +220,14 @@ export default {
|
||||
hiddenState: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.hidden_danger__check_man': {
|
||||
handler(val, oldVal) {
|
||||
this.$refs['hidden_danger__check_man'].clearValidate()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getHiddenState()
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<buttons funid="hidden_check" style="margin:10px 10px" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="app-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="hidden_check" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="hidden_check" @search="search" />
|
||||
</div>
|
||||
<el-card>
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
@ -8,9 +13,11 @@
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
stripe
|
||||
type="index"
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -35,7 +42,7 @@
|
||||
<div v-else-if="d.label === '操作'">
|
||||
<el-button icon="el-icon-view" type="text" title="编辑" @click="edit(scope.row)" />
|
||||
<el-button icon="el-icon-folder" type="text" title="查看附件" @click="checkAttach(scope.row)" />
|
||||
<el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" />
|
||||
<!-- <el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" /> -->
|
||||
</div>
|
||||
<div v-else>{{ scope.row[d.prop] }}</div>
|
||||
</template>
|
||||
@ -55,8 +62,8 @@
|
||||
<el-dialog v-if="dialogUploadVisible" title="附件" :visible.sync="dialogUploadVisible" width="45%" @close="closeUploadDialog">
|
||||
<Attach ref="attach" :data-id="ids" table-name="hidden_danger" fun-id="hidden_check" @change="auditFormChange" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogUploadVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="save">确 定</el-button>
|
||||
<!-- <el-button @click="dialogUploadVisible = false">取 消</el-button> -->
|
||||
<el-button type="primary" @click="dialogUploadVisible = false">返回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-drawer
|
||||
@ -74,12 +81,14 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'HiddenCheck',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
Attach
|
||||
},
|
||||
data() {
|
||||
@ -182,7 +191,7 @@ export default {
|
||||
label: 'sys_dept__dept_name'
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereSql: '',
|
||||
whereValue: '',
|
||||
dialogUploadVisible: false,
|
||||
options: [],
|
||||
@ -204,8 +213,7 @@ export default {
|
||||
api.getDate(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -222,6 +230,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
queryAttach() {
|
||||
api.queryAttach(this.keyids).then(data => {
|
||||
if (data.success) {
|
||||
@ -283,26 +295,6 @@ export default {
|
||||
auditFormChange(form) {
|
||||
this.saveFrom = form
|
||||
},
|
||||
save() {
|
||||
if (Object.keys(this.saveFrom).length === 0) {
|
||||
this.saveFrom = this.auditForm
|
||||
}
|
||||
this.$refs.auditForm.$refs.auditForm.validate(valid => {
|
||||
if (valid) {
|
||||
const _form = `funid=sys_dept&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_dept__dept_code=${this.saveFrom.sys_dept__dept_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_dept__memo=${this.saveFrom.sys_dept__memo}&sys_dept__is_novalid=${this.saveFrom.sys_dept__is_novalid}&sys_dept__dept_id=${this.id}&sys_dept__dept_level=${this.saveFrom.sys_dept__dept_level}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereValue = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
closeUploadDialog() {
|
||||
this.dialogUploadVisible = false
|
||||
},
|
||||
@ -326,12 +318,6 @@ export default {
|
||||
this.form.dept_name = ''
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
},
|
||||
checkAttach(row) {
|
||||
// this.drawer = true
|
||||
this.ids = []
|
||||
@ -342,6 +328,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `commonAction.do?eventcode=query_data&funid=queryevent&pagetype=grid&query_funid=hidden_reform&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<buttons funid="hidden_reform" style="margin:10px 10px" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="app-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="hidden_reform" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="hidden_reform" @search="search" />
|
||||
</div>
|
||||
<el-card>
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
@ -11,6 +16,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -41,7 +47,7 @@
|
||||
<div v-else-if="d.label === '操作'">
|
||||
<el-button icon="el-icon-view" type="text" title="编辑" @click="edit(scope.row)" />
|
||||
<el-button icon="el-icon-folder" type="text" title="查看附件" @click="checkAttach(scope.row)" />
|
||||
<el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" />
|
||||
<!-- <el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" /> -->
|
||||
</div>
|
||||
<div v-else>{{ scope.row[d.prop] }}</div>
|
||||
</template>
|
||||
@ -61,8 +67,8 @@
|
||||
<el-dialog v-if="dialogUploadVisible" title="附件" :visible.sync="dialogUploadVisible" width="45%" @close="closeUploadDialog">
|
||||
<Attach ref="attach" :data-id="ids" table-name="hidden_danger" fun-id="hidden_check" @change="auditFormChange" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogUploadVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="save">确 定</el-button>
|
||||
<!-- <el-button @click="dialogUploadVisible = false">取 消</el-button> -->
|
||||
<el-button type="primary" @click="dialogUploadVisible = false">返回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -71,12 +77,14 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'HiddenReform',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
Attach
|
||||
},
|
||||
data() {
|
||||
@ -204,8 +212,7 @@ export default {
|
||||
api.getDate(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -218,6 +225,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
editCreate() {
|
||||
const param = `/hidden_danger/hidden_reform/create`
|
||||
this.$router.push(param)
|
||||
@ -262,26 +273,6 @@ export default {
|
||||
auditFormChange(form) {
|
||||
this.saveFrom = form
|
||||
},
|
||||
save() {
|
||||
if (Object.keys(this.saveFrom).length === 0) {
|
||||
this.saveFrom = this.auditForm
|
||||
}
|
||||
this.$refs.auditForm.$refs.auditForm.validate(valid => {
|
||||
if (valid) {
|
||||
const _form = `funid=sys_dept&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_dept__dept_code=${this.saveFrom.sys_dept__dept_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_dept__memo=${this.saveFrom.sys_dept__memo}&sys_dept__is_novalid=${this.saveFrom.sys_dept__is_novalid}&sys_dept__dept_id=${this.id}&sys_dept__dept_level=${this.saveFrom.sys_dept__dept_level}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereValue = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
closeUploadDialog() {
|
||||
this.dialogUploadVisible = false
|
||||
},
|
||||
@ -305,12 +296,6 @@ export default {
|
||||
this.form.dept_name = ''
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
},
|
||||
checkAttach(row) {
|
||||
// this.drawer = true
|
||||
this.ids = []
|
||||
@ -321,6 +306,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `commonAction.do?eventcode=query_data&funid=queryevent&pagetype=grid&query_funid=hidden_review&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<buttons funid="hidden_review" style="margin:10px 10px" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="app-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="hidden_review" @Create="editCreate" @Del="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="hidden_review" @search="search" />
|
||||
</div>
|
||||
<el-card>
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
@ -11,6 +16,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -37,7 +43,7 @@
|
||||
<div v-else-if="d.label === '操作'">
|
||||
<el-button icon="el-icon-view" type="text" title="编辑" @click="edit(scope.row)" />
|
||||
<el-button icon="el-icon-folder" type="text" title="查看附件" @click="checkAttach(scope.row)" />
|
||||
<el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" />
|
||||
<!-- <el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" /> -->
|
||||
</div>
|
||||
<div v-else>{{ scope.row[d.prop] }}</div>
|
||||
</template>
|
||||
@ -57,8 +63,8 @@
|
||||
<el-dialog v-if="dialogUploadVisible" title="附件" :visible.sync="dialogUploadVisible" width="45%" @close="closeUploadDialog">
|
||||
<Attach ref="attach" :data-id="ids" table-name="hidden_danger" fun-id="hidden_check" @change="auditFormChange" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogUploadVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="save">确 定</el-button>
|
||||
<!-- <el-button @click="dialogUploadVisible = false">取 消</el-button> -->
|
||||
<el-button type="primary" @click="dialogUploadVisible = false">返回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -67,12 +73,14 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'HiddenReview',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
Attach
|
||||
},
|
||||
data() {
|
||||
@ -160,7 +168,7 @@ export default {
|
||||
label: 'sys_dept__dept_name'
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereSql: '',
|
||||
whereValue: '',
|
||||
dialogUploadVisible: false
|
||||
}
|
||||
@ -194,6 +202,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
editCreate() {
|
||||
const param = `/hidden_danger/hidden_review/create`
|
||||
this.$router.push(param)
|
||||
@ -232,26 +244,6 @@ export default {
|
||||
auditFormChange(form) {
|
||||
this.saveFrom = form
|
||||
},
|
||||
save() {
|
||||
if (Object.keys(this.saveFrom).length === 0) {
|
||||
this.saveFrom = this.auditForm
|
||||
}
|
||||
this.$refs.auditForm.$refs.auditForm.validate(valid => {
|
||||
if (valid) {
|
||||
const _form = `funid=sys_dept&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_dept__dept_code=${this.saveFrom.sys_dept__dept_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_dept__memo=${this.saveFrom.sys_dept__memo}&sys_dept__is_novalid=${this.saveFrom.sys_dept__is_novalid}&sys_dept__dept_id=${this.id}&sys_dept__dept_level=${this.saveFrom.sys_dept__dept_level}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereValue = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
} else {
|
||||
this.$message.error(data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
closeUploadDialog() {
|
||||
this.dialogUploadVisible = false
|
||||
},
|
||||
@ -275,12 +267,6 @@ export default {
|
||||
this.form.dept_name = ''
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
},
|
||||
checkAttach(row) {
|
||||
// this.drawer = true
|
||||
this.ids = []
|
||||
@ -291,6 +277,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `commonAction.do?eventcode=query_data&funid=queryevent&pagetype=grid&query_funid=insp_name&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
Crerte(data) {
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<div class="buttons">
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -169,7 +172,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router.back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_check')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -193,4 +197,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,17 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
getDate(id, pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(id, pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=subeditgrid&query_funid=insp_item&user_id=administrator`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=(insp_item.insp_name_id = ?)${whereSql}&where_value=${id}${whereValue}&where_type=string${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
Crerte(data) {
|
||||
|
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<buttons funid="insp_item" style="margin-bottom:10px" @editCreate="editCreate" @editDelete="editDelete" />
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="insp_item" style="margin-bottom:10px" @editCreate="editCreate" @editDelete="editDelete" />
|
||||
</div>
|
||||
<Search funid="insp_item" @search="search" />
|
||||
</div>
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
v-loading="loading"
|
||||
@ -63,10 +68,12 @@
|
||||
import api from './api'
|
||||
import publicApi from '@/api/public'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
buttons
|
||||
buttons,
|
||||
Search
|
||||
},
|
||||
|
||||
data() {
|
||||
@ -136,7 +143,7 @@ export default {
|
||||
label: 'sys_dept__dept_name'
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereSql: '',
|
||||
whereValue: '',
|
||||
title: ''
|
||||
}
|
||||
@ -161,8 +168,7 @@ export default {
|
||||
this.id,
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -175,6 +181,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
editCreate() {
|
||||
this.title = '新增'
|
||||
this.form = JSON.parse(JSON.stringify(this.initFrom))
|
||||
@ -251,7 +261,7 @@ export default {
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.whereSql = ''
|
||||
this.getList(this.id)
|
||||
},
|
||||
async getTypeSel() {
|
||||
@ -267,6 +277,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -1,9 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<buttons funid="insp_name" style="margin:10px 10px" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="app-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="insp_name" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<!-- <Search funid="insp_name" @search="search" /> -->
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-card>
|
||||
<Search class="search" funid="insp_name" @search="search" />
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
v-loading="loading"
|
||||
@ -81,11 +87,13 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import InspItem from './components/insp_item'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
InspItem
|
||||
},
|
||||
data() {
|
||||
@ -154,8 +162,7 @@ export default {
|
||||
api.getDate(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -168,6 +175,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
editCreate() {
|
||||
this.title = '新增'
|
||||
this.dialogFormVisible = true
|
||||
@ -252,15 +263,20 @@ export default {
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.search {
|
||||
margin-left: -50px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDate(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `commonAction.do?eventcode=query_data&funid=queryevent&pagetype=grid&query_funid=safe_insp&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<div class="buttons">
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -269,7 +272,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router.back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/insp/safe_insp')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -293,4 +297,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<div class="buttons">
|
||||
<buttons funid="safe_insp" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -254,7 +257,8 @@ export default {
|
||||
this.inspNameVisible = false
|
||||
},
|
||||
back() {
|
||||
// this.$router.back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/insp/safe_insp')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -278,4 +282,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,17 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
getDate(id, pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDate(id, pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=subeditgrid&query_funid=insp_det&user_id=administrator`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=(insp_det.safe_insp_id = ?)${whereSql}&where_value=${id}${whereValue}&where_type=string${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<buttons funid="safe_insp" style="margin-bottom:10px" @Create="editCreate" @Del="editDelete" />
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="insp_det" style="margin-bottom:10px" @Create="editCreate" @Del="editDelete" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="insp_det" @search="search" />
|
||||
</div>
|
||||
<el-table
|
||||
ref="deptTable"
|
||||
v-loading="loading"
|
||||
@ -31,7 +36,7 @@
|
||||
</div>
|
||||
<div v-else-if="d.label === '操作'">
|
||||
<el-button icon="el-icon-view" type="text" title="编辑" @click="edit(scope.row)" />
|
||||
<el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" />
|
||||
<!-- <el-button v-if="scope.row.status !== 'NULLIFY'" icon="el-icon-delete" style="color:#F56C6C" type="text" title="删除" @click="Delete(scope.row)" /> -->
|
||||
</div>
|
||||
<div v-else>{{ scope.row[d.prop] }}</div>
|
||||
</template>
|
||||
@ -70,6 +75,13 @@
|
||||
<el-button type="primary" @click="create">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-if="dialogUploadVisible" title="附件" :visible.sync="dialogUploadVisible" width="45%" @close="closeUploadDialog">
|
||||
<Attach ref="attach" :data-id="ids" table-name="insp_det" fun-id="insp_det" @change="auditFormChange" />
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<!-- <el-button @click="dialogUploadVisible = false">取 消</el-button> -->
|
||||
<el-button type="primary" @click="dialogUploadVisible = false">返回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -77,10 +89,14 @@
|
||||
import api from './api'
|
||||
import publicApi from '@/api/public'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import Attach from '@/components/sys_attach'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
buttons
|
||||
buttons,
|
||||
Search,
|
||||
Attach
|
||||
},
|
||||
props: {
|
||||
id: {
|
||||
@ -169,7 +185,8 @@ export default {
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereValue: ''
|
||||
whereValue: '',
|
||||
dialogUploadVisible: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -189,8 +206,7 @@ export default {
|
||||
this.id,
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -203,6 +219,22 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
upload() {
|
||||
if (this.ids.length > 1) {
|
||||
this.$message.warning('只能选择一条数据!')
|
||||
} else if (this.ids.length === 0) {
|
||||
this.$message.warning('请选择一条数据!')
|
||||
} else {
|
||||
this.dialogUploadVisible = true
|
||||
}
|
||||
},
|
||||
closeUploadDialog() {
|
||||
this.dialogUploadVisible = false
|
||||
},
|
||||
editCreate() {
|
||||
this.title = '新增'
|
||||
this.form = JSON.parse(JSON.stringify(this.initFrom))
|
||||
@ -278,12 +310,6 @@ export default {
|
||||
this.form.dept_name = ''
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
},
|
||||
async getTypeSel() {
|
||||
await publicApi.getTypeSel('inspresult').then(data => {
|
||||
if (data.success) {
|
||||
@ -297,6 +323,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<buttons funid="insp_det" style="margin:10px 10px" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="app-container">
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="insp_det" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="safe_insp" @search="search" />
|
||||
</div>
|
||||
<el-card>
|
||||
<el-table
|
||||
ref="table"
|
||||
@ -12,6 +17,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -61,11 +67,13 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
components: {
|
||||
buttons
|
||||
buttons,
|
||||
Search
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -183,7 +191,7 @@ export default {
|
||||
label: 'sys_dept__dept_name'
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereSql: '',
|
||||
whereValue: ''
|
||||
}
|
||||
},
|
||||
@ -203,8 +211,7 @@ export default {
|
||||
api.getDate(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -217,6 +224,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
async transitionTree() {
|
||||
await api.getDeptTree().then(data => {
|
||||
if (data.success) {
|
||||
@ -356,7 +367,7 @@ export default {
|
||||
const _form = `funid=sys_dept&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_dept__dept_code=${this.saveFrom.sys_dept__dept_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_dept__memo=${this.saveFrom.sys_dept__memo}&sys_dept__is_novalid=${this.saveFrom.sys_dept__is_novalid}&sys_dept__dept_id=${this.id}&sys_dept__dept_level=${this.saveFrom.sys_dept__dept_level}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereSql = ''
|
||||
this.whereValue = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
@ -389,17 +400,15 @@ export default {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form.dept_name = ''
|
||||
this.form.dept_code = ''
|
||||
},
|
||||
handleNodeClick(data) {
|
||||
console.log(data)
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -4,17 +4,11 @@ import store from '@/store/modules/user'
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
|
||||
export default {
|
||||
getDept(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `sys_dept.dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getDept(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=editgrid&query_funid=sys_dept&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<buttons funid="sys_dept" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="sys_dept" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="sys_dept" @search="search" />
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="5">
|
||||
<el-card>
|
||||
@ -18,6 +23,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -94,11 +100,13 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import AdutiDept from './components/auditDept'
|
||||
export default {
|
||||
name: 'Guide',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
AdutiDept
|
||||
},
|
||||
data() {
|
||||
@ -169,7 +177,7 @@ export default {
|
||||
label: 'sys_dept__dept_name'
|
||||
},
|
||||
treeList: [],
|
||||
whereSql: false,
|
||||
whereSql: '',
|
||||
whereValue: ''
|
||||
}
|
||||
},
|
||||
@ -189,8 +197,7 @@ export default {
|
||||
api.getDept(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -203,6 +210,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
async transitionTree() {
|
||||
await api.getDeptTree().then(data => {
|
||||
if (data.success) {
|
||||
@ -349,8 +360,7 @@ export default {
|
||||
const _form = `funid=sys_dept&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_dept__dept_code=${this.saveFrom.sys_dept__dept_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_dept__memo=${this.saveFrom.sys_dept__memo}&sys_dept__is_novalid=${this.saveFrom.sys_dept__is_novalid}&sys_dept__dept_id=${this.id}&sys_dept__dept_level=${this.saveFrom.sys_dept__dept_level}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereValue = ''
|
||||
this.whereSql = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
this.dialogEditVisible = false
|
||||
@ -391,14 +401,18 @@ export default {
|
||||
this.pager.pageNo = 0
|
||||
this.pager.pageSize = 10
|
||||
this.pager.total = 0
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.whereValue = encodeURI(`\%${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = `where_sql=sys_dept.dept_id like ?&where_value=${this.whereValue}&where_type=String`
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
@ -3,17 +3,11 @@ import store from '@/store/modules/user'
|
||||
|
||||
var roles = store.state.roles.replace(/;/g, '')
|
||||
export default {
|
||||
getUser(pageSize, pageNo, isWhereSql, whereValue) {
|
||||
let whereSql = ''
|
||||
let whereType = ''
|
||||
if (isWhereSql) {
|
||||
whereSql = `sys_dept.dept_id like ?`
|
||||
whereType = 'string'
|
||||
}
|
||||
getUser(pageSize, pageNo, whereSql) {
|
||||
return request({
|
||||
url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=editgrid&query_funid=sys_user&user_id=${roles}`,
|
||||
method: 'post',
|
||||
data: `start=${pageNo}&limit=${pageSize}&where_sql=${whereSql}&where_value=${whereValue}&where_type=${whereType}&is_query=1&query_type=0`
|
||||
data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0`
|
||||
}).then(response => response.data)
|
||||
},
|
||||
getDeptTree() {
|
||||
|
@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<buttons funid="sys_dept" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
<div class="head">
|
||||
<div>
|
||||
<buttons funid="sys_dept" @editCreate="editCreate" @editDelete="editDelete" @editSave="editSave" @upload="upload" />
|
||||
</div>
|
||||
<Search funid="sys_user" @search="search" />
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
<el-card>
|
||||
@ -19,6 +24,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-dblclick="cellDblclick"
|
||||
>
|
||||
<el-table-column type="index" fixed="left" width="35px" />
|
||||
<template v-for="(d,i) in tableHeader">
|
||||
<el-table-column v-if="d.type && d.type === 'selection'" :key="i" :type="d.type" :fixed="d.fixed" />
|
||||
<el-table-column
|
||||
@ -112,12 +118,14 @@
|
||||
<script>
|
||||
import api from './api'
|
||||
import buttons from '@/components/Buttons'
|
||||
import Search from '@/components/Search'
|
||||
import AdutiUser from './components/auditUser'
|
||||
import Attach from '@/components/sys_attach'
|
||||
export default {
|
||||
name: 'User',
|
||||
components: {
|
||||
buttons,
|
||||
Search,
|
||||
AdutiUser,
|
||||
Attach
|
||||
},
|
||||
@ -125,6 +133,8 @@ export default {
|
||||
return {
|
||||
loading: false,
|
||||
data: [],
|
||||
fun: [],
|
||||
searchVal: '',
|
||||
deptTree: [],
|
||||
ids: [],
|
||||
levels: [],
|
||||
@ -238,8 +248,7 @@ export default {
|
||||
api.getUser(
|
||||
this.pager.pageSize,
|
||||
pageNo,
|
||||
this.whereSql,
|
||||
this.whereValue
|
||||
this.whereSql
|
||||
).then(data => {
|
||||
if (data.success) {
|
||||
this.data = data.data.root
|
||||
@ -252,6 +261,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
search(sql) {
|
||||
this.whereSql = sql
|
||||
this.getList()
|
||||
},
|
||||
async transitionTree() {
|
||||
await api.getDeptTree().then(data => {
|
||||
if (data.success) {
|
||||
@ -392,7 +405,6 @@ export default {
|
||||
const _form = `funid=sys_user&parentId=&levelCol=sys_dept.dept_level&keyid=${this.id}&pagetype=editgrid&eventcode=save_eg&sys_user__user_name=${this.saveFrom.sys_user__user_name}&sys_user__user_code=${this.saveFrom.sys_user__user_code}&sys_dept__dept_name=${this.saveFrom.sys_dept__dept_name}&sys_user__is_leader=${this.saveFrom.sys_user__is_leader}&sys_user__duty=${this.saveFrom.sys_user__duty}&sys_user__phone_code=${this.saveFrom.sys_user__phone_code}&sys_user__mob_code=${this.saveFrom.sys_user__mob_code}&sys_user__sex=${this.saveFrom.sys_user__sex}&sys_user__email=${this.saveFrom.sys_user__email}&sys_user__is_novalid=${this.saveFrom.sys_user__is_novalid}&sys_user__memo=${this.saveFrom.sys_user__memo}&sys_user__user_id=${this.id}&sys_user__dept_id=${this.saveFrom.sys_user__dept_id}&user_id=administrator&dataType=json`
|
||||
api.auditSave(_form).then(data => {
|
||||
if (data.success) {
|
||||
this.whereSql = false
|
||||
this.whereValue = ''
|
||||
this.getList()
|
||||
this.$message.success('保存成功!')
|
||||
@ -436,14 +448,18 @@ export default {
|
||||
this.pager.pageNo = 0
|
||||
this.pager.pageSize = 10
|
||||
this.pager.total = 0
|
||||
this.whereValue = encodeURI(`${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = true
|
||||
this.whereValue = encodeURI(`\%${data.sys_dept__dept_id}\%`)
|
||||
this.whereSql = `where_sql=sys_dept.dept_id like ?&where_value=${this.whereValue}&where_type=String`
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.el-card {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user