|
@@ -2,6 +2,14 @@
|
|
|
<div class="app-container" style="padding: 0px;">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
<el-form-item>
|
|
|
+ <el-form-item label="关键字" prop="keywords">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.keywords"
|
|
|
+ placeholder="请输入关键字"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
@@ -47,7 +55,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table :height="clientHeight" border v-loading="loading" :data="questionnaireList" @selection-change="handleSelectionChange" style="font-size: 12px;">
|
|
|
+ <el-table :height="clientHeight" :row-style="rowStyle" border v-loading="loading" :data="questionnaireList" @selection-change="handleSelectionChange" style="font-size: 12px;">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="年份" align="center" prop="year"/>
|
|
|
<el-table-column label="问卷类型" align="center" prop="type">
|
|
@@ -74,10 +82,18 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="MinimumStandard" align="center" prop="minimumStandard" width="150" />
|
|
|
- <el-table-column label="标准文档" align="center" prop="minimumStandard" width="150" />
|
|
|
- <el-table-column label="Good Pratices" align="center" prop="minimumStandard" width="150" />
|
|
|
- <el-table-column label="链接" align="center" prop="link" width="150" />
|
|
|
- <el-table-column label="备注" align="center" prop="remarks" width="150" />
|
|
|
+ <el-table-column label="标准文档" align="center" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'standard')"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="Good Pratices" align="center" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'good-practices')"></el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="链接" align="center" prop="link" width="300" />
|
|
|
+ <el-table-column label="备注" align="center" prop="remarks" width="300" />
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
@@ -90,7 +106,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数据状态" align="center" prop="delFlag" width="150" >
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.delFlag == 0 ? "" : "已删除"}}</span>
|
|
|
+ <span>{{scope.row.delFlag == 0 ? "正常" : "删除"}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
|
|
@@ -106,7 +122,14 @@
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
+ v-if="scope.row.delFlag == 0"
|
|
|
>删除</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleRecover(scope.row)"
|
|
|
+ v-if="scope.row.delFlag == 2"
|
|
|
+ >恢复</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -264,13 +287,15 @@ export default {
|
|
|
name: null,
|
|
|
yesNoNa: null,
|
|
|
minimumStandard: null,
|
|
|
- remarks: null
|
|
|
+ remarks: null,
|
|
|
+ keywords: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
openitemForm: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
+ directory: [{required: true, message: "目录不可为空", trigger: "blur"}],
|
|
|
},
|
|
|
// 附件参数
|
|
|
doc: {
|
|
@@ -305,32 +330,32 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.clientHeight = (document.body.clientHeight - 80) * 0.8
|
|
|
})
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ rowStyle({row, rowIndex}) {
|
|
|
+ if (row.delFlag == 2) {
|
|
|
+ return {
|
|
|
+ background: "#DCDCDC"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 附件按钮操作 */
|
|
|
handleDoc(row , type) {
|
|
|
var typeName = "";
|
|
|
- if (type === "questionnaire-standard"){
|
|
|
- typeName = "标准附件";
|
|
|
- this.doc.pType = type
|
|
|
- this.doc.queryParams.pType = type
|
|
|
- this.doc.id = row.id;
|
|
|
- this.doc.title = "标准附件(CODE " + row.code + ")";
|
|
|
- this.doc.open = true;
|
|
|
- this.doc.queryParams.pId = row.id
|
|
|
- this.doc.pId = row.id
|
|
|
- this.getFileList();
|
|
|
- } else if (type === 'audit') {
|
|
|
- this.$router.push({
|
|
|
- path: '/rc/file',
|
|
|
- query: {
|
|
|
- linkId: row.id,
|
|
|
- linkName: 'questionnaire',
|
|
|
- auditResult: this.auditResult,
|
|
|
- }
|
|
|
- })
|
|
|
+ if (type === "standard"){
|
|
|
+ typeName = "标准";
|
|
|
+ } else if (type === 'good-practices') {
|
|
|
+ typeName = "Good Practices";
|
|
|
}
|
|
|
+ this.doc.title = typeName + "(CODE " + row.code + ")";
|
|
|
+ this.doc.pType = type;
|
|
|
+ this.doc.queryParams.pType = type;
|
|
|
+ this.doc.id = row.id;
|
|
|
+ this.doc.open = true;
|
|
|
+ this.doc.queryParams.pId = row.id
|
|
|
+ this.doc.pId = row.id
|
|
|
+ this.getFileList();
|
|
|
},
|
|
|
getFileList(){
|
|
|
allFileList(this.doc.queryParams).then(response => {
|
|
@@ -388,7 +413,6 @@ export default {
|
|
|
/** 查询问卷列表 */
|
|
|
getList(chapterId) {
|
|
|
this.loading = true;
|
|
|
- this.loading = false;
|
|
|
if (chapterId != null) {
|
|
|
this.queryParams.chapterId = chapterId;
|
|
|
}
|
|
@@ -416,7 +440,6 @@ export default {
|
|
|
yesNoNa: null,
|
|
|
minimumStandard: null,
|
|
|
remarks: null,
|
|
|
- deptId: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -427,8 +450,11 @@ export default {
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ // this.handleQuery();
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.queryParams.chapterId = null;
|
|
|
+ this.getList(null);
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -439,7 +465,6 @@ export default {
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
- this.form.chapterId = this.queryParams.chapterId;
|
|
|
this.open = true;
|
|
|
this.title = "添加问卷";
|
|
|
},
|
|
@@ -453,6 +478,17 @@ export default {
|
|
|
this.title = "修改问卷";
|
|
|
});
|
|
|
},
|
|
|
+ handleRecover(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal.confirm('是否确认恢复问卷编号为"' + ids + '"的数据项?').then(function() {
|
|
|
+ row.delFlag = 0;
|
|
|
+ row.deleteTime = null;
|
|
|
+ updateStandardQuestionnaire(row);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("恢复成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|