车辆附件列表修改

product
17602169347 2 years ago
parent 523931deef
commit 1a56d37fca

@ -49,7 +49,7 @@
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="12" >
<!-- <el-col :span="12" >
<el-form-item label="录入人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
@ -66,7 +66,7 @@
</el-input>
</el-form-item>
</el-col>
</el-col> -->
</template>
</el-form>
</el-row>

@ -40,33 +40,42 @@
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="id" label="ID" width="0" align="left"
/>
<el-table-column prop="ticketno" label="车牌号" width="0" align="left"
/>
<el-table-column prop="drivername" label="司机名称" width="0" align="left"
/>
<el-table-column prop="contact" label="手机号" width="0" align="left"
/>
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left"
/>
<el-table-column prop="creatorusername" label="录入人" width="0" align="left"
/>
<el-table-column prop="creatortime" label="创建时间" width="0" align="left"
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<!-- <el-table-column prop="id" label="ID" width="0" align="left" /> -->
<el-table-column prop="ticketno" label="车牌号" width="0" align="left" />
<el-table-column prop="drivername" label="司机名称" width="0" align="left" />
<el-table-column prop="contact" label="手机号" width="0" align="left" />
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclephotos)" :key="index">
<el-popover placement="left" trigger="click" width="300">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
<el-table-column label="操作" fixed="right"
width="100" >
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
@ -77,14 +86,22 @@
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm, ExportBox,Detail},
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
@ -99,7 +116,8 @@
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -108,12 +126,26 @@
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'ticketno', label: '车牌号'},
{prop: 'drivername', label: '司机名称'},
{prop: 'contact', label: '手机号'},
{prop: 'creatorusername', label: '录入人'},
{prop: 'creatortime', label: '创建时间'},
columnList: [{
prop: 'ticketno',
label: '车牌号'
},
{
prop: 'drivername',
label: '司机名称'
},
{
prop: 'contact',
label: '手机号'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'creatortime',
label: '创建时间'
},
],
}
},
@ -132,7 +164,11 @@
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -176,8 +212,7 @@
}
});
})
}).catch(() => {
});
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
@ -208,8 +243,7 @@
}
});
})
}).catch(() => {
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
@ -224,7 +258,12 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/Vehicle/Actions/Export`,
method: 'GET',

Loading…
Cancel
Save