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>
<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" icon="el-icon-document"
type="primary" type="primary"
@click="handleDownload" @click="handleDownload"
> >
导出Excel 导出Excel
</el-button> </el-button>-->
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -62,7 +70,6 @@
<el-table-column slot="operation" align="center" width="100" label="操作"> <el-table-column slot="operation" align="center" width="100" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<Edit :permission="permission" :data="scope.row" :disabled-edit="false" /> <Edit :permission="permission" :data="scope.row" :disabled-edit="false" />
<Delete :permission="permission" :data="scope.row" style="margin-left: 5px" />
</template> </template>
</el-table-column> </el-table-column>
</CustomTable> </CustomTable>
@ -185,10 +192,9 @@ import CRUD, { form, header, presenter } from '@/components/Crud/crud'
// import Crud from '@/components/Crud' // import Crud from '@/components/Crud'
// import Query from '@/components/Crud/Query' // import Query from '@/components/Crud/Query'
import Edit from '@/components/Crud/Edit' import Edit from '@/components/Crud/Edit'
import Delete from '@/components/Crud/Delete'
import CustomTable from '@/components/Crud/Table' import CustomTable from '@/components/Crud/Table'
import Pagination from '@/components/Crud/Pagination' import Pagination from '@/components/Crud/Pagination'
import CrudRole from '@/api/role' import CrudUser from '@/api/user'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { parseTime } from '../../utils' import { parseTime } from '../../utils'
// import Pagination from '@/components/Pagination' // import Pagination from '@/components/Pagination'
@ -198,7 +204,7 @@ const defaultCrud = presenter(CRUD({
url: '/user/list', url: '/user/list',
orderBy: ['id asc'], orderBy: ['id asc'],
param: {}, param: {},
crudMethod: { ...CrudRole } crudMethod: { ...CrudUser }
})) }))
// form // form
@ -210,7 +216,7 @@ const defaultForm = form({
}) })
export default { export default {
name: 'UserList', name: 'UserList',
components: { Pagination, CustomTable, Edit, Delete }, components: { Pagination, CustomTable, Edit },
mixins: [defaultCrud, defaultForm, header()], mixins: [defaultCrud, defaultForm, header()],
data() { data() {
return { return {
@ -551,6 +557,13 @@ export default {
} else { } else {
return null 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: [ header: [
{ {
label: '层站', label: '层站',
prop: 'D8', prop: 'D9',
type: 1 type: 1
}, },
{ {
label: '6.3施力层门间隙', label: '6.3施力层门间隙',
prop: 'D7', prop: 'D8',
type: 1 type: 1
}, },
{ {
label: '6.3门扇与门扇', label: '6.3门扇与门扇',
prop: 'D7',
type: 1
},
{
label: '6.3门扇与立柱',
prop: 'D6', prop: 'D6',
type: 1 type: 1
}, },

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

@ -7,7 +7,7 @@
import baseInfo from '@/views/ysjl/3000/common/index' import baseInfo from '@/views/ysjl/3000/common/index'
export default { export default {
name: 'ElevatorYeyin', name: 'ElevatorZaWu',
components: { baseInfo }, components: { baseInfo },
data() { data() {
return { return {
@ -17,11 +17,12 @@ export default {
header: [ header: [
{ {
label: '层站', label: '层站',
prop: 'D7', prop: 'D2',
type: 1 type: 1
}, },
{ {
label: '6.8门的闭合', label: '6.8门的闭合',
prop: 'D1',
type: 1 type: 1
} }
], ],
@ -58,37 +59,7 @@ export default {
data: [] data: []
} }
], ],
tableHeader2: [ 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
}
],
list: [], list: [],
list1: [] list1: []
} }

Loading…
Cancel
Save