安全隐患整改前端页面
parent
c093e4dd91
commit
9d129fae53
|
@ -22,14 +22,20 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="提交时间" prop="dateRange">
|
||||
<el-date-picker v-model="queryParams.dataRange" type="daterange" style="width: 300px;" range-separator="--"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" :size="size" />
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-tabs v-model="data.activeName" class="main-tabs">
|
||||
<el-tab-pane :label="data.tabInfo['a']" name="a"></el-tab-pane>
|
||||
<el-tab-pane :label="data.tabInfo['b']" name="b"></el-tab-pane>
|
||||
<el-tab-pane :label="data.tabInfo['c']" name="c"></el-tab-pane>
|
||||
<el-tab-pane :label="data.tabInfo['d']" name="d"></el-tab-pane>
|
||||
<el-tab-pane :label="data.tabInfo['e']" name="e"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-table v-loading="loading" :data="problemmodifyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="${comment}" align="center" prop="id" />
|
||||
|
@ -127,7 +133,9 @@ const data = reactive({
|
|||
comId: [
|
||||
{ required: true, message: "租户ID不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
},
|
||||
activeName: 'a',
|
||||
tabInfo: {}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
@ -135,7 +143,19 @@ const { queryParams, form, rules } = toRefs(data);
|
|||
/** 查询安全隐患整改列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listProblemmodify(queryParams.value).then(response => {
|
||||
let postData = {
|
||||
infoType: 0,
|
||||
problemType: queryParams.value.problemType,
|
||||
dangerType: queryParams.value.dangerType,
|
||||
lordSent: queryParams.value.lordSent,
|
||||
createUser: queryParams.value.createUser,
|
||||
projectName: " abcde".indexOf(data.activeName)
|
||||
};
|
||||
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
||||
postData.createTime = queryParams.value.dataRange[0];
|
||||
postData.updateTime = queryParams.value.dataRange[1];
|
||||
}
|
||||
listProblemmodify(postData).then(response => {
|
||||
problemmodifyList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
|
@ -254,13 +274,41 @@ function handleDelete(row) {
|
|||
}).catch(() => { });
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('trouble/problemmodify/export', {
|
||||
...queryParams.value
|
||||
}, `problemmodify_${new Date().getTime()}.xlsx`)
|
||||
function getCount() {
|
||||
let postData = {
|
||||
infoType: 0,
|
||||
problemType: queryParams.value.problemType,
|
||||
dangerType: queryParams.value.dangerType,
|
||||
lordSent: queryParams.value.lordSent,
|
||||
createUser: queryParams.value.createUser
|
||||
};
|
||||
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
||||
postData.createTime = queryParams.value.dataRange[0];
|
||||
postData.updateTime = queryParams.value.dataRange[1];
|
||||
}
|
||||
data.tabInfo = {
|
||||
a: '全部数据(0)',
|
||||
b: '待整改(0)',
|
||||
c: '待复检(0)',
|
||||
d: '整改完成(0)',
|
||||
e: '整改超时(0)',
|
||||
};
|
||||
getListCount(postData).then(response => {
|
||||
let obj = {
|
||||
a: '全部数据',
|
||||
b: '待整改',
|
||||
c: '待复检',
|
||||
d: '整改完成',
|
||||
e: '整改超时',
|
||||
};
|
||||
(response.data || []).forEach(it => {
|
||||
data.tabInfo[it.projectName] = obj[it.projectName] + `(${it.id || 0})`
|
||||
});
|
||||
});
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
getCount();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.trouble-problemodify-index {
|
||||
|
|
Loading…
Reference in New Issue