mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
This commit is contained in:
commit
4dfc46a06b
@ -8,19 +8,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div v-for="(item,index) in newOaWorkflowFormEditInfo.components">
|
||||
<div v-for="(item,index) in newOaWorkflowFormEditInfo.components">
|
||||
<div class="form-group row" v-if="item.type== 'textfield'">
|
||||
<label class="col-sm-2 col-form-label">{{item.label}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.value" type="text" :placeholder="item.description"
|
||||
class="form-control">
|
||||
<input v-model="item.value" type="text" :placeholder="item.description" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="item.type== 'number'">
|
||||
<label class="col-sm-2 col-form-label">{{item.label}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.value" type="number" :placeholder="item.description"
|
||||
class="form-control">
|
||||
<input v-model="item.value" type="number" :placeholder="item.description" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="item.type== 'textarea'">
|
||||
@ -32,19 +30,17 @@
|
||||
<div class="form-group row" v-if="item.type== 'textdate'">
|
||||
<label class="col-sm-2 col-form-label">{{item.label}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.value" type="date" :placeholder="item.description"
|
||||
class="form-control">
|
||||
<input v-model="item.value" type="date" :placeholder="item.description" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="item.type== 'textdatetime'">
|
||||
<label class="col-sm-2 col-form-label">{{item.label}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.value" type="time" :placeholder="item.description"
|
||||
class="form-control">
|
||||
<input v-model="item.value" type="time" :placeholder="item.description" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row" v-if="item.type== 'checkbox'">
|
||||
<div class="form-group row" v-if="item.type== 'checkbox'">
|
||||
<label class="col-sm-2 col-form-label">{{item.label}}</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkbox custom-control-inline">
|
||||
@ -56,13 +52,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="frame/uploadFile" callBackListener="newOaWorkflowFormEdit" callBackFunction="fileName" namespace="newOaWorkflowFormEdit">
|
||||
</vc:create>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="_submitFormData()"><i
|
||||
class="fa fa-check"></i> 提交
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
v-on:click="closeEditInfo()">取消
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" v-on:click="closeEditInfo()">取消
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 100;
|
||||
vc.extends({
|
||||
@ -9,22 +9,26 @@
|
||||
newOaWorkflowFormEditInfo: {
|
||||
formJson: {},
|
||||
components: [],
|
||||
conditions: {
|
||||
},
|
||||
conditions: {},
|
||||
flowId: '',
|
||||
id: '',
|
||||
fileName: '',
|
||||
realFileName: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
_initMethod: function() {
|
||||
$that.newOaWorkflowFormEditInfo.flowId = vc.getParam('flowId');
|
||||
$that.newOaWorkflowFormEditInfo.id = vc.getParam('id');
|
||||
vc.component._listOaWorkflowFormEdit(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
_initEvent: function() {
|
||||
vc.on('newOaWorkflowFormEdit', 'fileName', function(_param) {
|
||||
$that.newOaWorkflowFormEditInfo.fileName = _param.fileName;
|
||||
$that.newOaWorkflowFormEditInfo.realFileName = _param.realFileName;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
_listOaWorkflowFormEdit: function (_page, _rows) {
|
||||
_listOaWorkflowFormEdit: function(_page, _rows) {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
@ -36,18 +40,19 @@
|
||||
//发送get请求
|
||||
vc.http.apiGet('/oaWorkflow/queryOaWorkflowForm',
|
||||
param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
let _newOaWorkflowFormEditInfo = JSON.parse(json);
|
||||
$that.newOaWorkflowFormEditInfo.formJson = JSON.parse(_newOaWorkflowFormEditInfo.data[0].formJson);
|
||||
$that.newOaWorkflowFormEditInfo.components = $that.newOaWorkflowFormEditInfo.formJson.components;
|
||||
$that._listOaWorkflowDetails();
|
||||
|
||||
}, function (errInfo, error) {
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_listOaWorkflowDetails: function () {
|
||||
_listOaWorkflowDetails: function() {
|
||||
var param = {
|
||||
params: {
|
||||
page: 1,
|
||||
@ -60,14 +65,20 @@
|
||||
//发送get请求
|
||||
vc.http.apiGet('/oaWorkflow/queryOaWorkflowFormData',
|
||||
param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
var _newOaWorkflowDetailInfo = JSON.parse(json);
|
||||
let _data = _newOaWorkflowDetailInfo.data[0];
|
||||
$that.newOaWorkflowFormEditInfo.components.forEach(item => {
|
||||
item.value = _data[item.key];
|
||||
})
|
||||
if (_data.files) {
|
||||
$that.newOaWorkflowFormEditInfo.fileName = _data.files[0].fileName;
|
||||
$that.newOaWorkflowFormEditInfo.realFileName = _data.files[0].realFileName;
|
||||
vc.emit('newOaWorkflowFormEdit', 'uploadFile', 'notifyVedio', _data.files[0].fileName)
|
||||
}
|
||||
$that.$forceUpdate();
|
||||
}, function (errInfo, error) {
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
@ -77,7 +88,9 @@
|
||||
let _components = $that.newOaWorkflowFormEditInfo.components;
|
||||
let _data = {
|
||||
id: $that.newOaWorkflowFormEditInfo.id,
|
||||
flowId: $that.newOaWorkflowFormEditInfo.flowId
|
||||
flowId: $that.newOaWorkflowFormEditInfo.flowId,
|
||||
fileName: $that.newOaWorkflowFormEditInfo.fileName,
|
||||
realFileName: $that.newOaWorkflowFormEditInfo.realFileName
|
||||
};
|
||||
|
||||
_components.forEach(item => {
|
||||
@ -95,11 +108,10 @@
|
||||
|
||||
vc.http.apiPost(
|
||||
'/oaWorkflow.updateOaWorkflowFormData',
|
||||
JSON.stringify(_data),
|
||||
{
|
||||
JSON.stringify(_data), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
@ -109,14 +121,14 @@
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
closeEditInfo: function () {
|
||||
closeEditInfo: function() {
|
||||
vc.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user