新需求添加1.数据源新增测试 2.主数据新添规则:主数据配置,新增数据源是主表的情况下默认添加这一条数据,不允许修改 3.档案对照页面重新开发。
This commit is contained in:
parent
482d6081c1
commit
4c5690016f
|
@ -5,91 +5,118 @@
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-form validate-on-rule-change :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm"
|
<el-form validate-on-rule-change :model="ruleForm" :rules="rules" label-position="top" ref="ruleForm"
|
||||||
label-width="100px">
|
label-width="100px"
|
||||||
|
>
|
||||||
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" style="margin-bottom: 17px;">
|
<el-row :gutter="24" v-for="(item, index) in formRow" :key="index" style="margin-bottom: 17px;">
|
||||||
<el-col v-for="(row, indexRow) in item.elCol" :span="row.span ? row.span : spanNumber" :key="indexRow">
|
<el-col v-for="(row, indexRow) in item.elCol" :span="row.span ? row.span : spanNumber" :key="indexRow">
|
||||||
<el-form-item :prop="row.prop" :style="`display: flex;margin-bottom: ${marginBottom}px;`"
|
<el-form-item :prop="row.prop" :style="`display: flex;margin-bottom: ${marginBottom}px;`"
|
||||||
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')">
|
v-if="row.show != false" :class="(rules[row.prop] ? 'ruleFormClass ' : '')"
|
||||||
|
>
|
||||||
<!-- <span class="label" slot="label" style="width: 25%;">{{row.label}}</span> -->
|
<!-- <span class="label" slot="label" style="width: 25%;">{{row.label}}</span> -->
|
||||||
<div class="single label" v-if="row.label" slot="label"
|
<div class="single label" v-if="row.label" slot="label"
|
||||||
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex>
|
:style="`width: ${spanWidth};` + `justify-content: ${justifyContent};`" flex
|
||||||
|
>
|
||||||
<span class="label">{{ row.label }}</span>
|
<span class="label">{{ row.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin" :disabled="row.disabled ? row.disabled : false">
|
<el-input v-model="ruleForm[row.prop]" v-if="row.tag === 'password'" type="password" show-password clearable
|
||||||
|
auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin"
|
||||||
|
:disabled="row.disabled ? row.disabled : false"
|
||||||
|
>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
slot="prefix"
|
slot="prefix"
|
||||||
icon-class="password"
|
icon-class="password"
|
||||||
class="el-input__icon input-icon"
|
class="el-input__icon input-icon"
|
||||||
/>
|
/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-input v-model="ruleForm[row.prop]" clearable :disabled="row.disabled ? row.disabled : false"
|
<el-input v-model="ruleForm[row.prop]" clearable :disabled="row.disabled || disabled"
|
||||||
:rows="row.rows ? row.rows : 2" :type="row.type ? row.type : 'text'" :maxlength="row.maxlength ? row.maxlength : ''"
|
:rows="row.rows ? row.rows : 2" :type="row.type ? row.type : 'text'"
|
||||||
|
:maxlength="row.maxlength ? row.maxlength : ''"
|
||||||
:placeholder="!row.placeholder ? '请输入' : row.placeholder" v-if="row.tag === 'elInput'"
|
:placeholder="!row.placeholder ? '请输入' : row.placeholder" v-if="row.tag === 'elInput'"
|
||||||
@blur="searchByStationName(row.prop)" min="1" @input="row.rules ? integerNumber(row) : ''">
|
@blur="searchByStationName(row.prop)" min="1" @input="row.rules ? integerNumber(row) : ''"
|
||||||
|
@change="row.changeRemind?changeRemind(row):''"
|
||||||
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-input-number v-if="row.tag === 'elInputNumber'" v-model="ruleForm[row.prop]"style="width: 100%;"
|
<el-input-number v-if="row.tag === 'elInputNumber'" v-model="ruleForm[row.prop]" style="width: 100%;"
|
||||||
:disabled="row.disabled ? row.disabled : false" :precision="row.precisionNum ? row.precisionNum : 0"
|
:disabled="row.disabled ? row.disabled : false"
|
||||||
|
:precision="row.precisionNum ? row.precisionNum : 0"
|
||||||
:step="row.stepNum ? row.stepNum : 1" @change="handleChange" :min="0"
|
:step="row.stepNum ? row.stepNum : 1" @change="handleChange" :min="0"
|
||||||
:max="row.maxNum ? row.maxNum : 99999"
|
:max="row.maxNum ? row.maxNum : 99999"
|
||||||
:label="!row.placeholder ? '描述文字' : row.placeholder"></el-input-number>
|
:label="!row.placeholder ? '描述文字' : row.placeholder"
|
||||||
|
></el-input-number>
|
||||||
<!-- <div v-if="row.prop=='address'" id="container"
|
<!-- <div v-if="row.prop=='address'" id="container"
|
||||||
style="display:none;margin-top:30px;width: 730px;margin:0 auto;height: 590px;border: 1px solid gray;overflow:hidden;">
|
style="display:none;margin-top:30px;width: 730px;margin:0 auto;height: 590px;border: 1px solid gray;overflow:hidden;">
|
||||||
</div> -->
|
</div> -->
|
||||||
<el-switch v-if="row.tag === 'elSwitch'" v-model="ruleForm[row.prop]" :active-text="row.activeText"
|
<el-switch v-if="row.tag === 'elSwitch'" v-model="ruleForm[row.prop]" :active-text="row.activeText"
|
||||||
@change="switchChange($event, index, indexRow, row)" :inactive-text="row.inactiveText"
|
@change="switchChange($event, index, indexRow, row)" :inactive-text="row.inactiveText"
|
||||||
:active-value="row.activeValue ? row.activeValue : true"
|
:active-value="row.activeValue ? row.activeValue : true"
|
||||||
:inactive-value="row.inactiveValue || row.inactiveValue == 0 ? row.inactiveValue : false">
|
:inactive-value="row.inactiveValue || row.inactiveValue == 0 ? row.inactiveValue : false"
|
||||||
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<el-date-picker v-model="ruleForm[row.prop]" v-if="row.tag === 'elDatePicker'" class="w-100"
|
<el-date-picker v-model="ruleForm[row.prop]" v-if="row.tag === 'elDatePicker'" class="w-100"
|
||||||
:class="{ one: row.type ? 'date' : row.type }" :disabled="row.disabled ? row.disabled : false"
|
:class="{ one: row.type ? 'date' : row.type }" :disabled="row.disabled ? row.disabled : false"
|
||||||
:value-format="!row.valueFormat ? 'yyyy-MM-dd' : row.valueFormat" range-separator="至"
|
:value-format="!row.valueFormat ? 'yyyy-MM-dd' : row.valueFormat" range-separator="至"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" :type="!row.type ? 'date' : row.type"
|
start-placeholder="开始日期" end-placeholder="结束日期" :type="!row.type ? 'date' : row.type"
|
||||||
:placeholder="!row.placeholder ? '请选择' : row.placeholder">
|
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
||||||
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<el-radio-group v-model="ruleForm[row.prop]" v-if="row.tag === 'elRadio'" @input="changeRadio($event,index,indexRow,row)"
|
<el-radio-group v-model="ruleForm[row.prop]" v-if="row.tag === 'elRadio'"
|
||||||
:disabled="row.disabled ? row.disabled : false">
|
@input="changeRadio($event,index,indexRow,row)"
|
||||||
|
:disabled="row.disabled ? row.disabled : false"
|
||||||
|
>
|
||||||
<el-radio v-for="el in row.options" :label="el.value" :key="el.value">{{ el.label }}</el-radio>
|
<el-radio v-for="el in row.options" :label="el.value" :key="el.value">{{ el.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div @click="elDialogClick(row, index, indexRow)" @mouseover="elDialogHover(row)"
|
<div @click="elDialogClick(row, index, indexRow)" @mouseover="elDialogHover(row)"
|
||||||
@mouseleave="elDialogLeave(row)" v-if="row.tag === 'elDialog'" class="elDialog"
|
@mouseleave="elDialogLeave(row)" v-if="row.tag === 'elDialog'" class="elDialog"
|
||||||
:style="{ 'background-color': row.disabled ? '#F5FAF7' : '#fff', 'curpur': row.disabled ? 'pointer' : 'default' }">
|
:style="{ 'background-color': row.disabled ? '#F5FAF7' : '#fff', 'curpur': row.disabled ? 'pointer' : 'default' }"
|
||||||
|
>
|
||||||
<!-- ,background-color:row.disabled?'#c0c4cc':'#fff' -->
|
<!-- ,background-color:row.disabled?'#c0c4cc':'#fff' -->
|
||||||
<p :style="{ color: ruleForm[row.prop] ? '#000' : '#c0c4cc' }" class="showText"
|
<p :style="{ color: ruleForm[row.prop] ? '#000' : '#c0c4cc' }" class="showText"
|
||||||
@click="elDialogClick(row, index, indexRow)">{{ ruleForm[row.prop] ? ruleForm[row.prop] :
|
@click="elDialogClick(row, index, indexRow)"
|
||||||
'请点击选择' }}
|
>{{
|
||||||
|
ruleForm[row.prop] ? ruleForm[row.prop] :
|
||||||
|
'请点击选择'
|
||||||
|
}}
|
||||||
<!-- <el-input v-model="ruleForm[row.prop]"></el-input> -->
|
<!-- <el-input v-model="ruleForm[row.prop]"></el-input> -->
|
||||||
</p>
|
</p>
|
||||||
<!-- <i class="el-icon-more " v-if="row.elDialogHoverType"></i> -->
|
<!-- <i class="el-icon-more " v-if="row.elDialogHoverType"></i> -->
|
||||||
<i class="el-icon-more " @click="elDialogClick(row, index, indexRow)"
|
<i class="el-icon-more " @click="elDialogClick(row, index, indexRow)"
|
||||||
v-if="!row.disabled && !ruleForm[row.prop]"></i>
|
v-if="!row.disabled && !ruleForm[row.prop]"
|
||||||
|
></i>
|
||||||
<i class="el-icon-circle-close " v-if="!row.disabled && ruleForm[row.prop] && row.elDialogHoverType"
|
<i class="el-icon-circle-close " v-if="!row.disabled && ruleForm[row.prop] && row.elDialogHoverType"
|
||||||
@click.stop="resetField(row.prop)" style="margin-left: 10px;"></i>
|
@click.stop="resetField(row.prop)" style="margin-left: 10px;"
|
||||||
|
></i>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.tag === 'elLook'">
|
<div v-if="row.tag === 'elLook'">
|
||||||
{{ ruleForm[row.prop] }}
|
{{ ruleForm[row.prop] }}
|
||||||
</div>
|
</div>
|
||||||
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
|
<el-select class="w-100" v-model="ruleForm[row.prop]" filterable
|
||||||
@change="selectChange($event, index, indexRow, row.options)" :disabled="row.disabled?row.disabled:false"
|
@change="selectChange($event, index, indexRow, row.options,row)"
|
||||||
|
:disabled="row.disabled?row.disabled:false"
|
||||||
:clearable="row.clearable ? row.clearable : true"
|
:clearable="row.clearable ? row.clearable : true"
|
||||||
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag === 'elSelect'">
|
:placeholder="!row.placeholder ? '请选择' : row.placeholder" v-if="row.tag === 'elSelect'"
|
||||||
|
>
|
||||||
<el-option v-for="(el, index) in row.options"
|
<el-option v-for="(el, index) in row.options"
|
||||||
:key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
:key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
||||||
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
||||||
:value="!row.optionValue ? el['value'] : el[row.optionValue]">
|
:value="!row.optionValue ? el['value'] : el[row.optionValue]"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select class="w-100" v-model="ruleForm[row.prop]" multiple :disabled="row.disabled?row.disabled:false"
|
<el-select class="w-100" v-model="ruleForm[row.prop]" multiple :disabled="row.disabled?row.disabled:false"
|
||||||
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
:clearable="row.clearable" :placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
||||||
v-if="row.tag === 'elMultiple'">
|
v-if="row.tag === 'elMultiple'"
|
||||||
|
>
|
||||||
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
<el-option v-for="el in row.options" :key="!row.optionValue ? el['value'] : el[row.optionValue]"
|
||||||
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
:label="!row.optionLabel ? el['label'] : el[row.optionLabel]"
|
||||||
:value="!row.optionValue ? el['value'] : el[row.optionValue]">
|
:value="!row.optionValue ? el['value'] : el[row.optionValue]"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<treeselect v-if="row.tag === 'elTreeSelect'" v-model="ruleForm[row.prop]" :normalizer="normalizer"
|
<treeselect v-if="row.tag === 'elTreeSelect'" v-model="ruleForm[row.prop]" :normalizer="normalizer"
|
||||||
:options="delTreeChildren(row.options)" :multiple="row.multiple?row.multiple:false"
|
:options="delTreeChildren(row.options)" :multiple="row.multiple?row.multiple:false"
|
||||||
:disabled="row.disabled?row.disabled:false" @clear="treeSelectClear" ref="selectTree"
|
:disabled="row.disabled?row.disabled:false" @clear="treeSelectClear" ref="selectTree"
|
||||||
:placeholder="!row.placeholder?'请选择':row.placeholder" @select="selectTree" />
|
:placeholder="!row.placeholder?'请选择':row.placeholder" @select="selectTree"
|
||||||
|
/>
|
||||||
<slot :name="row.slotName" v-if="row.tag === 'elSlot'" :row="ruleForm"></slot>
|
<slot :name="row.slotName" v-if="row.tag === 'elSlot'" :row="ruleForm"></slot>
|
||||||
<!-- <upload-file v-if="row.tag === 'uploadFile'" :showImgPath="ruleForm[row.prop]" ref="imgFile"
|
<!-- <upload-file v-if="row.tag === 'uploadFile'" :showImgPath="ruleForm[row.prop]" ref="imgFile"
|
||||||
@onImage="row.prop == 'beforeImgList'? getbeforeImgList:row.prop == 'materialsList'? getmaterialsList:row.prop == 'getmaterialsListAfter'?getmaterialsListAfter:getImage "></upload-file> -->
|
@onImage="row.prop == 'beforeImgList'? getbeforeImgList:row.prop == 'materialsList'? getmaterialsList:row.prop == 'getmaterialsListAfter'?getmaterialsListAfter:getImage "></upload-file> -->
|
||||||
|
@ -115,6 +142,7 @@
|
||||||
import {
|
import {
|
||||||
checkMobile
|
checkMobile
|
||||||
} from '@/utils/util'
|
} from '@/utils/util'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
// uploadFile,
|
// uploadFile,
|
||||||
|
@ -155,7 +183,7 @@ export default {
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
formdata: {
|
formdata: {
|
||||||
type: Object,
|
type: Object
|
||||||
},
|
},
|
||||||
justifyContent: {
|
justifyContent: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -164,12 +192,12 @@ export default {
|
||||||
marginBottom: {
|
marginBottom: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '0'
|
default: '0'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 表单数据
|
// 表单数据
|
||||||
ruleForm: {},
|
ruleForm: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -177,16 +205,20 @@ export default {
|
||||||
immediate: true, // 立即执行
|
immediate: true, // 立即执行
|
||||||
deep: true, // 深度监听复杂类型内变化
|
deep: true, // 深度监听复杂类型内变化
|
||||||
handler(newVal, oldVal) {
|
handler(newVal, oldVal) {
|
||||||
this.$emit('dataChanges')
|
this.$emit('dataChanges', newVal, oldVal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() { },
|
created() {
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.ruleForm = this.formdata
|
// this.ruleForm = this.formdata
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeRemind() {
|
||||||
|
this.$emit('changeRemind', this.ruleForm)
|
||||||
|
},
|
||||||
integerNumber(row) {
|
integerNumber(row) {
|
||||||
// row.rules?(v)=>()):''
|
// row.rules?(v)=>()):''
|
||||||
// @input="(v)=>(row.row.number=v.replace(/[^\d]/g,''))"
|
// @input="(v)=>(row.row.number=v.replace(/[^\d]/g,''))"
|
||||||
|
@ -230,36 +262,36 @@ export default {
|
||||||
if (type == 'address') {
|
if (type == 'address') {
|
||||||
let address = this.ruleForm[type]
|
let address = this.ruleForm[type]
|
||||||
let that = this
|
let that = this
|
||||||
var map = new BMap.Map("container");
|
var map = new BMap.Map('container')
|
||||||
map.centerAndZoom(address, 18);
|
map.centerAndZoom(address, 18)
|
||||||
map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用
|
map.enableScrollWheelZoom() //启用滚轮放大缩小,默认禁用
|
||||||
map.enableContinuousZoom(); //启用地图惯性拖拽,默认禁用
|
map.enableContinuousZoom() //启用地图惯性拖拽,默认禁用
|
||||||
map.addControl(new BMap.NavigationControl()); //添加默认缩放平移控件
|
map.addControl(new BMap.NavigationControl()) //添加默认缩放平移控件
|
||||||
map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
|
map.addControl(new BMap.OverviewMapControl()) //添加默认缩略地图控件
|
||||||
map.addControl(new BMap.OverviewMapControl({
|
map.addControl(new BMap.OverviewMapControl({
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
|
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
|
||||||
})); //右下角,打开
|
})) //右下角,打开
|
||||||
var localSearch = new BMap.LocalSearch(map);
|
var localSearch = new BMap.LocalSearch(map)
|
||||||
localSearch.enableAutoViewport(); //允许自动调节窗体大小
|
localSearch.enableAutoViewport() //允许自动调节窗体大小
|
||||||
map.clearOverlays(); //清空原来的标注
|
map.clearOverlays() //清空原来的标注
|
||||||
var keyword = address
|
var keyword = address
|
||||||
localSearch.setSearchCompleteCallback(function (searchResult) {
|
localSearch.setSearchCompleteCallback(function(searchResult) {
|
||||||
var poi = searchResult.getPoi(0);
|
var poi = searchResult.getPoi(0)
|
||||||
map.centerAndZoom(poi.point, 13);
|
map.centerAndZoom(poi.point, 13)
|
||||||
var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point
|
var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point
|
||||||
.lat)); // 创建标注,为要查询的地方对应的经纬度
|
.lat)) // 创建标注,为要查询的地方对应的经纬度
|
||||||
map.addOverlay(marker);
|
map.addOverlay(marker)
|
||||||
var content = keyword + "<br/><br/>经度:" + poi.point.lng + "<br/>纬度:" + poi.point.lat;
|
var content = keyword + '<br/><br/>经度:' + poi.point.lng + '<br/>纬度:' + poi.point.lat
|
||||||
that.ruleForm['lng'] = poi.point.lng
|
that.ruleForm['lng'] = poi.point.lng
|
||||||
that.ruleForm['lat'] = poi.point.lat
|
that.ruleForm['lat'] = poi.point.lat
|
||||||
var infoWindow = new BMap.InfoWindow("<p style='font-size:14px;'>" + content + "</p>");
|
var infoWindow = new BMap.InfoWindow('<p style=\'font-size:14px;\'>' + content + '</p>')
|
||||||
marker.addEventListener("click", function () {
|
marker.addEventListener('click', function() {
|
||||||
this.openInfoWindow(infoWindow);
|
this.openInfoWindow(infoWindow)
|
||||||
});
|
})
|
||||||
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
|
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
|
||||||
});
|
})
|
||||||
localSearch.search(keyword);
|
localSearch.search(keyword)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -269,21 +301,21 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取图片
|
// 获取图片
|
||||||
getImage(imagePath) {
|
getImage(imagePath) {
|
||||||
let licenseImg = imagePath.join(",")
|
let licenseImg = imagePath.join(',')
|
||||||
},
|
},
|
||||||
// 处置前照片
|
// 处置前照片
|
||||||
getbeforeImgList(imagePath) {
|
getbeforeImgList(imagePath) {
|
||||||
let licenseImg = imagePath.join(",")
|
let licenseImg = imagePath.join(',')
|
||||||
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
|
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
|
||||||
},
|
},
|
||||||
// 处置材料
|
// 处置材料
|
||||||
getmaterialsList(imagePath) {
|
getmaterialsList(imagePath) {
|
||||||
let licenseImg = imagePath.join(",")
|
let licenseImg = imagePath.join(',')
|
||||||
this.$set(this.ruleForm, 'materialsList', licenseImg)
|
this.$set(this.ruleForm, 'materialsList', licenseImg)
|
||||||
},
|
},
|
||||||
// 处置后材料
|
// 处置后材料
|
||||||
getmaterialsListAfter(imagePath) {
|
getmaterialsListAfter(imagePath) {
|
||||||
let licenseImg = imagePath.join(",")
|
let licenseImg = imagePath.join(',')
|
||||||
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
|
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
|
||||||
},
|
},
|
||||||
revealPhoto(licenseImg) {
|
revealPhoto(licenseImg) {
|
||||||
|
@ -298,10 +330,12 @@ export default {
|
||||||
let newJson = [].concat.apply([], jsonData)
|
let newJson = [].concat.apply([], jsonData)
|
||||||
newJson.forEach(item => {
|
newJson.forEach(item => {
|
||||||
if (this.ruleForm.factoryInFlag == 1) {
|
if (this.ruleForm.factoryInFlag == 1) {
|
||||||
for (let i = 0; i < this.formRow[8].elCol.length; i++) { }
|
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.ruleForm.factoryInFlag == 0) {
|
if (this.ruleForm.factoryInFlag == 0) {
|
||||||
for (let i = 0; i < this.formRow[8].elCol.length; i++) { }
|
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.ruleForm, item.prop, echoData[item.prop])
|
this.$set(this.ruleForm, item.prop, echoData[item.prop])
|
||||||
})
|
})
|
||||||
|
@ -349,15 +383,15 @@ export default {
|
||||||
resetField(field) {
|
resetField(field) {
|
||||||
if (this.ruleForm[field]) {
|
if (this.ruleForm[field]) {
|
||||||
this.$set(this.ruleForm, field, '')
|
this.$set(this.ruleForm, field, '')
|
||||||
this.$refs['ruleForm'].clearValidate(field); // 清除表单特定属性
|
this.$refs['ruleForm'].clearValidate(field) // 清除表单特定属性
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetFields() {
|
resetFields() {
|
||||||
this.choiceAssignment({})
|
this.choiceAssignment({})
|
||||||
this.$refs.ruleForm.resetFields();
|
this.$refs.ruleForm.resetFields()
|
||||||
},
|
},
|
||||||
// 下拉框更改,可根据 index 与 indexRow 定位具体位置
|
// 下拉框更改,可根据 index 与 indexRow 定位具体位置
|
||||||
selectChange(val, index, indexRow, options) {
|
selectChange(val, index, indexRow, options, row) {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
options.forEach((item) => {
|
options.forEach((item) => {
|
||||||
if (item.value == val) {
|
if (item.value == val) {
|
||||||
|
@ -365,7 +399,10 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$emit('onSelect', val, index, indexRow, obj)
|
this.$emit('onSelect', val, index, indexRow, obj)
|
||||||
this.$forceUpdate();
|
if (row.changeRemind) {
|
||||||
|
this.$emit('changeRemind', this.ruleForm)
|
||||||
|
}
|
||||||
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
switchChange(val, index, indexRow, row) {
|
switchChange(val, index, indexRow, row) {
|
||||||
this.$emit('switchChange', val, index, indexRow, row)
|
this.$emit('switchChange', val, index, indexRow, row)
|
||||||
|
@ -380,10 +417,10 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$emit('onSubmit', this.ruleForm)
|
this.$emit('onSubmit', this.ruleForm)
|
||||||
} else {
|
} else {
|
||||||
console.log('error submit!!');
|
console.log('error submit!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
resetForm(formName) {
|
resetForm(formName) {
|
||||||
|
@ -408,10 +445,10 @@ export default {
|
||||||
// row.elDialogHoverType = false
|
// row.elDialogHoverType = false
|
||||||
},
|
},
|
||||||
// 单选按钮组input事件
|
// 单选按钮组input事件
|
||||||
changeRadio(val, index, indexRow, row){
|
changeRadio(val, index, indexRow, row) {
|
||||||
this.$emit('onChangeRadio', val, index, indexRow, row)
|
this.$emit('onChangeRadio', val, index, indexRow, row)
|
||||||
},
|
},
|
||||||
normalizer(node,row) {
|
normalizer(node, row) {
|
||||||
//去掉children=null的属性
|
//去掉children=null的属性
|
||||||
if (node.children == null || node.children == 'null') {
|
if (node.children == null || node.children == 'null') {
|
||||||
delete node.children
|
delete node.children
|
||||||
|
@ -424,10 +461,10 @@ export default {
|
||||||
selectTree(node, instanceId) {
|
selectTree(node, instanceId) {
|
||||||
this.$emit('selectTree', node)
|
this.$emit('selectTree', node)
|
||||||
},
|
},
|
||||||
treeSelectClear(){
|
treeSelectClear() {
|
||||||
this.$refs.selectTree.clear()
|
this.$refs.selectTree.clear()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
@ -442,15 +479,16 @@ export default {
|
||||||
flex: 1
|
flex: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before {
|
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
content: ''
|
content: ''
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
::v-deep textarea.el-textarea__inner{
|
::v-deep textarea.el-textarea__inner {
|
||||||
min-height: 100px !important;
|
min-height: 100px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
/* @include fontBase(16px, #333333) ; */
|
/* @include fontBase(16px, #333333) ; */
|
||||||
color: #333;
|
color: #333;
|
||||||
|
@ -460,7 +498,7 @@ export default {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>.el-form-item__label {
|
> > > .el-form-item__label {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
margin-right: 10px !important;
|
margin-right: 10px !important;
|
||||||
|
|
|
@ -21,6 +21,9 @@ export function openLoading(loadingName) {
|
||||||
case 'del':
|
case 'del':
|
||||||
loadingText = '删除'
|
loadingText = '删除'
|
||||||
break;
|
break;
|
||||||
|
case 'test':
|
||||||
|
loadingText = '校验数据'
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
appLoading = Loading.service({
|
appLoading = Loading.service({
|
||||||
text: "正在" + loadingText + ",请稍候",
|
text: "正在" + loadingText + ",请稍候",
|
||||||
|
@ -36,4 +39,4 @@ export function closeLoading() {
|
||||||
if (appLoading) {
|
if (appLoading) {
|
||||||
appLoading.close();
|
appLoading.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,10 +85,12 @@ const formRow = [
|
||||||
label: 'ip',
|
label: 'ip',
|
||||||
prop: 'sourceIp',
|
prop: 'sourceIp',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
|
changeRemind:true,
|
||||||
}, {
|
}, {
|
||||||
label: '端口',
|
label: '端口',
|
||||||
prop: 'sourcePort',
|
prop: 'sourcePort',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
|
changeRemind:true,
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -96,10 +98,12 @@ const formRow = [
|
||||||
label: '数据库名称',
|
label: '数据库名称',
|
||||||
prop: 'dbName',
|
prop: 'dbName',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
|
changeRemind:true,
|
||||||
}, {
|
}, {
|
||||||
label: '数据源类型',
|
label: '数据源类型',
|
||||||
prop: 'sourceType',
|
prop: 'sourceType',
|
||||||
tag: 'elSelect',
|
tag: 'elSelect',
|
||||||
|
changeRemind:true,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: "1",
|
value: "1",
|
||||||
|
@ -121,10 +125,12 @@ const formRow = [
|
||||||
label: '登录名',
|
label: '登录名',
|
||||||
prop: 'loginName',
|
prop: 'loginName',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
|
changeRemind:true,
|
||||||
}, {
|
}, {
|
||||||
label: '密码',
|
label: '密码',
|
||||||
prop: 'password',
|
prop: 'password',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
|
changeRemind:true,
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -132,7 +138,8 @@ const formRow = [
|
||||||
label: '服务名称',
|
label: '服务名称',
|
||||||
prop: 'serviceName',
|
prop: 'serviceName',
|
||||||
tag: 'elInput',
|
tag: 'elInput',
|
||||||
show:false
|
show:false,
|
||||||
|
changeRemind:true,
|
||||||
}, {
|
}, {
|
||||||
label: '使用状态',
|
label: '使用状态',
|
||||||
prop: 'useState',
|
prop: 'useState',
|
||||||
|
@ -303,4 +310,4 @@ export default {
|
||||||
formRow,
|
formRow,
|
||||||
basicsRules,
|
basicsRules,
|
||||||
formRowShow,
|
formRowShow,
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,160 +20,229 @@
|
||||||
:spanWidth="`120px`"
|
:spanWidth="`120px`"
|
||||||
:loading="vLoading"
|
:loading="vLoading"
|
||||||
@onSelect="onSelect"
|
@onSelect="onSelect"
|
||||||
|
@changeRemind="dataChanges"
|
||||||
></base-form>
|
></base-form>
|
||||||
|
<div class="btnList">
|
||||||
|
<div class="btn">
|
||||||
|
<el-button type="primary" @click="testDataHandle">校验数据源</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="text">
|
||||||
|
<div v-if="dataState==0" style="color: red">请校验数据源</div>
|
||||||
|
<div v-else style="color: green">校验成功</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</base-right-dialog>
|
</base-right-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseRightDialog from "@/components/base/baseRightDialog";
|
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||||
import baseForm from "@/components/base/baseNewForm";
|
import baseForm from '@/components/base/baseNewForm'
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import { authApi } from "@/api/apis/auth";
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
baseRightDialog,
|
baseRightDialog,
|
||||||
baseForm,
|
baseForm,
|
||||||
baseTable,
|
baseTable
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogTitle: "",
|
dialogTitle: '',
|
||||||
dialogType: "",
|
dialogType: '',
|
||||||
formRow: configData.formRow,
|
formRow: configData.formRow,
|
||||||
basicsRules: configData.basicsRules,
|
basicsRules: configData.basicsRules,
|
||||||
vLoading: false,
|
vLoading: false,
|
||||||
newMarryOptions: [],
|
newMarryOptions: [],
|
||||||
submitShow: true,
|
submitShow: true,
|
||||||
};
|
dataState: 0//数据库连接状态 1校验成功0校验失败
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
},
|
},
|
||||||
mounted() {},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
//值改变时
|
||||||
|
dataChanges(row) {
|
||||||
|
console.log(row, '修改')
|
||||||
|
this.$set(row, 'dataState', 0)
|
||||||
|
this.dataState = 0
|
||||||
|
},
|
||||||
|
//校验数据源
|
||||||
|
async testDataHandle() {
|
||||||
|
this.$refs.basicsForm.$refs['ruleForm'].validate(async(valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.openLoading('test')
|
||||||
|
const res = await authApi('sysDataSourceService', '', 'testDatabase', '', {
|
||||||
|
...this.$refs.basicsForm.ruleForm
|
||||||
|
})
|
||||||
|
console.log(res, '测试结果')
|
||||||
|
if (res.attribute) {
|
||||||
|
this.dataState = 1
|
||||||
|
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 1)
|
||||||
|
} else {
|
||||||
|
this.dataState = 0
|
||||||
|
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 0)
|
||||||
|
}
|
||||||
|
this.$vmNews(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
openDialog(type, row) {
|
openDialog(type, row) {
|
||||||
this.formRow = configData.formRow;
|
this.formRow = configData.formRow
|
||||||
this.submitShow = true;
|
this.submitShow = true
|
||||||
this.formRow[5].elCol[0].show = false;
|
this.formRow[5].elCol[0].show = false
|
||||||
// 新增
|
// 新增
|
||||||
if (type == "add") {
|
if (type == 'add') {
|
||||||
this.dialogTitle = "新增";
|
this.dialogTitle = '新增'
|
||||||
this.dialogType = "add";
|
this.dialogType = 'add'
|
||||||
this.formRow[0].elCol[0].disabled = false;
|
this.formRow[0].elCol[0].disabled = false
|
||||||
this.formRow[1].elCol[0].disabled = false;
|
this.formRow[1].elCol[0].disabled = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.basicsForm.getField("useState", 1);
|
this.$refs.basicsForm.getField('useState', 1)
|
||||||
});
|
this.dataState = 0
|
||||||
|
this.$set(this.$refs.basicsForm.ruleForm, 'dataState', 0)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 编辑
|
// 编辑
|
||||||
if (type == "edit") {
|
if (type == 'edit') {
|
||||||
this.formRow[0].elCol[0].disabled = true;
|
this.formRow[0].elCol[0].disabled = true
|
||||||
this.formRow[1].elCol[0].disabled = true;
|
this.formRow[1].elCol[0].disabled = true
|
||||||
this.dialogTitle = "编辑";
|
this.dialogTitle = '编辑'
|
||||||
this.dialogType = "edit";
|
this.dialogType = 'edit'
|
||||||
this.messageGetById(row.id);
|
this.messageGetById(row.id)
|
||||||
}
|
}
|
||||||
// 查看
|
// 查看
|
||||||
if (type == "show") {
|
if (type == 'show') {
|
||||||
this.formRow[0].elCol[0].disabled = true;
|
this.formRow[0].elCol[0].disabled = true
|
||||||
this.formRow[1].elCol[0].disabled = true;
|
this.formRow[1].elCol[0].disabled = true
|
||||||
this.submitShow = false;
|
this.submitShow = false
|
||||||
this.formRow = configData.formRowShow;
|
this.formRow = configData.formRowShow
|
||||||
this.dialogTitle = "查看";
|
this.dialogTitle = '查看'
|
||||||
this.dialogType = "show";
|
this.dialogType = 'show'
|
||||||
this.messageGetById(row.id);
|
this.messageGetById(row.id)
|
||||||
}
|
}
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
// 主表
|
// 主表
|
||||||
onSelect(val, index, indexRow, obj) {
|
onSelect(val, index, indexRow, obj) {
|
||||||
// 当前数据源类型为 oracle
|
// 当前数据源类型为 oracle
|
||||||
if (index == 3 && indexRow == 1 && val == 1) {
|
if (index == 3 && indexRow == 1 && val == 1) {
|
||||||
this.formRow[5].elCol[0].show = true;
|
this.formRow[5].elCol[0].show = true
|
||||||
} else {
|
} else {
|
||||||
this.formRow[5].elCol[0].show = false;
|
this.formRow[5].elCol[0].show = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 编辑详情
|
// 编辑详情
|
||||||
async messageGetById(id) {
|
async messageGetById(id) {
|
||||||
let params = {
|
let params = {
|
||||||
id: id,
|
id: id
|
||||||
};
|
}
|
||||||
let res = await authApi(
|
let res = await authApi(
|
||||||
"sysDataSourceService",
|
'sysDataSourceService',
|
||||||
"dataSource",
|
'dataSource',
|
||||||
"queryEntity",
|
'queryEntity',
|
||||||
"",
|
'',
|
||||||
params
|
params
|
||||||
);
|
)
|
||||||
if (res.status == "200") {
|
if (res.status == '200') {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if(res.attribute.sourceType == "1"){
|
if (res.attribute.sourceType == '1') {
|
||||||
this.formRow[5].elCol[0].show = true;
|
this.formRow[5].elCol[0].show = true
|
||||||
}else{
|
} else {
|
||||||
this.formRow[5].elCol[0].show = false;
|
this.formRow[5].elCol[0].show = false
|
||||||
}
|
}
|
||||||
this.$refs.basicsForm.incomingParameters(res.attribute);
|
this.$refs.basicsForm.incomingParameters(res.attribute)
|
||||||
});
|
this.dataState = res.attribute.dataState
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 弹窗关闭
|
// 弹窗关闭
|
||||||
handleDialogClose() {
|
handleDialogClose() {
|
||||||
this.$refs.basicsForm.resetFields();
|
this.$refs.basicsForm.resetFields()
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false
|
||||||
},
|
},
|
||||||
// 弹窗确认按钮
|
// 弹窗确认按钮
|
||||||
handleConfirmClick() {
|
handleConfirmClick() {
|
||||||
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
|
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return
|
||||||
} else {
|
} else {
|
||||||
let params = {
|
if (this.dataState == 0) {
|
||||||
...this.$refs.basicsForm.ruleForm,
|
this.$confirm('当前交钱未通过是否继续保存?', '提示', {
|
||||||
};
|
confirmButtonText: '确定',
|
||||||
if (this.dialogType == "add") {
|
cancelButtonText: '取消',
|
||||||
this.openLoading("submit");
|
showClose: false,
|
||||||
this.messageSaveDto(params);
|
closeOnClickModal: false,
|
||||||
}
|
closeOnPressEscape: false,
|
||||||
if (this.dialogType == "edit") {
|
type: 'warning'
|
||||||
this.openLoading("submit");
|
}).then(() => {
|
||||||
this.messageUpdateDto(params);
|
let params = {
|
||||||
|
...this.$refs.basicsForm.ruleForm
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'add') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.messageSaveDto(params)
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'edit') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.messageUpdateDto(params)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let params = {
|
||||||
|
...this.$refs.basicsForm.ruleForm
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'add') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.messageSaveDto(params)
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'edit') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.messageUpdateDto(params)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 新增保存
|
// 新增保存
|
||||||
async messageSaveDto(params) {
|
async messageSaveDto(params) {
|
||||||
let res = await authApi(
|
let res = await authApi(
|
||||||
"sysDataSourceService",
|
'sysDataSourceService',
|
||||||
"dataSource",
|
'dataSource',
|
||||||
"addEntity",
|
'addEntity',
|
||||||
"",
|
'',
|
||||||
params
|
params
|
||||||
);
|
)
|
||||||
if (res.status == "200") {
|
if (res.status == '200') {
|
||||||
this.handleDialogClose();
|
this.handleDialogClose()
|
||||||
this.$vmNews("新增成功", "success");
|
this.$vmNews('新增成功', 'success')
|
||||||
this.$emit("resetTable");
|
this.$emit('resetTable')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 编辑保存
|
// 编辑保存
|
||||||
async messageUpdateDto(params) {
|
async messageUpdateDto(params) {
|
||||||
let res = await authApi(
|
let res = await authApi(
|
||||||
"sysDataSourceService",
|
'sysDataSourceService',
|
||||||
"dataSource",
|
'dataSource',
|
||||||
"editEntity",
|
'editEntity',
|
||||||
"",
|
'',
|
||||||
params
|
params
|
||||||
);
|
)
|
||||||
if (res.status == "200") {
|
if (res.status == '200') {
|
||||||
this.handleDialogClose();
|
this.handleDialogClose()
|
||||||
this.$vmNews("更新成功", "success");
|
this.$vmNews('更新成功', 'success')
|
||||||
this.$emit("resetTable");
|
this.$emit('resetTable')
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@ -207,4 +276,13 @@ export default {
|
||||||
::v-deep .app-container {
|
::v-deep .app-container {
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.btnList {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-right: 40px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -70,12 +70,13 @@
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="ruleForm[row.id]"
|
v-model="ruleForm[row.id]"
|
||||||
v-if="row.type == 'onecheck'"
|
v-if="row.type == 'onecheck'"
|
||||||
|
:disabled="disabled"
|
||||||
>是
|
>是
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="ruleForm[row.id]"
|
v-model="ruleForm[row.id]"
|
||||||
clearable
|
clearable
|
||||||
:disabled="row.disabledOfId?Boolean(ruleForm.id):row.disabled"
|
:disabled="disabled || (row.disabledOfId?Boolean(ruleForm.id):row.disabled) "
|
||||||
:rows="row.rows ? row.rows : 2"
|
:rows="row.rows ? row.rows : 2"
|
||||||
:type="row.type ? row.type : 'text'"
|
:type="row.type ? row.type : 'text'"
|
||||||
:maxlength="row.maxlength ? row.maxlength * 1 : '99'"
|
:maxlength="row.maxlength ? row.maxlength * 1 : '99'"
|
||||||
|
@ -95,7 +96,7 @@
|
||||||
v-if="row.type === 'num'"
|
v-if="row.type === 'num'"
|
||||||
v-model="ruleForm[row.id]"
|
v-model="ruleForm[row.id]"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="row.disabled && !newFlag ? row.disabled : false"
|
:disabled="(row.disabled && !newFlag ? row.disabled : false) || disabled"
|
||||||
:precision="row.precisionNum ? row.precisionNum : 0"
|
:precision="row.precisionNum ? row.precisionNum : 0"
|
||||||
:placeholder="!row.placeholder ? '请输入' : row.placeholder"
|
:placeholder="!row.placeholder ? '请输入' : row.placeholder"
|
||||||
:step="row.stepNum ? row.stepNum : 1"
|
:step="row.stepNum ? row.stepNum : 1"
|
||||||
|
@ -173,7 +174,7 @@
|
||||||
filterable
|
filterable
|
||||||
:multiple="row.multiple"
|
:multiple="row.multiple"
|
||||||
@change="selectChange($event, index, indexRow, row)"
|
@change="selectChange($event, index, indexRow, row)"
|
||||||
:disabled="row.disabled"
|
:disabled="row.disabled || disabled"
|
||||||
:clearable="row.clearable ? row.clearable : true"
|
:clearable="row.clearable ? row.clearable : true"
|
||||||
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
:placeholder="!row.placeholder ? '请选择' : row.placeholder"
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
@ -118,6 +118,7 @@
|
||||||
@onSelect="selectChangeHanlde"
|
@onSelect="selectChangeHanlde"
|
||||||
@inputBlur="optionFormInputBlur"
|
@inputBlur="optionFormInputBlur"
|
||||||
@onSubmit="optionOnSubmit"
|
@onSubmit="optionOnSubmit"
|
||||||
|
:disabled="sonFormDisabled"
|
||||||
>
|
>
|
||||||
</baseNewForm>
|
</baseNewForm>
|
||||||
<baseNewForm
|
<baseNewForm
|
||||||
|
@ -129,6 +130,7 @@
|
||||||
:labelPosition="'left'"
|
:labelPosition="'left'"
|
||||||
@onSelect="typeSelectChangeHanlde"
|
@onSelect="typeSelectChangeHanlde"
|
||||||
@onSubmit="typeOptionOnSubmit"
|
@onSubmit="typeOptionOnSubmit"
|
||||||
|
:disabled="sonFormDisabled"
|
||||||
>
|
>
|
||||||
</baseNewForm>
|
</baseNewForm>
|
||||||
<baseNewForm
|
<baseNewForm
|
||||||
|
@ -139,6 +141,8 @@
|
||||||
:ruleForm="propertyRuleForm"
|
:ruleForm="propertyRuleForm"
|
||||||
:labelPosition="'left'"
|
:labelPosition="'left'"
|
||||||
@onSubmit="propertyOnSubmit"
|
@onSubmit="propertyOnSubmit"
|
||||||
|
:disabled="sonFormDisabled"
|
||||||
|
|
||||||
>
|
>
|
||||||
</baseNewForm>
|
</baseNewForm>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,7 +150,9 @@
|
||||||
可选控间属性
|
可选控间属性
|
||||||
</div>
|
</div>
|
||||||
<div class="checkBoxList">
|
<div class="checkBoxList">
|
||||||
<el-checkbox-group v-model="propertyActiveList" @change="propertyActiveListChangeHanlde">
|
<el-checkbox-group :disabled="sonFormDisabled" v-model="propertyActiveList"
|
||||||
|
@change="propertyActiveListChangeHanlde"
|
||||||
|
>
|
||||||
<el-checkbox v-for="(item,index) in propertyList" :label="item.id" :key="item.id">{{
|
<el-checkbox v-for="(item,index) in propertyList" :label="item.id" :key="item.id">{{
|
||||||
item.label
|
item.label
|
||||||
}}
|
}}
|
||||||
|
@ -252,6 +258,7 @@ import baseDialog from '@/views/integrationOption/compoments/baseDialog'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sonFormDisabled: false,
|
||||||
saveLoading: false,
|
saveLoading: false,
|
||||||
mainLoading: false,
|
mainLoading: false,
|
||||||
//options表
|
//options表
|
||||||
|
@ -559,7 +566,58 @@ export default {
|
||||||
if (res.attribute.mainMdmModuleDb.id) {
|
if (res.attribute.mainMdmModuleDb.id) {
|
||||||
this.mainTableData.push({ ...res.attribute.mainMdmModuleDb })
|
this.mainTableData.push({ ...res.attribute.mainMdmModuleDb })
|
||||||
} else {
|
} else {
|
||||||
let tempObj = { dbType: '1', sublistMdmModuleDbFileds: [{}] }
|
console.log(123)
|
||||||
|
let tempObj = {
|
||||||
|
dbType: '1', sublistMdmModuleDbFileds: [{
|
||||||
|
'index': 0,
|
||||||
|
'chName': '数据状态',
|
||||||
|
'enName': 'dataStatus',
|
||||||
|
'filedType': '3',
|
||||||
|
'filedLength': '1',
|
||||||
|
'mdmModuleDbFiledsRules': [
|
||||||
|
{
|
||||||
|
'ruleName': '显示名',
|
||||||
|
'ruleCode': 'title',
|
||||||
|
'ruleValue': '数据状态',
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ruleName': '宽度',
|
||||||
|
'ruleCode': 'row',
|
||||||
|
'ruleValue': '12',
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ruleName': '单元格宽度',
|
||||||
|
'ruleCode': 'width',
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ruleName': '数据类型',
|
||||||
|
'ruleCode': 'type',
|
||||||
|
'ruleValue': 'input',
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ruleName': '必填',
|
||||||
|
'ruleCode': 'required',
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ruleName': '禁止修改',
|
||||||
|
'ruleCode': 'disabled',
|
||||||
|
'ruleValue': true,
|
||||||
|
'ruleType': 2,
|
||||||
|
'formName': 'optionRuleForm'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
this.mainTableData.push(tempObj)
|
this.mainTableData.push(tempObj)
|
||||||
}
|
}
|
||||||
res.attribute.sublistMdmModuleDb.forEach(item => {
|
res.attribute.sublistMdmModuleDb.forEach(item => {
|
||||||
|
@ -732,7 +790,7 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 表格行点击
|
// 上方表格行点击
|
||||||
mainOnClick(val) {
|
mainOnClick(val) {
|
||||||
if (val.index === -1) return
|
if (val.index === -1) return
|
||||||
this.activedTableRow = false
|
this.activedTableRow = false
|
||||||
|
@ -744,7 +802,15 @@ export default {
|
||||||
this.activedTableData = val.sublistMdmModuleDbFileds
|
this.activedTableData = val.sublistMdmModuleDbFileds
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//子表单机事件
|
||||||
activedOnClick(val) {
|
activedOnClick(val) {
|
||||||
|
//若英文名称为dataStatus 且是主表 则禁止输出
|
||||||
|
|
||||||
|
if (val.enName === 'dataStatus' && this.mainActivedRow.dbType == 1) {
|
||||||
|
this.sonFormDisabled = true
|
||||||
|
} else {
|
||||||
|
this.sonFormDisabled = false
|
||||||
|
}
|
||||||
this.activedTableRow = val
|
this.activedTableRow = val
|
||||||
//清空type带出来的ruleForm
|
//清空type带出来的ruleForm
|
||||||
this.typeOptionFormRow = []
|
this.typeOptionFormRow = []
|
||||||
|
@ -757,7 +823,7 @@ export default {
|
||||||
let propertyRuleForm = []
|
let propertyRuleForm = []
|
||||||
let optionRuleForm = []
|
let optionRuleForm = []
|
||||||
let typeOptionRuleForm = []
|
let typeOptionRuleForm = []
|
||||||
console.log(val)
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 重置表单
|
// 重置表单
|
||||||
this.$refs.optionForm.resetForm()
|
this.$refs.optionForm.resetForm()
|
||||||
|
@ -768,10 +834,10 @@ export default {
|
||||||
top: 0,
|
top: 0,
|
||||||
behavior: 'smooth'
|
behavior: 'smooth'
|
||||||
})
|
})
|
||||||
|
//表单规则处理
|
||||||
if (!val.mdmModuleDbFiledsRules) return
|
if (!val.mdmModuleDbFiledsRules) return
|
||||||
val.mdmModuleDbFiledsRules.forEach(item => {
|
val.mdmModuleDbFiledsRules.forEach(item => {
|
||||||
if (item.ruleCode === 'required' || item.ruleCode === 'disabled') {
|
if (item.ruleCode === 'required' || item.ruleCode === 'disabled') {
|
||||||
console.log(typeof item.ruleValue)
|
|
||||||
if (!item.ruleValue) {
|
if (!item.ruleValue) {
|
||||||
this.$set(this[item.formName], item.ruleCode, false)
|
this.$set(this[item.formName], item.ruleCode, false)
|
||||||
} else if (typeof item.ruleValue === 'boolean') {
|
} else if (typeof item.ruleValue === 'boolean') {
|
||||||
|
@ -869,6 +935,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
async saveHandle() {
|
async saveHandle() {
|
||||||
|
console.log(this.mainTableData)
|
||||||
//判断认证规则
|
//判断认证规则
|
||||||
if (!this.receiptsShowTableData.length) {
|
if (!this.receiptsShowTableData.length) {
|
||||||
this.$vmNews('单据规则不能为空', 'warning')
|
this.$vmNews('单据规则不能为空', 'warning')
|
||||||
|
|
|
@ -0,0 +1,336 @@
|
||||||
|
/**
|
||||||
|
* @desc 集成产品清单
|
||||||
|
* @date 2023-07-10
|
||||||
|
*/
|
||||||
|
// 表头
|
||||||
|
const tableColumnData = [
|
||||||
|
{
|
||||||
|
label: '应用编码',
|
||||||
|
prop: 'leftAppCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用名称',
|
||||||
|
prop: 'leftAppName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'leftCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'leftName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用编码',
|
||||||
|
prop: 'rightAppCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用名称',
|
||||||
|
prop: 'rightAppName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'rightCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'rightName'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const tableVersionColumn = [
|
||||||
|
{
|
||||||
|
label: '参数名称',
|
||||||
|
prop: 'argName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数编码',
|
||||||
|
prop: 'argCode'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '参数类型',
|
||||||
|
prop: 'argType',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
// 基本信息内容
|
||||||
|
const formRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '左应用编码',
|
||||||
|
prop: 'leftAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '左应用名称',
|
||||||
|
prop: 'leftAppName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
prop: 'leftId',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'leftCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'leftName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '应用编码',
|
||||||
|
prop: 'rightAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用名称',
|
||||||
|
prop: 'rightAppName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
prop: 'rightId',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'rightCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'rightName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '排序',
|
||||||
|
prop: 'sorts',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// 人员显示内容
|
||||||
|
const peopleFormRow = [
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '左应用编码',
|
||||||
|
prop: 'leftAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '左应用名称',
|
||||||
|
prop: 'leftAppName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
prop: 'leftId',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'leftCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'leftName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '手机号',
|
||||||
|
prop: 'leftTel',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '身份证号',
|
||||||
|
prop: 'leftIc',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '应用编码',
|
||||||
|
prop: 'rightAppCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '应用名称',
|
||||||
|
prop: 'rightAppName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '主键',
|
||||||
|
prop: 'rightId',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '编码',
|
||||||
|
prop: 'rightCode',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '名称',
|
||||||
|
prop: 'rightName',
|
||||||
|
tag: 'elInput',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '手机号',
|
||||||
|
prop: 'rightTel',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [
|
||||||
|
{
|
||||||
|
label: '身份证号',
|
||||||
|
prop: 'rightIc',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '排序',
|
||||||
|
prop: 'sorts',
|
||||||
|
tag: 'elInput',
|
||||||
|
type: 'number',
|
||||||
|
span: 12
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const basicsRules = {
|
||||||
|
leftCode: [{
|
||||||
|
required: true,
|
||||||
|
message: '请填写编码',
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
leftName: [{
|
||||||
|
required: true,
|
||||||
|
message: '请填写名称',
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
rightCode: [{
|
||||||
|
required: true,
|
||||||
|
message: '请填写编码',
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
rightName: [{
|
||||||
|
required: true,
|
||||||
|
message: '请填写名称',
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查看
|
||||||
|
const formRowShow = [
|
||||||
|
{
|
||||||
|
elCol: [{
|
||||||
|
label: '插件',
|
||||||
|
prop: 'plugName',
|
||||||
|
tag: 'elLook',
|
||||||
|
disabled: true,
|
||||||
|
span: 24
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elCol: [{
|
||||||
|
label: '描述',
|
||||||
|
prop: 'remark',
|
||||||
|
tag: 'elLook',
|
||||||
|
type: 'textarea',
|
||||||
|
span: 24,
|
||||||
|
disabled: true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
export default {
|
||||||
|
tableColumnData,
|
||||||
|
formRow,
|
||||||
|
basicsRules,
|
||||||
|
formRowShow,
|
||||||
|
tableVersionColumn,
|
||||||
|
peopleFormRow
|
||||||
|
}
|
|
@ -0,0 +1,383 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<base-right-dialog
|
||||||
|
ref="baseRightDialog"
|
||||||
|
:footerShow="true"
|
||||||
|
:dialogVisible.sync="dialogVisible"
|
||||||
|
:title="dialogTitle + ' 插件参数设置'"
|
||||||
|
@handleClose="handleDialogClose"
|
||||||
|
:type="dialogType"
|
||||||
|
:submitShow="submitShow"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
>
|
||||||
|
<base-form
|
||||||
|
ref="basicsForm"
|
||||||
|
:formRow="formRow"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:rules="basicsRules"
|
||||||
|
class="dialog_form"
|
||||||
|
:spanWidth="`120px`"
|
||||||
|
:loading="vLoading"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
></base-form>
|
||||||
|
<el-button
|
||||||
|
style="width: 125px; margin: 20px 0"
|
||||||
|
@click="addVersionDialog"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
:disabled="submitShow ? false : true"
|
||||||
|
v-if="submitShow"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
|
<base-table
|
||||||
|
:border="true"
|
||||||
|
:showIndex="true"
|
||||||
|
:tableColumn="tableVersionColumn"
|
||||||
|
:tableData="tableVersionData"
|
||||||
|
:funWidth="80"
|
||||||
|
:funData="funData"
|
||||||
|
@onFunc="onFunc"
|
||||||
|
>
|
||||||
|
<template v-slot:argName="{ row }" >
|
||||||
|
<div style="width: 100%">
|
||||||
|
<template v-if="!submitShow">{{row.argName}}</template>
|
||||||
|
<el-input
|
||||||
|
v-else
|
||||||
|
v-model="row.argName"
|
||||||
|
clearable
|
||||||
|
type="text"
|
||||||
|
:disabled="!submitShow || row.disabled"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:argCode="{ row }">
|
||||||
|
<div style="width: 100%">
|
||||||
|
<template v-if="!submitShow">
|
||||||
|
{{ row.argCode }}
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-else
|
||||||
|
v-model="row.argCode"
|
||||||
|
clearable
|
||||||
|
type="text"
|
||||||
|
:disabled="!submitShow"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:argType="{ row }">
|
||||||
|
<div style="width: 100%">
|
||||||
|
<!-- <el-radio-group v-model="row.argType" :disabled="!submitShow">-->
|
||||||
|
<!-- <el-radio label="1">字符串</el-radio>-->
|
||||||
|
<!-- <el-radio label="2">日期</el-radio>-->
|
||||||
|
<!-- </el-radio-group>-->
|
||||||
|
<el-select v-model="row.argType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:remark="{ row }">
|
||||||
|
<div style="width: 100%">
|
||||||
|
<template v-if="!submitShow">{{row.remark}}</template>
|
||||||
|
<el-input
|
||||||
|
v-model="row.remark"
|
||||||
|
clearable
|
||||||
|
type="text"
|
||||||
|
v-else
|
||||||
|
:disabled="!submitShow"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</base-table>
|
||||||
|
</base-right-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseRightDialog from "@/components/base/baseRightDialog";
|
||||||
|
import baseForm from "@/components/base/baseNewForm";
|
||||||
|
import baseTable from "@/components/base/baseTable";
|
||||||
|
import configData from "./configData";
|
||||||
|
import { authApi } from "@/api/apis/auth";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
baseRightDialog,
|
||||||
|
baseForm,
|
||||||
|
baseTable,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
treeType:1,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogTitle: "",
|
||||||
|
dialogType: "",
|
||||||
|
formRow: configData.formRow,
|
||||||
|
basicsRules: configData.basicsRules,
|
||||||
|
vLoading: false,
|
||||||
|
newMarryOptions: [],
|
||||||
|
submitShow: true,
|
||||||
|
loadingType: true,
|
||||||
|
tableVersionData: [],
|
||||||
|
tableVersionColumn: configData.tableVersionColumn,
|
||||||
|
funData: [],
|
||||||
|
isEdit: false,
|
||||||
|
select_dist:{},
|
||||||
|
options:[
|
||||||
|
{
|
||||||
|
label:"字符串",
|
||||||
|
value:"1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"日期范围选择",
|
||||||
|
value:"2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"年月",
|
||||||
|
value:"3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"年月日",
|
||||||
|
value:"4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label:"年月日时间",
|
||||||
|
value:"5"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initSelect()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 插件下拉
|
||||||
|
async initSelect(){
|
||||||
|
let res = await authApi(
|
||||||
|
"pluginService",
|
||||||
|
"plugins",
|
||||||
|
"queryPluginsByType",
|
||||||
|
"",
|
||||||
|
{
|
||||||
|
"pluginType": "1"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if(res.status == 200){
|
||||||
|
console.log(res.attribute)
|
||||||
|
res.attribute.forEach(item=>{
|
||||||
|
this.$set(this.select_dist,item.pluginId,item)
|
||||||
|
})
|
||||||
|
console.log(res.attribute,'res.attribute插件返回')
|
||||||
|
this.formRow[0].elCol[0].options = res.attribute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//下拉改变事件
|
||||||
|
onSelect(val, index, indexRow, obj){
|
||||||
|
this.$set(this.$refs.basicsForm.ruleForm,'plugName',this.select_dist[val]['pluginName'])
|
||||||
|
},
|
||||||
|
openDialog(type, row,treeType) {
|
||||||
|
this.treeType= treeType
|
||||||
|
// this.queryProductClassfy();
|
||||||
|
this.formRow = configData.formRow;
|
||||||
|
this.submitShow = true;
|
||||||
|
this.isEdit = false
|
||||||
|
this.funData = [
|
||||||
|
{
|
||||||
|
color: "#ff0000",
|
||||||
|
text: "删除",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// 新增
|
||||||
|
if (type == "add") {
|
||||||
|
this.dialogTitle = "新增";
|
||||||
|
this.dialogType = "add";
|
||||||
|
}
|
||||||
|
// 编辑
|
||||||
|
if (type == "edit") {
|
||||||
|
this.isEdit = true
|
||||||
|
this.dialogTitle = "编辑";
|
||||||
|
this.dialogType = "edit";
|
||||||
|
this.productGetById(row.id);
|
||||||
|
}
|
||||||
|
// 查看
|
||||||
|
if (type == "show") {
|
||||||
|
this.funData = Object.assign([],[])
|
||||||
|
this.submitShow = false;
|
||||||
|
this.formRow = configData.formRowShow;
|
||||||
|
this.dialogTitle = "查看";
|
||||||
|
this.dialogType = "show";
|
||||||
|
this.productGetById(row.id);
|
||||||
|
|
||||||
|
}
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
// 编辑详情
|
||||||
|
async productGetById(id) {
|
||||||
|
let params = {
|
||||||
|
id: id,
|
||||||
|
};
|
||||||
|
let res = await authApi(
|
||||||
|
"sysPlugArgService",
|
||||||
|
"integrationTaskService",
|
||||||
|
"getPlugArg",
|
||||||
|
"",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.status == "200") {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicsForm.incomingParameters(res.attribute);
|
||||||
|
this.tableVersionData = res.attribute.sysPlugArgDetailEntityList
|
||||||
|
// let result = [];
|
||||||
|
// this.tableVersionData = Object.assign([], result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addVersionDialog() {
|
||||||
|
let obj = {
|
||||||
|
argName:"",
|
||||||
|
argCode:"",
|
||||||
|
argType:"1",
|
||||||
|
remark:"",
|
||||||
|
};
|
||||||
|
this.tableVersionData.push(obj);
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
onFunc(index, row) {
|
||||||
|
if (index == 0) {
|
||||||
|
this.$delConfirm().then(() => {
|
||||||
|
this.tableVersionData.forEach((item, itemIndex) => {
|
||||||
|
if (item.id === row.id) {
|
||||||
|
this.tableVersionData.splice(itemIndex, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 弹窗关闭
|
||||||
|
handleDialogClose() {
|
||||||
|
this.tableVersionData = Object.assign([], []);
|
||||||
|
this.$refs.basicsForm.resetFields();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
},
|
||||||
|
// 弹窗确认按钮
|
||||||
|
handleConfirmClick() {
|
||||||
|
this.$refs.basicsForm.$refs["ruleForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
if(!this.tableVersionData.length){
|
||||||
|
this.$vmNews("请添加列表")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let flag = this.tableVersionData.some(item=>{
|
||||||
|
if(!item.argName){
|
||||||
|
this.$vmNews("请输入参数名称")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if(!item.argCode){
|
||||||
|
this.$vmNews("请输入参数编码")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(flag) return
|
||||||
|
let params = {
|
||||||
|
...this.$refs.basicsForm.ruleForm,
|
||||||
|
sysPlugArgDetailEntityList: this.tableVersionData,
|
||||||
|
};
|
||||||
|
if (this.dialogType == "add") {
|
||||||
|
this.openLoading("submit");
|
||||||
|
this.productSaveDto(params);
|
||||||
|
}
|
||||||
|
if (this.dialogType == "edit") {
|
||||||
|
this.openLoading("submit");
|
||||||
|
this.productUpdateDto(params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 新增保存
|
||||||
|
async productSaveDto(params) {
|
||||||
|
let res = await authApi(
|
||||||
|
"sysPlugArgService",
|
||||||
|
"integrationTaskService",
|
||||||
|
"savePlugArg",
|
||||||
|
"",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.status == "200") {
|
||||||
|
this.handleDialogClose();
|
||||||
|
this.$vmNews("新增成功", "success");
|
||||||
|
this.$emit("resetTable");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 编辑保存
|
||||||
|
async productUpdateDto(params) {
|
||||||
|
let res = await authApi(
|
||||||
|
"sysPlugArgService",
|
||||||
|
"integrationTaskService",
|
||||||
|
"updatePlugArg",
|
||||||
|
"",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.status == "200") {
|
||||||
|
this.handleDialogClose();
|
||||||
|
this.$vmNews("更新成功", "success");
|
||||||
|
this.$emit("resetTable");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取所有产品分类
|
||||||
|
async queryProductClassfy() {
|
||||||
|
let params = {
|
||||||
|
tab_name: "sys_product",
|
||||||
|
column_name: "classify",
|
||||||
|
};
|
||||||
|
let res = await authApi(
|
||||||
|
"generalServiceImpl",
|
||||||
|
"dictionaryshop",
|
||||||
|
"selectDictionaryshop",
|
||||||
|
"",
|
||||||
|
params
|
||||||
|
);
|
||||||
|
if (res.status == "200") {
|
||||||
|
console.log(res.attribute,'res.attribute123')
|
||||||
|
this.formRow[1].elCol[0].options = res.attribute;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.dialogList {
|
||||||
|
padding: 16px 0;
|
||||||
|
border-top: 1px solid #dcdfe6;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updateBtn {
|
||||||
|
border: 1px solid #ebedf1;
|
||||||
|
padding: 5px 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updateBtn:hover {
|
||||||
|
color: #1890ff;
|
||||||
|
border-color: #badeff;
|
||||||
|
background-color: #e8f4ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table__body-wrapper.is-scrolling-none {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .app-container {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,308 @@
|
||||||
|
<template>
|
||||||
|
<div style="display: flex">
|
||||||
|
<div class="left" style="width: 15%;">
|
||||||
|
<BaseMenuTree
|
||||||
|
:menuData="treeData"
|
||||||
|
:filterShow="true"
|
||||||
|
:Allshow="false"
|
||||||
|
:treeButton="false"
|
||||||
|
:filterButtonShow="false"
|
||||||
|
style="height: 100%"
|
||||||
|
:treeProps="treeProps"
|
||||||
|
@handleNodeClick="homeHandleNodeClick"
|
||||||
|
ref="menuTree"
|
||||||
|
></BaseMenuTree>
|
||||||
|
</div>
|
||||||
|
<div class="right" style="flex: 1">
|
||||||
|
<base-layout
|
||||||
|
ref="baseLayout"
|
||||||
|
:buttonList="buttonList"
|
||||||
|
@onFuncBtn="onFuncBtn"
|
||||||
|
:querySwitch="true"
|
||||||
|
:searchList="requirementList"
|
||||||
|
@search="handleSearchEvent"
|
||||||
|
:isPage="true"
|
||||||
|
@pageChange="handlePageChange"
|
||||||
|
>
|
||||||
|
<div slot="main" slot-scope="{ tableHeight }">
|
||||||
|
<base-table
|
||||||
|
ref="baseTable"
|
||||||
|
:showIndex="true"
|
||||||
|
:funWidth="180"
|
||||||
|
:funData="funData"
|
||||||
|
@onFunc="onFunc"
|
||||||
|
:tabLoading.sync="tabLoading"
|
||||||
|
:tableHeight="tableHeight"
|
||||||
|
:tableData="tableData"
|
||||||
|
:tableColumn="tableColumnData"
|
||||||
|
@onCellClick="onCellClick"
|
||||||
|
>
|
||||||
|
</base-table>
|
||||||
|
</div>
|
||||||
|
</base-layout>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<right-dialog ref="rightDialog" @resetTable="resetTable"></right-dialog>
|
||||||
|
<contrastRightDialog ref="contrastRightDialog" @resetTable="resetTable"></contrastRightDialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import contrastRightDialog from '@/views/recordContrast/contrastRightDialog.vue'
|
||||||
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
|
import baseTable from '@/components/base/baseTable'
|
||||||
|
import rightDialog from './rightDialog'
|
||||||
|
import configData from './configData'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
import BaseMenuTree from '@/views/intergrationTask/compoments/baseMenuTree.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
BaseMenuTree,
|
||||||
|
baseLayout,
|
||||||
|
baseTable,
|
||||||
|
rightDialog,
|
||||||
|
contrastRightDialog
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
type: 1,//当前选中type
|
||||||
|
treeProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'name'
|
||||||
|
},
|
||||||
|
treeData: [
|
||||||
|
{
|
||||||
|
name: '人员对照',
|
||||||
|
type: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '部门档案',
|
||||||
|
type: '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '存货对照',
|
||||||
|
type: '3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '客商辅助核算',
|
||||||
|
type: '4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '税率',
|
||||||
|
type: '5'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '项目辅助核算',
|
||||||
|
type: '6'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '银行类别',
|
||||||
|
type: '7'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '银行账户',
|
||||||
|
type: '8'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '资产类别',
|
||||||
|
type: '9'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
buttonList: [
|
||||||
|
{
|
||||||
|
menuName: '新增',
|
||||||
|
icon: 'el-icon-plus',
|
||||||
|
btnFunction: 'add'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
menuName: '刷新',
|
||||||
|
icon: 'el-icon-refresh',
|
||||||
|
btnFunction: 'resetLoad'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// menuName: '档案对照',
|
||||||
|
// icon: 'el-icon-s-open',
|
||||||
|
// btnFunction: 'contrast'
|
||||||
|
// }
|
||||||
|
], //按钮组
|
||||||
|
requirementList: [
|
||||||
|
{
|
||||||
|
placeholder: '编码',
|
||||||
|
prop: 'leftCode',
|
||||||
|
tag: 'elInput'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
placeholder: '名称',
|
||||||
|
prop: 'leftName',
|
||||||
|
tag: 'elInput'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
placeholder: '编码',
|
||||||
|
prop: 'rightCode',
|
||||||
|
tag: 'elInput'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
placeholder: '名称',
|
||||||
|
prop: 'rightName',
|
||||||
|
tag: 'elInput'
|
||||||
|
}
|
||||||
|
], //查询模板list
|
||||||
|
tabLoading: false,
|
||||||
|
tableColumnData: configData.tableColumnData, //表头数据
|
||||||
|
funData: [
|
||||||
|
|
||||||
|
{
|
||||||
|
color: '#6a9af1',
|
||||||
|
text: '编辑'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
color: '#d67a74',
|
||||||
|
text: '删除'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableData: [], //表格数据
|
||||||
|
pageModel: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 100
|
||||||
|
},
|
||||||
|
queryModel: {
|
||||||
|
code: '',
|
||||||
|
name: '',
|
||||||
|
classify: '',
|
||||||
|
productionCompany: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.queryProductClassfy();
|
||||||
|
this.GetProductionTableData()
|
||||||
|
this.$refs.menuTree.clickFirst()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
contrast() {
|
||||||
|
this.$refs.contrastRightDialog.openDialog('add', {}, this.type)
|
||||||
|
},
|
||||||
|
//树点击
|
||||||
|
homeHandleNodeClick(data) {
|
||||||
|
this.pageModel.pageNum = 1
|
||||||
|
this.type = data.type
|
||||||
|
this.$refs.baseLayout.pageClear()
|
||||||
|
this.GetProductionTableData()
|
||||||
|
},
|
||||||
|
onCellClick(row) {
|
||||||
|
this.openLoading('detail')
|
||||||
|
this.$refs.rightDialog.openDialog('show', row, this.type)
|
||||||
|
},
|
||||||
|
// 表格数据
|
||||||
|
async GetProductionTableData() {
|
||||||
|
this.tabLoading = true
|
||||||
|
let param = {
|
||||||
|
...this.pageModel,
|
||||||
|
...this.queryModel,
|
||||||
|
type: this.type
|
||||||
|
}
|
||||||
|
let res = await authApi(
|
||||||
|
'sysArchivesContrastService',
|
||||||
|
'',
|
||||||
|
'queryEntityPage',
|
||||||
|
'',
|
||||||
|
param
|
||||||
|
)
|
||||||
|
this.tabLoading = false
|
||||||
|
if (res.status == '200') {
|
||||||
|
console.log(res.attribute.list, 'res.attribute.list')
|
||||||
|
this.tableData = res.attribute.list
|
||||||
|
this.$refs.baseLayout.setPageTotal(res.attribute.total)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 分页变化
|
||||||
|
handlePageChange(val) {
|
||||||
|
this.pageModel.pageNum = val.pageIndex
|
||||||
|
this.pageModel.pageSize = val.pageSize
|
||||||
|
this.GetProductionTableData()
|
||||||
|
},
|
||||||
|
// 按钮组
|
||||||
|
onFuncBtn(btn) {
|
||||||
|
this[btn.btnFunction]()
|
||||||
|
},
|
||||||
|
// 新增
|
||||||
|
add() {
|
||||||
|
this.$refs.rightDialog.openDialog('add', {}, this.type)
|
||||||
|
},
|
||||||
|
// 表格操作事件 查看 编辑 删除
|
||||||
|
onFunc(index, row, item) {
|
||||||
|
// 查看
|
||||||
|
if (item.text === '查看') {
|
||||||
|
this.openLoading('detail')
|
||||||
|
this.$refs.rightDialog.openDialog('show', row, this.type)
|
||||||
|
}
|
||||||
|
// 编辑
|
||||||
|
if (item.text === '编辑') {
|
||||||
|
this.openLoading('detail')
|
||||||
|
this.$refs.rightDialog.openDialog('edit', row, this.type)
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
if (item.text === '删除') {
|
||||||
|
this.$delConfirm().then(() => {
|
||||||
|
this.openLoading('del')
|
||||||
|
this.productionDeleteById(row.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async productionDeleteById(id) {
|
||||||
|
let param = {
|
||||||
|
id: id,
|
||||||
|
type: this.type
|
||||||
|
}
|
||||||
|
let res = await authApi(
|
||||||
|
'sysArchivesContrastService',
|
||||||
|
'',
|
||||||
|
'deleteEntity',
|
||||||
|
'',
|
||||||
|
param
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
this.$vmNews('删除成功', 'success')
|
||||||
|
this.resetTable()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 重置表格
|
||||||
|
resetTable() {
|
||||||
|
this.pageModel.pageNum = 1
|
||||||
|
this.$refs.baseLayout.pageClear()
|
||||||
|
this.GetProductionTableData()
|
||||||
|
},
|
||||||
|
// 搜索
|
||||||
|
handleSearchEvent() {
|
||||||
|
let data = this.$refs.baseLayout.ruleForm
|
||||||
|
this.queryModel = data
|
||||||
|
this.resetTable()
|
||||||
|
},
|
||||||
|
// 获取所有产品分类
|
||||||
|
async queryProductClassfy() {
|
||||||
|
let params = {
|
||||||
|
tab_name: 'sys_product',
|
||||||
|
column_name: 'classify'
|
||||||
|
}
|
||||||
|
let res = await authApi(
|
||||||
|
'generalServiceImpl',
|
||||||
|
'dictionaryshop',
|
||||||
|
'selectDictionaryshop',
|
||||||
|
'',
|
||||||
|
params
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
this.requirementList[2].options = res.attribute
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.clickTitle {
|
||||||
|
color: #409eff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,376 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<base-right-dialog
|
||||||
|
ref="baseRightDialog"
|
||||||
|
:footerShow="true"
|
||||||
|
:dialogVisible.sync="dialogVisible"
|
||||||
|
:title="dialogTitle + ' 档案对照'"
|
||||||
|
@handleClose="handleDialogClose"
|
||||||
|
:type="dialogType"
|
||||||
|
:submitShow="submitShow"
|
||||||
|
@handleConfirmClick="handleConfirmClick"
|
||||||
|
>
|
||||||
|
<base-form
|
||||||
|
ref="basicsForm"
|
||||||
|
:formRow="formRow"
|
||||||
|
:isFunBtn="false"
|
||||||
|
:rules="basicsRules"
|
||||||
|
class="dialog_form"
|
||||||
|
:spanWidth="`120px`"
|
||||||
|
:loading="vLoading"
|
||||||
|
@onSelect="onSelect"
|
||||||
|
:disabled="dialogTitle==='查看'"
|
||||||
|
></base-form>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- style="width: 125px; margin: 20px 0"-->
|
||||||
|
<!-- @click="addVersionDialog"-->
|
||||||
|
<!-- icon="el-icon-plus"-->
|
||||||
|
<!-- :disabled="submitShow ? false : true"-->
|
||||||
|
<!-- v-if="submitShow"-->
|
||||||
|
<!-- >添加-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <base-table-->
|
||||||
|
<!-- :border="true"-->
|
||||||
|
<!-- :showIndex="true"-->
|
||||||
|
<!-- :tableColumn="tableVersionColumn"-->
|
||||||
|
<!-- :tableData="tableVersionData"-->
|
||||||
|
<!-- :funWidth="80"-->
|
||||||
|
<!-- :funData="funData"-->
|
||||||
|
<!-- @onFunc="onFunc"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <template v-slot:argName="{ row }">-->
|
||||||
|
<!-- <div style="width: 100%">-->
|
||||||
|
<!-- <template v-if="!submitShow">{{ row.argName }}</template>-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-else-->
|
||||||
|
<!-- v-model="row.argName"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- :disabled="!submitShow || row.disabled"-->
|
||||||
|
<!-- ></el-input>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-slot:argCode="{ row }">-->
|
||||||
|
<!-- <div style="width: 100%">-->
|
||||||
|
<!-- <template v-if="!submitShow">-->
|
||||||
|
<!-- {{ row.argCode }}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-else-->
|
||||||
|
<!-- v-model="row.argCode"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- :disabled="!submitShow"-->
|
||||||
|
<!-- ></el-input>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-slot:argType="{ row }">-->
|
||||||
|
<!-- <div style="width: 100%">-->
|
||||||
|
<!-- <!– <el-radio-group v-model="row.argType" :disabled="!submitShow">–>-->
|
||||||
|
<!-- <!– <el-radio label="1">字符串</el-radio>–>-->
|
||||||
|
<!-- <!– <el-radio label="2">日期</el-radio>–>-->
|
||||||
|
<!-- <!– </el-radio-group>–>-->
|
||||||
|
<!-- <el-select v-model="row.argType" placeholder="请选择">-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in options"-->
|
||||||
|
<!-- :key="item.value"-->
|
||||||
|
<!-- :label="item.label"-->
|
||||||
|
<!-- :value="item.value"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-slot:remark="{ row }">-->
|
||||||
|
<!-- <div style="width: 100%">-->
|
||||||
|
<!-- <template v-if="!submitShow">{{ row.remark }}</template>-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="row.remark"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- v-else-->
|
||||||
|
<!-- :disabled="!submitShow"-->
|
||||||
|
<!-- ></el-input>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </base-table>-->
|
||||||
|
</base-right-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||||
|
import baseForm from '@/components/base/baseNewForm'
|
||||||
|
import baseTable from '@/components/base/baseTable'
|
||||||
|
import configData from './configData'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
baseRightDialog,
|
||||||
|
baseForm,
|
||||||
|
baseTable
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
treeType: 1,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogTitle: '',
|
||||||
|
dialogType: '',
|
||||||
|
formRow: configData.formRow,
|
||||||
|
basicsRules: configData.basicsRules,
|
||||||
|
vLoading: false,
|
||||||
|
newMarryOptions: [],
|
||||||
|
submitShow: true,
|
||||||
|
loadingType: true,
|
||||||
|
tableVersionData: [],
|
||||||
|
tableVersionColumn: configData.tableVersionColumn,
|
||||||
|
funData: [],
|
||||||
|
isEdit: false,
|
||||||
|
select_dist: {},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: '字符串',
|
||||||
|
value: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '日期范围选择',
|
||||||
|
value: '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '年月',
|
||||||
|
value: '3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '年月日',
|
||||||
|
value: '4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '年月日时间',
|
||||||
|
value: '5'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initSelect()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 插件下拉
|
||||||
|
async initSelect() {
|
||||||
|
let res = await authApi(
|
||||||
|
'pluginService',
|
||||||
|
'plugins',
|
||||||
|
'queryPluginsByType',
|
||||||
|
'',
|
||||||
|
{
|
||||||
|
'pluginType': '1'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (res.status == 200) {
|
||||||
|
console.log(res.attribute)
|
||||||
|
res.attribute.forEach(item => {
|
||||||
|
this.$set(this.select_dist, item.pluginId, item)
|
||||||
|
})
|
||||||
|
console.log(res.attribute, 'res.attribute插件返回')
|
||||||
|
this.formRow[0].elCol[0].options = res.attribute
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//下拉改变事件
|
||||||
|
onSelect(val, index, indexRow, obj) {
|
||||||
|
this.$set(this.$refs.basicsForm.ruleForm, 'plugName', this.select_dist[val]['pluginName'])
|
||||||
|
},
|
||||||
|
openDialog(type, row, treeType) {
|
||||||
|
this.treeType = treeType
|
||||||
|
console.log(treeType, 'treeType')
|
||||||
|
if (treeType == 1) {
|
||||||
|
this.formRow = configData.peopleFormRow
|
||||||
|
} else {
|
||||||
|
this.formRow = configData.formRow
|
||||||
|
}
|
||||||
|
// this.queryProductClassfy();
|
||||||
|
this.submitShow = true
|
||||||
|
this.isEdit = false
|
||||||
|
this.funData = [
|
||||||
|
{
|
||||||
|
color: '#ff0000',
|
||||||
|
text: '删除'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// 新增
|
||||||
|
if (type == 'add') {
|
||||||
|
this.dialogTitle = '新增'
|
||||||
|
this.dialogType = 'add'
|
||||||
|
}
|
||||||
|
// 编辑
|
||||||
|
if (type == 'edit') {
|
||||||
|
this.isEdit = true
|
||||||
|
this.dialogTitle = '编辑'
|
||||||
|
this.dialogType = 'edit'
|
||||||
|
this.productGetById(row.id)
|
||||||
|
}
|
||||||
|
// 查看
|
||||||
|
if (type == 'show') {
|
||||||
|
this.funData = Object.assign([], [])
|
||||||
|
this.submitShow = false
|
||||||
|
this.dialogTitle = '查看'
|
||||||
|
this.dialogType = 'show'
|
||||||
|
this.productGetById(row.id)
|
||||||
|
|
||||||
|
}
|
||||||
|
this.dialogVisible = true
|
||||||
|
},
|
||||||
|
// 编辑详情
|
||||||
|
async productGetById(id) {
|
||||||
|
let params = {
|
||||||
|
id: id,
|
||||||
|
type: this.treeType
|
||||||
|
}
|
||||||
|
let res = await authApi(
|
||||||
|
'sysArchivesContrastService',
|
||||||
|
'',
|
||||||
|
'getEntity',
|
||||||
|
'',
|
||||||
|
params
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.basicsForm.incomingParameters(res.attribute)
|
||||||
|
// let result = [];
|
||||||
|
// this.tableVersionData = Object.assign([], result);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addVersionDialog() {
|
||||||
|
let obj = {
|
||||||
|
argName: '',
|
||||||
|
argCode: '',
|
||||||
|
argType: '1',
|
||||||
|
remark: ''
|
||||||
|
}
|
||||||
|
this.tableVersionData.push(obj)
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
onFunc(index, row) {
|
||||||
|
if (index == 0) {
|
||||||
|
this.$delConfirm().then(() => {
|
||||||
|
this.tableVersionData.forEach((item, itemIndex) => {
|
||||||
|
if (item.id === row.id) {
|
||||||
|
this.tableVersionData.splice(itemIndex, 1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 弹窗关闭
|
||||||
|
handleDialogClose() {
|
||||||
|
this.tableVersionData = Object.assign([], [])
|
||||||
|
this.$refs.basicsForm.resetFields()
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
// 弹窗确认按钮
|
||||||
|
handleConfirmClick() {
|
||||||
|
this.$refs.basicsForm.$refs['ruleForm'].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
let params = {
|
||||||
|
...this.$refs.basicsForm.ruleForm,
|
||||||
|
type: this.treeType
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'add') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.productSaveDto(params)
|
||||||
|
}
|
||||||
|
if (this.dialogType == 'edit') {
|
||||||
|
this.openLoading('submit')
|
||||||
|
this.productUpdateDto(params)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 新增保存
|
||||||
|
async productSaveDto(params) {
|
||||||
|
let res = await authApi(
|
||||||
|
'sysArchivesContrastService',
|
||||||
|
'',
|
||||||
|
'saveEntity',
|
||||||
|
'',
|
||||||
|
params
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
this.handleDialogClose()
|
||||||
|
this.$vmNews('新增成功', 'success')
|
||||||
|
this.$emit('resetTable')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 编辑保存
|
||||||
|
async productUpdateDto(params) {
|
||||||
|
let res = await authApi(
|
||||||
|
'sysArchivesContrastService',
|
||||||
|
'',
|
||||||
|
'updateEntity',
|
||||||
|
'',
|
||||||
|
params
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
this.handleDialogClose()
|
||||||
|
this.$vmNews('更新成功', 'success')
|
||||||
|
this.$emit('resetTable')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取所有产品分类
|
||||||
|
async queryProductClassfy() {
|
||||||
|
let params = {
|
||||||
|
tab_name: 'sys_product',
|
||||||
|
column_name: 'classify'
|
||||||
|
}
|
||||||
|
let res = await authApi(
|
||||||
|
'generalServiceImpl',
|
||||||
|
'dictionaryshop',
|
||||||
|
'selectDictionaryshop',
|
||||||
|
'',
|
||||||
|
params
|
||||||
|
)
|
||||||
|
if (res.status == '200') {
|
||||||
|
console.log(res.attribute, 'res.attribute123')
|
||||||
|
this.formRow[1].elCol[0].options = res.attribute
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.dialogList {
|
||||||
|
padding: 16px 0;
|
||||||
|
border-top: 1px solid #dcdfe6;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updateBtn {
|
||||||
|
border: 1px solid #ebedf1;
|
||||||
|
padding: 5px 0;
|
||||||
|
border-radius: 3px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updateBtn:hover {
|
||||||
|
color: #1890ff;
|
||||||
|
border-color: #badeff;
|
||||||
|
background-color: #e8f4ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table__body-wrapper.is-scrolling-none {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .app-container {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -73,9 +73,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane
|
</el-tab-pane
|
||||||
>
|
>
|
||||||
<el-tab-pane label="数据权限" name="second">
|
<!-- <el-tab-pane label="数据权限" name="second">-->
|
||||||
<data-permissions ref="dataPermissions"></data-permissions>
|
<!-- <data-permissions ref="dataPermissions"></data-permissions>-->
|
||||||
</el-tab-pane>
|
<!-- </el-tab-pane>-->
|
||||||
<el-tab-pane label="首页拖拽权限" name="layOutAuth">
|
<el-tab-pane label="首页拖拽权限" name="layOutAuth">
|
||||||
<layOutPermissions ref="layOutPermissions"></layOutPermissions>
|
<layOutPermissions ref="layOutPermissions"></layOutPermissions>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -234,8 +234,7 @@ export default {
|
||||||
//首页拖拽权限
|
//首页拖拽权限
|
||||||
this.$refs.layOutPermissions.homeList = list.homeList
|
this.$refs.layOutPermissions.homeList = list.homeList
|
||||||
//数据权限
|
//数据权限
|
||||||
this.$refs.dataPermissions.interfaceList = list.interfaceList
|
// this.$refs.dataPermissions.interfaceList = list.interfaceList
|
||||||
console.log(this.$refs.dataPermissions.interfaceList, 'this.$refs.dataPermissions.interfaceList')
|
|
||||||
// let data = this.treeToArray(this.menuDatas);
|
// let data = this.treeToArray(this.menuDatas);
|
||||||
this.build = id
|
this.build = id
|
||||||
// data.forEach((el, index) => {
|
// data.forEach((el, index) => {
|
||||||
|
@ -305,11 +304,11 @@ export default {
|
||||||
},
|
},
|
||||||
//接口权限数据处理
|
//接口权限数据处理
|
||||||
interfaceListHandle(arr) {
|
interfaceListHandle(arr) {
|
||||||
this.$refs.dataPermissions.interfaceList.forEach(item => {
|
// this.$refs.dataPermissions.interfaceList.forEach(item => {
|
||||||
if (item.check) {
|
// if (item.check) {
|
||||||
arr.push({ interfaceId: item.id })
|
// arr.push({ interfaceId: item.id })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
//处理首页拖拽
|
//处理首页拖拽
|
||||||
homeListHandle(arr) {
|
homeListHandle(arr) {
|
||||||
|
|
|
@ -73,9 +73,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane
|
</el-tab-pane
|
||||||
>
|
>
|
||||||
<el-tab-pane label="数据权限" name="second">
|
<!-- <el-tab-pane label="数据权限" name="second">-->
|
||||||
<data-permissions ref="dataPermissions"></data-permissions>
|
<!-- <data-permissions ref="dataPermissions"></data-permissions>-->
|
||||||
</el-tab-pane>
|
<!-- </el-tab-pane>-->
|
||||||
<el-tab-pane label="首页拖拽权限" name="layOutAuth">
|
<el-tab-pane label="首页拖拽权限" name="layOutAuth">
|
||||||
<layOutPermissions ref="layOutPermissions"></layOutPermissions>
|
<layOutPermissions ref="layOutPermissions"></layOutPermissions>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
@ -234,8 +234,7 @@ export default {
|
||||||
//首页拖拽权限
|
//首页拖拽权限
|
||||||
this.$refs.layOutPermissions.homeList = list.homeList
|
this.$refs.layOutPermissions.homeList = list.homeList
|
||||||
//数据权限
|
//数据权限
|
||||||
this.$refs.dataPermissions.interfaceList = list.interfaceList
|
// this.$refs.dataPermissions.interfaceList = list.interfaceList
|
||||||
console.log(this.$refs.dataPermissions.interfaceList, 'this.$refs.dataPermissions.interfaceList')
|
|
||||||
// let data = this.treeToArray(this.menuDatas);
|
// let data = this.treeToArray(this.menuDatas);
|
||||||
this.build = id
|
this.build = id
|
||||||
// data.forEach((el, index) => {
|
// data.forEach((el, index) => {
|
||||||
|
@ -245,7 +244,6 @@ export default {
|
||||||
// });
|
// });
|
||||||
this.menuCheckHandle(menu)
|
this.menuCheckHandle(menu)
|
||||||
this.menuDatas = menu
|
this.menuDatas = menu
|
||||||
console.log(this.menuDatas, 'this.menuDatas')
|
|
||||||
this.buttonLoading = false
|
this.buttonLoading = false
|
||||||
},
|
},
|
||||||
//数据处理
|
//数据处理
|
||||||
|
@ -305,11 +303,11 @@ export default {
|
||||||
},
|
},
|
||||||
//接口权限数据处理
|
//接口权限数据处理
|
||||||
interfaceListHandle(arr) {
|
interfaceListHandle(arr) {
|
||||||
this.$refs.dataPermissions.interfaceList.forEach(item => {
|
// this.$refs.dataPermissions.interfaceList.forEach(item => {
|
||||||
if (item.check) {
|
// if (item.check) {
|
||||||
arr.push({ interfaceId: item.id })
|
// arr.push({ interfaceId: item.id })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
//处理首页拖拽
|
//处理首页拖拽
|
||||||
homeListHandle(arr) {
|
homeListHandle(arr) {
|
||||||
|
|
|
@ -39,9 +39,9 @@ module.exports = {
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://hzya.ufyct.com:9067/`,
|
// target: `http://hzya.ufyct.com:9067/`,
|
||||||
// target: `http://127.0.0.1:9081/`,
|
// target: `http://127.0.0.1:9081/`,
|
||||||
// target: `http://192.168.2.78:9999`,
|
target: `http://192.168.2.78:9999`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||||
|
|
Loading…
Reference in New Issue