|
|
@@ -82,14 +82,14 @@
|
|
|
@click="onSelect()"
|
|
|
>选择</el-button
|
|
|
> -->
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="primary"
|
|
|
:icon="expandAll ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
|
|
|
@click="dakai"
|
|
|
size="mini"
|
|
|
:disabled="rule ? false : true"
|
|
|
>{{ expandAll ? "收起所有行" : "展开所有行" }}</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
</el-col>
|
|
|
<right-toolbar
|
|
|
:showSearch.sync="showSearch"
|
|
|
@@ -100,94 +100,34 @@
|
|
|
<el-table
|
|
|
size="small"
|
|
|
:data="tableData"
|
|
|
+ :span-method="spanMethod"
|
|
|
border
|
|
|
- :default-expand-all="expandAll"
|
|
|
v-if="fresh"
|
|
|
style="width: 100%"
|
|
|
- :cell-style="tableCellStyle"
|
|
|
- :header-cell-style="tableHeaderCellStyle"
|
|
|
+
|
|
|
v-loading="loading"
|
|
|
height="600"
|
|
|
>
|
|
|
- <el-table-column type="expand">
|
|
|
- <template slot-scope="props">
|
|
|
- <el-table
|
|
|
- :data="props.row.pointDtoList"
|
|
|
- style="width: 100%"
|
|
|
- size="small"
|
|
|
- :header-cell-style="pointTableHeaderCellStyle"
|
|
|
- >
|
|
|
- <el-table-column type="index"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="name"
|
|
|
- label="履职内容"
|
|
|
- v-if="columns[3].visible"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <div style="white-space: pre-wrap">
|
|
|
- {{ scope.row.name }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="areaName"
|
|
|
- label="履职区域"
|
|
|
- width="200"
|
|
|
- show-overflow-tooltip
|
|
|
- v-if="columns[4].visible"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="checkName"
|
|
|
- label="履职点位"
|
|
|
- width="200"
|
|
|
- show-overflow-tooltip
|
|
|
- align="center"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <!-- <el-table-column prop="dataTypeName" label="数据类型">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="degreeRiskName" label="风险等级">
|
|
|
- </el-table-column> -->
|
|
|
- </el-table>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
type="index"
|
|
|
- label="序号"
|
|
|
- width="80"
|
|
|
+ label="履职项序号"
|
|
|
+ width="120"
|
|
|
v-if="columns[0].visible"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{
|
|
|
- arabicToChinese(
|
|
|
- (queryParams.pageNum - 1) * queryParams.pageSize +
|
|
|
- scope.$index +
|
|
|
- 1
|
|
|
- )
|
|
|
- }}
|
|
|
+ <template slot-scope="scope">({{
|
|
|
+ arabicToChinese(scope.row.itemIndex)
|
|
|
+ }})
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
prop="name"
|
|
|
label="履职项"
|
|
|
+ width="350"
|
|
|
v-if="columns[1].visible"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column prop="itemDesc" label="标准及要求">
|
|
|
- </el-table-column> -->
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- prop="pointNums"
|
|
|
- label="履职内容数量"
|
|
|
- width="200"
|
|
|
- v-if="columns[2].visible"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="操作"
|
|
|
@@ -214,6 +154,31 @@
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column align="center" width="150px" label="履职内容序号" prop="pointIndex"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="pointName"
|
|
|
+ label="履职内容"
|
|
|
+ v-if="columns[3].visible"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="areaName"
|
|
|
+ label="履职区域"
|
|
|
+ width="150"
|
|
|
+ show-overflow-tooltip
|
|
|
+ v-if="columns[4].visible"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="checkName"
|
|
|
+ label="履职点位"
|
|
|
+ width="150"
|
|
|
+ show-overflow-tooltip
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
v-show="total > 0"
|
|
|
@@ -358,11 +323,45 @@ export default {
|
|
|
}
|
|
|
this.tableData = [];
|
|
|
this.loading = true;
|
|
|
- page(this.queryParams).then((data) => {
|
|
|
- this.tableData = data.rows;
|
|
|
- this.total = Number.parseInt(data.total);
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ page(this.queryParams)
|
|
|
+ .then((data) => {
|
|
|
+ // debugger
|
|
|
+ this.loading=false;
|
|
|
+ let d = [];
|
|
|
+ let itemIndex = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + 1;
|
|
|
+
|
|
|
+ for (let item of data.rows) {
|
|
|
+ let { id, name } = item;
|
|
|
+ let first = true;
|
|
|
+ let pointIndex = 1;
|
|
|
+ for (let p of item.pointDtoList) {
|
|
|
+ let { name: pointName, areaName, checkName } = p;
|
|
|
+ let r = {
|
|
|
+ id,
|
|
|
+ name,
|
|
|
+ pointName,
|
|
|
+ areaName,
|
|
|
+ checkName,
|
|
|
+ pointIndex,
|
|
|
+ itemIndex,
|
|
|
+ };
|
|
|
+ pointIndex++;
|
|
|
+
|
|
|
+ if (first) {
|
|
|
+ r.rowSpan = item.pointDtoList.length;
|
|
|
+ first = false;
|
|
|
+ }
|
|
|
+ d.push(r);
|
|
|
+ }
|
|
|
+ itemIndex++;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.tableData=d;
|
|
|
+ this.total = Number.parseInt(data.total);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
clicktreenode(data, node) {
|
|
|
this.tableData = [];
|
|
|
@@ -446,10 +445,19 @@ export default {
|
|
|
tableHeaderCellStyle() {
|
|
|
return "border-color:#aaa;";
|
|
|
},
|
|
|
- pointTableHeaderCellStyle(){
|
|
|
+ pointTableHeaderCellStyle() {
|
|
|
// return "background-color:#d7d7d7 !important";
|
|
|
return "";
|
|
|
- }
|
|
|
+ },
|
|
|
+ spanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (columnIndex < 3) {
|
|
|
+ if (row.rowSpan > 0) {
|
|
|
+ return [row.rowSpan, 1];
|
|
|
+ } else {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|