提交修改

pg_adapter
dshclm 6 months ago
parent b11303b7b3
commit 48ecae4d9d

@ -33,9 +33,9 @@
<h2 style="text-align: center;margin-top: -7px;font-weight: bold">上级下发</h2> <h2 style="text-align: center;margin-top: -7px;font-weight: bold">上级下发</h2>
</div> </div>
</div> </div>
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse" >
<form id="formId"> <form id="formId">
<div class="select-list"> <div class="select-list" v-if="view">
<ul> <ul>
<li> <li>
<label>编号:</label> <label>编号:</label>
@ -67,8 +67,48 @@
</li> </li>
</ul> </ul>
</div> </div>
<div class="select-list" v-if="!view">
<ul>
<li>
<label>载体名称:</label>
<input type="text" name="carrierName"/>
</li>
<li>
<label>密级:</label>
<select name="carrierSecret" th:with="type=${@dict.getType('sys_file_miji')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>载体类型:</label>
<select name="carrierLevel" th:with="type=${@dict.getType('sys_provide_level')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>所属市州:</label>
<select id="City" name="areaCity" v-model="City">
<option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form> </form>
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" id="toggleButton" @click="changeExamine">
<i class="fa fa-exchange"></i> 自行制作/上级下发
</a>
</div>
<div class="col-sm-12 select-table table-striped" style="min-height: 44%"> <div class="col-sm-12 select-table table-striped" style="min-height: 44%">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
</div> </div>
@ -80,6 +120,9 @@
var detailFlag = [[${@permission.hasPermi('system:filenum:print')}]]; var detailFlag = [[${@permission.hasPermi('system:filenum:print')}]];
var instancyExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]]; var instancyExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]];
var fileSecretDatas = [[${@dict.getType('sys_file_miji')}]]; var fileSecretDatas = [[${@dict.getType('sys_file_miji')}]];
var carrierLevelDatas = [[${@dict.getType('sys_provide_level')}]];
var carrierExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]];
var stateDatas = [[${@dict.getType('carrier_issued_status')}]];
var prefix = ctx + "system/filenum"; var prefix = ctx + "system/filenum";
let datas = [] let datas = []
$.ajax({ $.ajax({
@ -90,59 +133,6 @@
datas = res.data datas = res.data
}) , }) ,
}); });
$(function() {
var options = {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "载体下发",
pageSize:5,
columns: [
{
field: 'carrierNumber',
title: '编号'
},
{
field: 'areaCity',
title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'carrierName',
title: '载体名称'
},
{
field: 'carrierCount',
title: '载体数量'
},
{
field: 'carrierExtent',
title: '紧急程度',
formatter: function(value, row, index) {
return $.table.selectDictLabel(instancyExtentDatas, value);
}
},
{
field: 'carrierSecret',
title: '载体密级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(fileSecretDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="print(\'' + row.id + '\')"><i class="fa fa-download"></i>打印</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
var app = new Vue({ var app = new Vue({
el: '#app', el: '#app',
data: { data: {
@ -152,7 +142,132 @@
Area:'', Area:'',
params:{ params:{
parentId:'', parentId:'',
} },
optionsA: {
url: prefix + "/list",
exportUrl: prefix + "/export",
modalName: "自行制作",
pageSize:5,
columns: [
{
field: 'carrierNumber',
title: '编号'
},
{
field: 'areaCity',
title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'carrierName',
title: '载体名称'
},
{
field: 'carrierCount',
title: '载体数量'
},
{
field: 'carrierExtent',
title: '紧急程度',
formatter: function(value, row, index) {
return $.table.selectDictLabel(instancyExtentDatas, value);
}
},
{
field: 'carrierSecret',
title: '载体密级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(fileSecretDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="print(\'' + row.id + '\')"><i class="fa fa-download"></i>打印</a> ');
return actions.join('');
}
}]
},
optionsB: {
url: prefix + "/listIssued",
detailUrl: prefix + "/detail/{id}",
exportUrl: prefix + "/export",
modalName: "上级下发",
columns: [
{
checkbox: true
},
{
field: 'id',
title: 'id',
visible: false
},
{
field: 'areaCity',
title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'carrierName',
title: '载体名称'
},
{
field: 'carrierLevel',
title: '载体类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(carrierLevelDatas, value);
}
},
{
field: 'carrierExtent',
title: '紧急程度',
formatter: function(value, row, index) {
return $.table.selectDictLabel(carrierExtentDatas, value);
}
},
{
field: 'carrierSecret',
title: '密级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(fileSecretDatas, value);
}
},
{
field: 'carrierTerm',
title: '保密期限'
},
{
field: 'createTime',
title: '创建时间',
sortable: true
},
{
field: 'status',
title: '状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(stateDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></i>详细</a> ');
return actions.join('');
}
}]
},
isStateA:'0',
view:true,
}, },
mounted(){ mounted(){
// 初始化地市列表 // 初始化地市列表
@ -160,6 +275,8 @@
if (this.City){ if (this.City){
this.getAreaList() this.getAreaList()
} }
$.table.init(this.optionsA)
this.isStateA = '3'
}, },
methods:{ methods:{
getCityList(){ getCityList(){
@ -182,6 +299,19 @@
this.AreaList = res.data this.AreaList = res.data
}) , }) ,
}); });
},
changeExamine(){
if (this.isStateA === '3'){
$.table.destroy()
$.table.init(this.optionsB)
this.isStateA = '0'
this.view = false
}else if(this.isStateA === '0'){
$.table.destroy()
$.table.init(this.optionsA)
this.isStateA = '3'
this.view = true
}
} }
} }
}) })

Loading…
Cancel
Save