优化代码

This commit is contained in:
java110 2021-08-23 16:26:00 +08:00
parent 878226c8fc
commit 8a0abdcfdc
7 changed files with 2926 additions and 4 deletions

View File

@ -67,7 +67,7 @@
<label class="col-sm-2 col-form-label">上期度数</label>
<div class="col-sm-10">
<input v-model="addMeterWaterInfo.preDegrees" type="text" placeholder="必填,请填写上期度数"
class="form-control " disabled>
class="form-control " >
</div>
</div>
<div class="form-group row">
@ -80,7 +80,7 @@
<div class="form-group row">
<label class="col-sm-2 col-form-label">上期读表时间</label>
<div class="col-sm-10">
<input v-model="addMeterWaterInfo.preReadingTime" type="text" disabled
<input v-model="addMeterWaterInfo.preReadingTime" type="text"
placeholder="必填,请填写上期读表时间" class="form-control addPreReadingTime">
</div>
</div>

67
public/form.html Normal file
View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<title>HC小区管理系统|java110</title>
<vc:create path="frame/commonTop" location="head"></vc:create>
<!-- import CSS -->
<link rel="stylesheet" href="/css/bootstrap/bootstrap.min.css" />
<link href="/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href="/css/animate.css" rel="stylesheet" />
<link rel="stylesheet" href="/css/bootstrap/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet" href="/css/bootstrap/bootstrap-select.min.css" />
<link rel="stylesheet" href="/css/toastr.css" />
<!-- SUMMERNOTE 富文本组件-->
<link href="/css/plugins/summernote/summernote-bs4.min.css" rel="stylesheet">
<link href="/css/plugins/jsTree/style.min.css" rel="stylesheet">
<link rel="stylesheet" href="/css/vc-ui.css" />
<link rel="stylesheet" href="/css/plugins/bootstrap-submenu/bootstrap-submenu.css">
<link rel="stylesheet" href="/formjs/css/form-js.css">
<script src="/js/bootstrap/jquery-3.3.1.min.js"></script>
<script src="/js/vue/vue.min.js"></script>
<script src="/js/vue/vue-resource.min.js"></script>
<script src="/js/popper.min.js"></script>
<script src="/js/bootstrap/bootstrap.min.js"></script>
<script src="/js/bootstrap/bootstrap-datetimepicker.js"></script>
<script src="/js/bootstrap/bootstrap-select.min.js"></script>
<script src="/js/bootstrap/bootstrap-datetimepicker.zh-CN.js"></script>
<link rel="stylesheet" href="/css/bootstrap/bootstrap-treeview.min.css" />
<script src="/js/bootstrap/bootstrap-treeview.min.js"></script>
<script src="/js/plugins/qrcode/qrcode.min.js"></script>
<script src="/js/toastr.min.js"></script>
<script src="/js/plugins/jsTree/jstree.min.js"></script>
</head>
<body class="vc-body">
<vc:create path="frame/bodyTop"></vc:create>
<div class="vc">
<vc:create path="frame/menu"></vc:create>
<div id="vc-page" class="gray-bg dashbard-1 vc-page-height">
<div class="border-bottom">
<vc:create path="frame/nav"></vc:create>
</div>
<div class="vc-wrapper vc-content" style="padding-bottom: 0px;">
<vc:create path="frame/breadcrumb"></vc:create>
</div>
<!-- -->
<div id="component" class="vc-wrapper vc-content animated fadeInRight"
vc-path="/common/chooseEnterCommunity">
<vc:create path="/pages/common/enterCommunity"></vc:create>
</div>
<vc:create path="frame/copyright"></vc:create>
</div>
</div>
</body>
<script src="/vcCore/vc-zh.js"></script>
<script src="/vcCore/vcFramework.js"></script>
<script src="/formjs/js/form-viewer.umd.js"></script>
<vc:create path="frame/commonBottom" location="body"></vc:create>
</html>

File diff suppressed because one or more lines are too long

View File

@ -80,7 +80,6 @@
}
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
//关闭model
vc.toast("处理成功");

View File

@ -0,0 +1,3 @@
<div class="bg-white padding">
<div id="form"></div>
</div>

View File

@ -0,0 +1,55 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 100;
vc.extends({
data: {
newOaWorkflowFormInfo: {
formJson: {},
conditions: {
}
}
},
_initMethod: function () {
vc.component._listOaWorkflowForm(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('newOaWorkflowForm', 'listNewOaWorkflow', function (_param) {
vc.component._listNewOaWorkflows(DEFAULT_PAGE, DEFAULT_ROWS);
});
},
methods: {
_listOaWorkflowForm: function (_page, _rows) {
var param = {
params: {
page: 1,
row: 1,
flowId: vc.getParam('flowId')
}
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
param,
function (json, res) {
let _newOaWorkflowFormInfo = JSON.parse(json);
$that.newOaWorkflowFormInfo.formJson = JSON.parse(_newOaWorkflowFormInfo.data[0].formJson);
$that._initForm();
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_initForm: function () {
const container = document.querySelector('#form');
FormViewer.createForm({
container,
schema: $that.newOaWorkflowFormInfo.formJson
});
}
}
});
})(window.vc);

View File

@ -45,7 +45,30 @@
);
},
newFlow: function (_flow) {
console.log('流程',_flow);
//判断流程是否已部署
var param = {
params: {
page: 1,
row: 1,
flowId: _flow.flowId,
state: 'C'
}
};
//发送get请求
vc.http.apiGet('/oaWorkflow/queryOaWorkflow',
param,
function (json, res) {
var _oaWorkflowManageInfo = JSON.parse(json);
let oaWorkflows = _oaWorkflowManageInfo.data;
if (oaWorkflows.length < 1) {
vc.toast('流程未部署');
return;
}
vc.jumpToPage('/form.html#/pages/property/newOaWorkflowForm?flowId=' + _flow.flowId)
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
}
}
});