|
|
@@ -0,0 +1,91 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-input style="width:200px;" :placeholder="$t('输入搜索内容')" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="mt-10 input-with-select inline-16 layout_search__panel" clearable>
|
|
|
+ </el-input>
|
|
|
+ <table-detail :layout="tablecols" :data="list" :custom="true" :width="true" :height="tableHieght" minHeight="200px" fixedName="operation">
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <div v-if="scope.column.columnname === 'progress'">
|
|
|
+ {{Math.round((scope.column.data[[scope.column.columnname]] * 100) * 100)/100 + '%'}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'billno'">
|
|
|
+ <el-button type="text" @click="goDetail(scope.column.data)">{{scope.column.data[[scope.column.columnname]]}}</el-button>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ {{ scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation' ? scope.column.data[[scope.column.columnname]] : '--' }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </table-detail>
|
|
|
+ <div class="container normal-panel" style="text-align:right;padding-bottom: 0!important;">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-sizes="[50, 100, 150, 200]"
|
|
|
+ :page-size="50"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ name: "index",
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ tableHieght:'calc(100vh - 380px)',
|
|
|
+ tablecols:[],
|
|
|
+ list:[],
|
|
|
+ currentPage:0,
|
|
|
+ total:0,
|
|
|
+ param:{
|
|
|
+ "id": 2026020215314702,
|
|
|
+ "content": {
|
|
|
+ "sa_service_improvementid": this.$route.query.id,
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 50,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ async listData(){
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
+ this.list = res.data
|
|
|
+ this.total = res.total
|
|
|
+ this.currentPage = res.pageNumber
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ // console.log(`每页 ${val} 条`);
|
|
|
+ this.param.content.pageSize = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.param.content.pageNumber = val
|
|
|
+ this.listData()
|
|
|
+ },
|
|
|
+ goDetail(data){
|
|
|
+ this.$router.replace({
|
|
|
+ path: "/serviceImprovementDetail",
|
|
|
+ query: { id: data.sa_service_improvementid,rowindex: data.rowindex},
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.listData(this.param.content.pageNumber = 1)
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).serviceImprovementRelationTable.tablecols
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|