Commit 45227aad by liuyong

修改页面

1 parent 6ad7149f
......@@ -259,11 +259,19 @@ export function deleteAllBaoGaoMoBanJieGouHua(params) {
export function deleteAllBaoGaoMoBanGuanLianShiYong(params) {
return post('/kl-report-temp-link/updKlReportTempLinkBatch', params);
}
// 报告模版关联使用,删除
// 报告模版关联使用,删除,编辑
export function deleteBaoGaoMoBanGuanLianShiYong(params) {
return post('/kl-report-temp-link/updKlReportTempLink', params);
}
// 总体架构资产文档导出
export function getDocPoolExcel(params) {
return download('/excel/etDp', params);
}
// 报告模版关联使用,新增
export function addBaoGaoMoBanGuanLianShiYong(params) {
return post('/kl-report-temp-link/adKlReportTempLink', params);
}
// 报告模版关联使用-模版名称
export function getMoBanMingCheng(params) {
return post('/kl-report-temp/gtKlReportTemp', params);
}
\ No newline at end of file
......@@ -9,16 +9,17 @@
</div>
<div class="search_menu_item">
<span class="search_title">模板类型</span>
<el-select v-model="searchParams.tempType" placeholder="请选择" class="search_item">
<el-option label="需求模版" :value="1"></el-option>
<el-option label="概设模版" :value="2"></el-option>
</el-select>
<el-input v-model="searchParams.tempType" placeholder="请输入内容" class="search_item"></el-input>
<!-- <el-select v-model="searchParams.tempType" placeholder="请选择" class="search_item">
<el-option v-for="item in moBanLeiXing" :key="item.value" :label="item.tempName" :value="item.value"></el-option>
</el-select> -->
</div>
<div class="search_menu_item">
<span class="search_title">创建时间</span>
<el-date-picker
v-model="searchParams.createTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
......@@ -92,11 +93,8 @@
<el-form-item label="模版名称:" prop="let1">
<el-input v-model="ruleForm.let1"></el-input>
</el-form-item>
<el-form-item label="模版类型:" prop="let2" style="margin-left: 27px;width: 30.5%;">
<el-select v-model="ruleForm.let2" placeholder="请选择" style="width: 200px;">
<el-option label="需求模版" :value="1"></el-option>
<el-option label="概设模版" :value="2"></el-option>
</el-select>
<el-form-item label="模版类型:" prop="let2">
<el-input v-model="ruleForm.let2"></el-input>
</el-form-item>
<el-form-item label="模版文件:" style="width: 100%;">
<!-- <input @change="fileUpload" type="file" /> -->
......@@ -131,7 +129,7 @@ import {
addReportTemplateFabric,
get_BaoGaoMoBanJieGouHua_Table,
editReportTemplateFabric,
deleteAllBaoGaoMoBanJieGouHua
deleteAllBaoGaoMoBanJieGouHua,
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
......@@ -172,6 +170,7 @@ export default {
},
is_add_edit: 'add',
editId: undefined,
moBanLeiXing: []
};
},
mounted(){
......@@ -180,6 +179,7 @@ export default {
})
this.set_table_height();
this.get_table();
},
methods: {
editItem(row) {//编辑
......@@ -372,10 +372,17 @@ export default {
},
get_table() {//查询表格数据
this.loading = true;
let beginTime_;
let endTime_;
if(this.searchParams.createTime) {
beginTime_ = this.searchParams.createTime[0];
endTime_ = this.searchParams.createTime[1];
}
const params = {
"tempName": this.searchParams.tempName,
"tempType": this.searchParams.tempType,
"createTime": this.searchParams.createTime,
"beginTime": beginTime_,
"endTime": endTime_,
"current": this.pager.current,
"pageSize": this.pager.size,
};
......@@ -389,7 +396,6 @@ export default {
item['createTime_'] = createTime_year + '-' + createTime_month + '-' + createTime_day;
})
console.log(res)
this.tableData = res.records;
this.pager.current = res.current;
this.pager.total = res.total;
......@@ -456,6 +462,12 @@ export default {
/deep/ .el-dialog__close {
color: #fff;
}
/deep/ .is-checked .el-checkbox__inner{
background-color: #0D867F;
}
/deep/ .is-indeterminate .el-checkbox__inner{
background-color: #0D867F;
}
.search_menu{
display: flex;
justify-content: space-between;
......
......@@ -120,9 +120,7 @@
</el-form-item>
<el-form-item label="模板名称:" prop="let4">
<el-select v-model="ruleForm.let4" placeholder="请选择" style="width: 210px;">
<el-option label="已发布" value="1"></el-option>
<el-option label="已停用" value="0"></el-option>
<el-option label="暂存" value="2"></el-option>
<el-option v-for="item in moBanMingCheng" :key="item.krtId" :label="item.tempName" :value="item.krtId"></el-option>
</el-select>
</el-form-item>
</div>
......@@ -130,7 +128,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="ok">保存</el-button>
<el-button class="greenButton" @click="ok">编辑文档</el-button>
<el-button class="greenButton">编辑文档</el-button>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
......@@ -141,7 +139,9 @@
import {
get_BaoGaoMoBanGuanLianShiYong_Table,
deleteBaoGaoMoBanGuanLianShiYong,
deleteAllBaoGaoMoBanGuanLianShiYong
deleteAllBaoGaoMoBanGuanLianShiYong,
addBaoGaoMoBanGuanLianShiYong,
getMoBanMingCheng
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
......@@ -176,7 +176,14 @@ export default {
size: 10,
total: 20 //总条数
},
tableHeight: null
tableHeight: null,
moBanMingCheng: [],
is_add_edit: 'add',
tempName_: null,
krtId_: null,
krtCode_: null,
deptId_: null,
deptCode_: null,
};
},
mounted(){
......@@ -185,8 +192,20 @@ export default {
})
this.set_table_height();
this.get_table();
this.get_mo_ban_ming_cheng_select().then(res => {
this.moBanMingCheng = res;
})
},
methods: {
get_mo_ban_ming_cheng_select() {//模版名称下拉
return new Promise((resolve, reject) => {
getMoBanMingCheng({}).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
importFile() {//导入
const inpEle = document.createElement("input");
inpEle.type = "file";
......@@ -203,8 +222,14 @@ export default {
this.ruleForm.let1 = row.deptName;
this.ruleForm.let2 = row.appName;
this.ruleForm.let3 = row.projectName;
this.ruleForm.let4 = row.level;
this.ruleForm.let4 = row.krtId;
this.add_dialog = true;
this.is_add_edit = 'edit';
this.tempName_ = row.tempName;
this.krtId_ = row.krtId;
this.krtCode_ = row.krtCode;
this.deptId_ = row.deptId;
this.deptCode_ = row.deptCode;
},
editDocItem(){//编辑文档
......@@ -245,14 +270,63 @@ export default {
ok() {//弹框点击确定
this.$refs.form.validate(valid => {
if(valid) {
console.log(this.ruleForm)
const params = {
tpoName: this.ruleForm.let1,
scope: this.ruleForm.let2,
deptName: this.ruleForm.let3,
level: this.ruleForm.let4,
let result = this.moBanMingCheng.find(item => item.krtId == this.ruleForm.let4);
const krtCode = result ? result.krtCode : null;
const krtId = result ? result.krtId : null;
const tempName = result ? result.tempName : null;
const params1 = {
deptName: 1,
appName: this.ruleForm.let2,
projectName: this.ruleForm.let3,
tempName,
krtCode,
krtId,
};
const params2 = {
deptName: this.ruleForm.let1,
appName: this.ruleForm.let2,
projectName: this.ruleForm.let3,
tempName: this.tempName_,
krtCode: this.krtCode_,
krtId: this.krtId_,
deptId: this.deptId_,
deptCode: this.deptCode_,
};
const requestParams = this.is_add_edit == 'add' ? params1 : params2;
if(this.is_add_edit == 'add') {
addBaoGaoMoBanGuanLianShiYong(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '新增成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
deleteBaoGaoMoBanGuanLianShiYong(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '编辑成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}
}else {
return false;
}
......@@ -276,6 +350,7 @@ export default {
},
add() {//新建按钮
this.add_dialog = true;
this.is_add_edit = 'add';
this.ruleForm.let1 = null;
this.ruleForm.let2 = null;
this.ruleForm.let3 = null;
......@@ -411,6 +486,12 @@ export default {
/deep/ .cross2 > .el-form-item__content{
width: 88% !important;
}
/deep/ .is-checked .el-checkbox__inner{
background-color: #0D867F;
}
/deep/ .is-indeterminate .el-checkbox__inner{
background-color: #0D867F;
}
.form_item_container{
display: flex;
flex-wrap: wrap;
......
......@@ -12,6 +12,7 @@
<el-date-picker
v-model="searchParams.startTime"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
......@@ -188,8 +189,6 @@ export default {
tpoName: null,
startTime: null,
state: null,
current: 1,
pageSize: 10,
},
loading: false,
selectTable: [],
......@@ -513,7 +512,21 @@ export default {
},
get_table() {//查询表格数据
this.loading = true;
getJiShuZhengCeJieGouHuaTable(this.searchParams).then(res => {
let beginTime_;
let endTime_;
if(this.searchParams.startTime) {
beginTime_ = this.searchParams.startTime[0];
endTime_ = this.searchParams.startTime[1];
}
const params = {
"tpoName": this.searchParams.tpoName,
"beginTime": beginTime_,
"endTime": endTime_,
"state": this.searchParams.state,
"current": this.pager.current,
"pageSize": this.pager.size,
};
getJiShuZhengCeJieGouHuaTable(params).then(res => {
this.loading = false;
res.records.map(item => {
const startTime_year = String(new Date(item.startTime).getFullYear());
......@@ -608,6 +621,12 @@ export default {
color: #fff;
cursor: pointer;
}
/deep/ .is-checked .el-checkbox__inner{
background-color: #0D867F;
}
/deep/ .is-indeterminate .el-checkbox__inner{
background-color: #0D867F;
}
/deep/ .el-dialog__title{
color: #fff;
}
......
......@@ -35,7 +35,7 @@
<el-table-column prop="startTime_" label="统计时间" align="center"></el-table-column>
<el-table-column prop="tpoName" label="政策名称" align="center"></el-table-column>
<el-table-column prop="tpoContent" label="政策描述" align="center"></el-table-column>
<el-table-column prop="conformCount_" label="符合度" align="center"></el-table-column>
<el-table-column prop="conformCount" label="符合度" align="center"></el-table-column>
<el-table-column prop="usefulCount" label="应用数量" align="center"></el-table-column>
<el-table-column prop="ktplRemark" label="备注" align="center"></el-table-column>
</el-table>
......@@ -152,14 +152,14 @@ export default {
item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
});
this.get_fu_he_du_select().then(res2 => {
res.records.map(item3 => {
let result1 = res2.find(item2 => item2.value == item3.conformCount);
item3['conformCount_'] = result1 ? result1.label : '';
});
this.tableData = res.records;
})
// this.get_fu_he_du_select().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
this.tableData = res.records;
// if(res.code == 200) {
// this.loading = false;
// console.log(res)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!