style: 格式化代码

This commit is contained in:
zyn
2023-12-19 16:03:26 +08:00
parent 8578a9cd87
commit c4079c7413
10 changed files with 902 additions and 852 deletions
@@ -9,46 +9,60 @@
<div class="search-area">
<el-form :model="standCommonlySearch" inline class="label-input-form">
<el-formItem label="类别" class="search-item">
<el-input v-model="standCommonlySearch.categorg" class="s-c-input" placeholder="标准/政策" clearable
:maxlength="100"></el-input>
<el-input
v-model="standCommonlySearch.categorg"
class="s-c-input"
placeholder="标准/政策"
clearable
:maxlength="100"
/>
</el-formItem>
<el-formItem label="关键字" class="search-item">
<el-input v-model="standCommonlySearch.cname" class="s-c-input" placeholder="请输入关键字" clearable
:maxlength="100"></el-input>
<el-input
v-model="standCommonlySearch.cname"
class="s-c-input"
placeholder="请输入关键字"
clearable
:maxlength="100"
/>
</el-formItem>
<el-form-item label="开始日期" >
<el-form-item label="开始日期">
<el-date-picker
v-model="standCommonlySearch.start"
type="date"
:editable="false"
placeholder="请选择开始日期"
size="small"
value-format="yyyy-MM-dd">
</el-date-picker>
value-format="yyyy-MM-dd"
/>
</el-form-item>
<el-form-item label="结束日期" >
<el-form-item label="结束日期">
<el-date-picker
v-model="standCommonlySearch.end"
type="date"
:editable="false"
placeholder="请选择结束日期"
size="small"
value-format="yyyy-MM-dd">
</el-date-picker>
value-format="yyyy-MM-dd"
/>
</el-form-item>
<el-formItem class="search-item btn-box">
<el-button
v-btn-permission="'0514cd2c6b0e6311a7632f8bef87aecb'"
type="primary"
size="mini"
class="common-button-primary"
v-btn-permission="'0514cd2c6b0e6311a7632f8bef87aecb'"
@click="sarStandCompareHisInfo">查询
@click="sarStandCompareHisInfo"
>
查询
</el-button>
<el-button
v-btn-permission="'bb7386429dabf20b8006e03efacc0673'"
class="common-button-default"
size="mini"
v-btn-permission="'bb7386429dabf20b8006e03efacc0673'"
@click="clearSearchStand">清空
@click="clearSearchStand"
>
清空
</el-button>
</el-formItem>
</el-form>
@@ -65,13 +79,15 @@
style="width: 100%;padding:0 0 20px 0;"
height="100%"
border
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
>
<el-table-column
type="index"
fixed="left"
width="55"
label="序号"
align="center">
type="index"
fixed="left"
width="55"
label="序号"
align="center"
>
<template slot-scope="{scope, column, $index}">
{{ ($index + 1) + (standCommonlySearch.page - 1) * standCommonlySearch.size }}
</template>
@@ -80,7 +96,8 @@
prop="category"
label="标准/政策"
width="150"
align="center">
align="center"
>
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.category }}</a>
</template>
@@ -88,16 +105,18 @@
<el-table-column
prop="cid"
label="标准名称/政策名称"
align="center">
align="center"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.cid }}</a>
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.cid }}</a>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="征求意见周期"
width="200"
align="center">
align="center"
>
<template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }}
</template>
@@ -106,29 +125,34 @@
prop="startTime"
label="上传时间"
width="200"
align="center">
</el-table-column>
align="center"
/>
</el-table>
</div>
</div>
</div>
<pagination :page="standCommonlySearch.page" :total="total" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
<pagination
:page="standCommonlySearch.page"
:total="total"
@pageChange="pageChange"
@pageSizeChange="pageSizeChange"
/>
<loading :loading="spinShow">数据加载中</loading>
</div>
</template>
<script>
export default {
name: "standardForComments",
name: 'StandardForComments',
components: {},
data() {
props: {},
data () {
return {
standCommonlySearch: {
categorg: "",
cname: "",
start: "",
end: "",
categorg: '',
cname: '',
start: '',
end: '',
page: 1,
size: this.$store.getters.userInfo.configContent
},
@@ -138,39 +162,46 @@ export default {
total: 0
};
},
props: {},
computed: {},
watch: {},
mounted () {
this.sarStandCompareHis();
this.tableHeight = $('.content').height() - 44;
window.onresize = () => {
this.tableHeight = $('.content').height() - 44;
};
},
methods: {
// 点击查看
handlePreview(item) {
this.$store.commit("setDetailMap", this.$router.path);
handlePreview (item) {
this.$store.commit('setDetailMap', this.$router.path);
this.$router.push({
name: "consultationDetails",
name: 'consultationDetails',
query: {
item: JSON.stringify(item)
}
});
},
// 清空
clearSearchStand() {
clearSearchStand () {
this.standCommonlySearch.page = 1;
this.standCommonlySearch.start = "";
this.standCommonlySearch.end = "";
this.standCommonlySearch.categorg = "";
this.standCommonlySearch.cname = "";
this.standCommonlySearch.start = '';
this.standCommonlySearch.end = '';
this.standCommonlySearch.categorg = '';
this.standCommonlySearch.cname = '';
this.sarStandCompareHis();
},
// 搜索
sarStandCompareHisInfo() {
sarStandCompareHisInfo () {
this.splitInfoPage = 1;
this.sarStandCompareHis();
},
// 查询表格
sarStandCompareHis() {
sarStandCompareHis () {
this.spinShow = true;
this.standCommonlySearch.type = 1;
var form = this.standCommonlySearch;
this.$http.get("slrs/sar-public-idea/SelectAllPage", form, {
const form = this.standCommonlySearch;
this.$http.get('slrs/sar-public-idea/SelectAllPage', form, {
_this: this
}, res => {
this.standInfoList = res.data.records;
@@ -179,24 +210,16 @@ export default {
}, e => {
});
},
pageChange(page) {
pageChange (page) {
this.standCommonlySearch.page = page;
this.sarStandCompareHis();
},
// 分页每页显示数改变后方法
pageSizeChange(pageSize) {
pageSizeChange (pageSize) {
this.$store.getters.userInfo.configContent = pageSize;
this.standCommonlySearch.size = pageSize;
this.sarStandCompareHis();
}
},
computed: {},
mounted() {
this.sarStandCompareHis();
this.tableHeight = $(".content").height() - 44;
window.onresize = () => {
this.tableHeight = $(".content").height() - 44;
};
}
};
</script>