parent
e8fb0d807e
commit
48475a9a22
File diff suppressed because one or more lines are too long
@ -0,0 +1,20 @@
|
||||
package jnpf.model.businesslineconfig;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jnpf.util.treeutil.SumTree;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class BusinessLineModel extends SumTree {
|
||||
private String name;
|
||||
private String code;
|
||||
private Long creatorTime;
|
||||
@Schema(description = "组织id树")
|
||||
private List<String> businessLineIds;
|
||||
private String parentId;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package jnpf.model.businesslineconfig;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JNPF开发平台组
|
||||
* @version V3.1.0
|
||||
* @copyright 引迈信息技术有限公司
|
||||
* @date 2021/3/12 15:31
|
||||
*/
|
||||
@Data
|
||||
public class BusinessLineSonTree {
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
@Schema(description = "父主键")
|
||||
private String parentId;
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
@Schema(description = "是否有下级菜单")
|
||||
private Boolean hasChildren;
|
||||
@Schema(description = "下级菜单列表")
|
||||
private List<BusinessLineSonTree> children;
|
||||
}
|
@ -1,206 +0,0 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack"
|
||||
content="详情"/>
|
||||
<div class="options">
|
||||
<el-button @click="goBack">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
||||
<el-form ref="formRef" :model="dataForm" size="default" label-width="100px" label-position="left" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<JnpfGroupTitle
|
||||
contentPosition="left" :closable= "false" content ="基础信息" >
|
||||
</JnpfGroupTitle>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="业务线编号"
|
||||
prop="code" >
|
||||
<p>{{dataForm.code}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="业务线名称"
|
||||
prop="name" >
|
||||
<p>{{dataForm.name}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="业务线简称"
|
||||
prop="simpleName" >
|
||||
<p>{{dataForm.simpleName}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="类型"
|
||||
prop="type" >
|
||||
<p>{{dataForm.type}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="所属分类"
|
||||
prop="industry" >
|
||||
<p>{{dataForm.industry}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="所在城市"
|
||||
prop="city" >
|
||||
<p>{{dataForm.city}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="成立时间"
|
||||
prop="establishDate" >
|
||||
<p>{{dataForm.establishDate}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label="描述"
|
||||
prop="description" >
|
||||
<p>{{dataForm.description}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<JnpfGroupTitle
|
||||
contentPosition="left" :closable= "false" content ="联系人信息" >
|
||||
</JnpfGroupTitle>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<jnpf-form-tip-item label-width="0">
|
||||
<el-table :data="dataForm.tableField133" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="contactType" label="类型" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.contactType}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.name}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="手机号" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.phone}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="landline" label="座机" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.landline}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="email" label="邮箱" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.email}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fax" label="传真" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.fax}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyTime" label="更新时间" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.lastModifyTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { Detail},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
detailVisible: false,
|
||||
loading: false,
|
||||
|
||||
dataForm: {
|
||||
id :'',
|
||||
code : '',
|
||||
name : '',
|
||||
simpleName : '',
|
||||
type : "",
|
||||
industry : "",
|
||||
city : [],
|
||||
establishDate : '',
|
||||
description : '',
|
||||
businesscontactList:[],
|
||||
},
|
||||
typeProps:{"label":"fullName","value":"id" },
|
||||
industryProps:{"label":"fullName","value":"id" },
|
||||
|
||||
contactTypeProps:{"label":"fullName","value":"id" },
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
toDetail(defaultValue, modelId) {
|
||||
if (!defaultValue) return
|
||||
getConfigData(modelId).then(res => {
|
||||
if (!res.data || !res.data.formData) return
|
||||
let formData = JSON.parse(res.data.formData)
|
||||
formData.popupType = 'general'
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||
})
|
||||
})
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/scm/BusinessLine/detail/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,368 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<div :style="{margin: '0 auto',width:'100%'}">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" :disabled="setting.readonly" >
|
||||
<template v-if="!loading && formOperates">
|
||||
<!-- 具体表单 -->
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_realName')" >
|
||||
<jnpf-form-tip-item
|
||||
label="姓名" v-if="judgeShow('jnpf_base_user_jnpf_realName')" prop="jnpf_base_user_jnpf_realName" >
|
||||
<JnpfInput v-model="dataForm.jnpf_base_user_jnpf_realName" @change="changeData('jnpf_base_user_jnpf_realName',-1)"
|
||||
placeholder="请输入" :disabled="judgeWrite('jnpf_base_user_jnpf_realName')" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_enabledMark')" >
|
||||
<jnpf-form-tip-item
|
||||
label="帐号状态" v-if="judgeShow('jnpf_base_user_jnpf_enabledMark')" prop="jnpf_base_user_jnpf_enabledMark" >
|
||||
<JnpfSelect v-model="dataForm.jnpf_base_user_jnpf_enabledMark" @change="changeData('jnpf_base_user_jnpf_enabledMark',-1)"
|
||||
placeholder="请选择" :disabled="judgeWrite('jnpf_base_user_jnpf_enabledMark')" clearable :style='{"width":"100%"}' :options="jnpf_base_user_jnpf_enabledMarkOptions" :props="jnpf_base_user_jnpf_enabledMarkProps" >
|
||||
</JnpfSelect>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_mobilePhone')" >
|
||||
<jnpf-form-tip-item
|
||||
label="手机" v-if="judgeShow('jnpf_base_user_jnpf_mobilePhone')" prop="jnpf_base_user_jnpf_mobilePhone" >
|
||||
<JnpfInput v-model="dataForm.jnpf_base_user_jnpf_mobilePhone" @change="changeData('jnpf_base_user_jnpf_mobilePhone',-1)"
|
||||
placeholder="请输入" :disabled="judgeWrite('jnpf_base_user_jnpf_mobilePhone')" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_lastLogTime')" >
|
||||
<jnpf-form-tip-item
|
||||
label="最后登录" v-if="judgeShow('jnpf_base_user_jnpf_lastLogTime')" prop="jnpf_base_user_jnpf_lastLogTime" >
|
||||
<JnpfDatePicker v-model="dataForm.jnpf_base_user_jnpf_lastLogTime" @change="changeData('jnpf_base_user_jnpf_lastLogTime',-1)"
|
||||
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')" placeholder="请选择" :disabled="judgeWrite('jnpf_base_user_jnpf_lastLogTime')" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" >
|
||||
</JnpfDatePicker>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_creatorTime')" >
|
||||
<jnpf-form-tip-item
|
||||
label="创建时间" v-if="judgeShow('jnpf_base_user_jnpf_creatorTime')" prop="jnpf_base_user_jnpf_creatorTime" >
|
||||
<JnpfDatePicker v-model="dataForm.jnpf_base_user_jnpf_creatorTime" @change="changeData('jnpf_base_user_jnpf_creatorTime',-1)"
|
||||
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')" placeholder="请选择" :disabled="judgeWrite('jnpf_base_user_jnpf_creatorTime')" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" >
|
||||
</JnpfDatePicker>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_base_user_jnpf_lastModifyTime')" >
|
||||
<jnpf-form-tip-item
|
||||
label="修改时间" v-if="judgeShow('jnpf_base_user_jnpf_lastModifyTime')" prop="jnpf_base_user_jnpf_lastModifyTime" >
|
||||
<JnpfDatePicker v-model="dataForm.jnpf_base_user_jnpf_lastModifyTime" @change="changeData('jnpf_base_user_jnpf_lastModifyTime',-1)"
|
||||
:startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')" placeholder="请选择" :disabled="judgeWrite('jnpf_base_user_jnpf_lastModifyTime')" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" >
|
||||
</JnpfDatePicker>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="judgeShow('jnpf_jg_business_line_jnpf_name')" >
|
||||
<jnpf-form-tip-item
|
||||
label="业务线名称" v-if="judgeShow('jnpf_jg_business_line_jnpf_name')" prop="jnpf_jg_business_line_jnpf_name" >
|
||||
<JnpfInput v-model="dataForm.jnpf_jg_business_line_jnpf_name" @change="changeData('jnpf_jg_business_line_jnpf_name',-1)"
|
||||
placeholder="请输入" :disabled="judgeWrite('jnpf_jg_business_line_jnpf_name')" clearable :style='{"width":"100%"}'>
|
||||
</JnpfInput>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<!-- 表单结束 -->
|
||||
</template>
|
||||
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
|
||||
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {mapGetters} from "vuex";
|
||||
import {getFormById} from '@/api/workFlow/FormDesign'
|
||||
import comMixin from '@/views/workFlow/workFlowForm/mixin';
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
||||
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
||||
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
mixins: [comMixin],
|
||||
components: { },
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
dataFormSubmitType: 0,
|
||||
continueBtnLoading: false,
|
||||
index: 0,
|
||||
prevDis: false,
|
||||
nextDis: false,
|
||||
allList: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
formRef: 'formRef',
|
||||
setting:{},
|
||||
eventType: '',
|
||||
userBoxVisible:false,
|
||||
selectDialogVisible: false,
|
||||
currTableConf:{},
|
||||
dataValueAll:{},
|
||||
addTableConf:{
|
||||
},
|
||||
//可选范围默认值
|
||||
ableAll:{
|
||||
},
|
||||
tableRows:{
|
||||
},
|
||||
Vmodel:"",
|
||||
currVmodel:"",
|
||||
dataForm: {
|
||||
jg_business_line:
|
||||
{
|
||||
name:'',
|
||||
},
|
||||
base_user:
|
||||
{
|
||||
realName:'',
|
||||
enabledMark:'',
|
||||
mobilePhone:'',
|
||||
lastLogTime:'',
|
||||
creatorTime:'',
|
||||
lastModifyTime:'',
|
||||
},
|
||||
jnpf_base_user_jnpf_realName : '',
|
||||
jnpf_base_user_jnpf_enabledMark : "",
|
||||
jnpf_base_user_jnpf_mobilePhone : '',
|
||||
jnpf_base_user_jnpf_lastLogTime : '',
|
||||
jnpf_base_user_jnpf_creatorTime : '',
|
||||
jnpf_base_user_jnpf_lastModifyTime : '',
|
||||
jnpf_jg_business_line_jnpf_name : '',
|
||||
version: 0,
|
||||
},
|
||||
tableRequiredData: {},
|
||||
dataRule:
|
||||
{
|
||||
},
|
||||
jnpf_base_user_jnpf_enabledMarkOptions:[{"fullName":"选项一","id":"1"},{"fullName":"选项二","id":"2"}],
|
||||
jnpf_base_user_jnpf_enabledMarkProps:{"label":"fullName","value":"id" },
|
||||
childIndex:-1,
|
||||
isEdit:false,
|
||||
interfaceRes: {
|
||||
jnpf_base_user_jnpf_realName:[] ,
|
||||
jnpf_base_user_jnpf_enabledMark:[] ,
|
||||
jnpf_base_user_jnpf_mobilePhone:[] ,
|
||||
jnpf_base_user_jnpf_lastLogTime:[] ,
|
||||
jnpf_base_user_jnpf_creatorTime:[] ,
|
||||
jnpf_base_user_jnpf_lastModifyTime:[] ,
|
||||
jnpf_jg_business_line_jnpf_name:[] ,
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formOperates() {
|
||||
return this.setting.formOperates
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getFormById()
|
||||
if(this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id == 0) {
|
||||
this.initDefaultData()
|
||||
}
|
||||
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
changeData(model, index) {
|
||||
this.isEdit = false
|
||||
this.childIndex = index
|
||||
let modelAll = model.split("-");
|
||||
let faceMode = "";
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
for (let key in this.interfaceRes) {
|
||||
if (key != faceMode) {
|
||||
let faceReList = this.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
if (faceReList[i].relationField == model) {
|
||||
let options = 'get' + key + 'Options';
|
||||
if(this[options]){
|
||||
this[options]()
|
||||
}
|
||||
this.changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
changeDataFormData(type, data, model,index,defaultValue) {
|
||||
if(!this.isEdit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dataForm[data] = defaultValue
|
||||
}
|
||||
}
|
||||
},
|
||||
dataAll(){
|
||||
},
|
||||
selfGetInfo(dataForm) {
|
||||
this.dataInfo(dataForm)
|
||||
},
|
||||
beforeSubmit(){
|
||||
const _data =this.dataList()
|
||||
return _data
|
||||
},
|
||||
selfInit() {
|
||||
this.dataAll()
|
||||
},
|
||||
getFormById() {
|
||||
getFormById("520890418406097989").then(res => {
|
||||
this.dataForm.flowId = res.data&&res.data.flowId
|
||||
// this.encode = res.data&&res.data.encode
|
||||
})
|
||||
},
|
||||
exist() {
|
||||
let isOk = true
|
||||
for (let key in this.tableRequiredData) {
|
||||
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
|
||||
for (let i = 0; i < this.dataForm[key].length; i++) {
|
||||
let item = this.dataForm[key][i]
|
||||
inner: for (let id in item) {
|
||||
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
|
||||
if (!arr.length) continue inner
|
||||
if (arr[0].required) {
|
||||
let msg = `${arr[0].name}不能为空`
|
||||
let boo = true
|
||||
if (arr[0].dataType === 'array') {
|
||||
boo = !this.jnpf.isEmptyArray(item[id])
|
||||
} else {
|
||||
boo = !this.jnpf.isEmpty(item[id])
|
||||
}
|
||||
if (!boo) {
|
||||
this.$message({
|
||||
message: msg,
|
||||
type: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
isOk = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return isOk
|
||||
},
|
||||
clearData(){
|
||||
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
||||
},
|
||||
//初始化默认数据
|
||||
initDefaultData() {
|
||||
|
||||
},
|
||||
openSelectDialog(key) {
|
||||
this.currTableConf=this.addTableConf[key]
|
||||
this.currVmodel=key
|
||||
this.selectDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.selectDialog.init()
|
||||
})
|
||||
},
|
||||
addForSelect(data) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let t = data[i]
|
||||
if(this['get'+this.currVmodel]){
|
||||
this['get'+this.currVmodel](t)
|
||||
}
|
||||
}
|
||||
},
|
||||
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue = null;
|
||||
let timeValue = Number(timeValueData)
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime()
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getBeforeData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getLaterData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||
let timeDataValue = null
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue || '00:00:00'
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00'
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
previousDate = getLaterTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
dataList(){
|
||||
var _data = this.dataForm;
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
this.isEdit = true
|
||||
this.dataAll()
|
||||
this.childIndex=-1
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue