Browse Source

优化页面

master
李磊 3 years ago
parent
commit
8f74ef3217
  1. 39
      src/api/user.js
  2. 25
      src/views/user/user.vue
  3. 9
      src/views/ysjl/3000/dj/yy/index.vue
  4. 37
      src/views/ysjl/3000/dj/zw/index.vue

39
src/api/user.js

@ -0,0 +1,39 @@
import api from '@/utils/api'
import qs from 'qs'
export function add(data) {
return api({
url: '/user',
method: 'post',
data
})
}
export function edit(data) {
return api({
url: '/user',
method: 'put',
data
})
}
export function del(params) {
return api({
url: '/user',
method: 'delete',
params,
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
})
}
export function getList(params) {
return api({
url: '/user/list',
method: 'get',
params
})
}
export default { add, edit, del, getList }

25
src/views/user/user.vue

@ -34,12 +34,20 @@
添加
</el-button>
<el-button
v-if="hasPerm('user:delete')"
type="danger"
icon="el-icon-edit"
@click="delUser"
>
冻结
</el-button>
<!-- <el-button
icon="el-icon-document"
type="primary"
@click="handleDownload"
>
导出Excel
</el-button>
</el-button>-->
</el-form-item>
</el-form>
</div>
@ -62,7 +70,6 @@
<el-table-column slot="operation" align="center" width="100" label="操作">
<template slot-scope="scope">
<Edit :permission="permission" :data="scope.row" :disabled-edit="false" />
<Delete :permission="permission" :data="scope.row" style="margin-left: 5px" />
</template>
</el-table-column>
</CustomTable>
@ -185,10 +192,9 @@ import CRUD, { form, header, presenter } from '@/components/Crud/crud'
// import Crud from '@/components/Crud'
// import Query from '@/components/Crud/Query'
import Edit from '@/components/Crud/Edit'
import Delete from '@/components/Crud/Delete'
import CustomTable from '@/components/Crud/Table'
import Pagination from '@/components/Crud/Pagination'
import CrudRole from '@/api/role'
import CrudUser from '@/api/user'
import { mapGetters } from 'vuex'
import { parseTime } from '../../utils'
// import Pagination from '@/components/Pagination'
@ -198,7 +204,7 @@ const defaultCrud = presenter(CRUD({
url: '/user/list',
orderBy: ['id asc'],
param: {},
crudMethod: { ...CrudRole }
crudMethod: { ...CrudUser }
}))
// form
@ -210,7 +216,7 @@ const defaultForm = form({
})
export default {
name: 'UserList',
components: { Pagination, CustomTable, Edit, Delete },
components: { Pagination, CustomTable, Edit },
mixins: [defaultCrud, defaultForm, header()],
data() {
return {
@ -551,6 +557,13 @@ export default {
} else {
return null
}
},
delUser() {
CrudUser.del({
ids: this.$refs.customTable.$refs.table.selection.map(row => row.id)
}).then(() => {
this.crud.toQuery()
})
}
}
}

9
src/views/ysjl/3000/dj/yy/index.vue

@ -63,16 +63,21 @@ export default {
header: [
{
label: '层站',
prop: 'D8',
prop: 'D9',
type: 1
},
{
label: '6.3施力层门间隙',
prop: 'D7',
prop: 'D8',
type: 1
},
{
label: '6.3门扇与门扇',
prop: 'D7',
type: 1
},
{
label: '6.3门扇与立柱',
prop: 'D6',
type: 1
},

37
src/views/ysjl/3000/dj/zw/index.vue

@ -7,7 +7,7 @@
import baseInfo from '@/views/ysjl/3000/common/index'
export default {
name: 'ElevatorYeyin',
name: 'ElevatorZaWu',
components: { baseInfo },
data() {
return {
@ -17,11 +17,12 @@ export default {
header: [
{
label: '层站',
prop: 'D7',
prop: 'D2',
type: 1
},
{
label: '6.8门的闭合',
prop: 'D1',
type: 1
}
],
@ -58,37 +59,7 @@ export default {
data: []
}
],
tableHeader2: [
{
label: '电动机电流载重量百分比',
type: 1
},
{
label: '30%',
prop: 'D1',
type: 1
},
{
label: '40%',
prop: 'D2',
type: 1
},
{
label: '45%',
prop: 'D3',
type: 1
},
{
label: '50%',
prop: 'D4',
type: 1
},
{
label: '60%',
prop: 'D5',
type: 1
}
],
tableHeader2: [],
list: [],
list1: []
}

Loading…
Cancel
Save