修复周三测试提出的住数据bug
This commit is contained in:
parent
aee09418c5
commit
aecb96adcd
|
@ -195,7 +195,7 @@
|
|||
class="showText"
|
||||
@click="elDialogClick(row, index, indexRow)"
|
||||
>
|
||||
{{ ruleForm[row.prop] ? ruleForm[row.prop] : "请点击选择" }}
|
||||
{{ ruleForm[row.prop] ? ruleForm[row.prop] : '请点击选择' }}
|
||||
<!-- <el-input v-model="ruleForm[row.prop]"></el-input> -->
|
||||
</p>
|
||||
<!-- <i class="el-icon-more " v-if="row.elDialogHoverType"></i> -->
|
||||
|
@ -321,11 +321,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import baseCascader from "./baseCascader/index.vue";
|
||||
import {deepClone} from "@/utils/index.js";
|
||||
import baseDatePicker from "./baseDatePicker.vue";
|
||||
import baseNewSelect from "./baseNewSelect";
|
||||
import {checkMobile} from "@/utils/util";
|
||||
import baseCascader from './baseCascader/index.vue'
|
||||
import { deepClone } from '@/utils/index.js'
|
||||
import baseDatePicker from './baseDatePicker.vue'
|
||||
import baseNewSelect from './baseNewSelect'
|
||||
import { checkMobile } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -333,88 +333,88 @@ export default {
|
|||
// customCascader
|
||||
baseNewSelect,
|
||||
baseDatePicker,
|
||||
baseCascader,
|
||||
baseCascader
|
||||
},
|
||||
props: {
|
||||
// 提交按钮loading
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 是否校验正则(搜索模式)
|
||||
formRule: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: true
|
||||
},
|
||||
refName: {
|
||||
type: String,
|
||||
default: "ruleForm",
|
||||
default: 'ruleForm'
|
||||
},
|
||||
// 表单新建模式
|
||||
newFlag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 表单查看模式
|
||||
lookFlag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 表单显示格式
|
||||
spanNumber: {
|
||||
type: Number,
|
||||
default: 12,
|
||||
default: 12
|
||||
},
|
||||
spanWidth: {
|
||||
type: String,
|
||||
default: "120px",
|
||||
default: '120px'
|
||||
},
|
||||
// 表单验证规则
|
||||
rules: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 表单页面结构数据
|
||||
formRow: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
// 是否禁用
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
// 是否显示操作按钮
|
||||
isFunBtn: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
default: true
|
||||
},
|
||||
formdata: {
|
||||
type: Object,
|
||||
type: Object
|
||||
},
|
||||
justifyContent: {
|
||||
type: String,
|
||||
default: "flex-end",
|
||||
default: 'flex-end'
|
||||
},
|
||||
marginBottom: {
|
||||
type: String,
|
||||
default: "0",
|
||||
default: '0'
|
||||
},
|
||||
ruleForm: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
return {}
|
||||
}
|
||||
},
|
||||
tableColumn: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
return []
|
||||
}
|
||||
},
|
||||
treeSelectInfo: {
|
||||
type: Object,
|
||||
|
@ -428,76 +428,76 @@ export default {
|
|||
pickerOptionsSearch: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "本月",
|
||||
text: '本月',
|
||||
onClick(picker) {
|
||||
picker.$emit("pick", [new Date(), new Date()]);
|
||||
},
|
||||
picker.$emit('pick', [new Date(), new Date()])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "今年至今",
|
||||
text: '今年至今',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date(new Date().getFullYear(), 0);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
const end = new Date()
|
||||
const start = new Date(new Date().getFullYear(), 0)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "最近六个月",
|
||||
text: '最近六个月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setMonth(start.getMonth() - 6);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setMonth(start.getMonth() - 6)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
// 表单数据
|
||||
// ruleForm: {},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now();
|
||||
return time.getTime() > Date.now()
|
||||
},
|
||||
shortcuts: [
|
||||
{
|
||||
text: "今天",
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
picker.$emit("pick", new Date());
|
||||
},
|
||||
picker.$emit('pick', new Date())
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "昨天",
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit("pick", date);
|
||||
},
|
||||
const date = new Date()
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24)
|
||||
picker.$emit('pick', date)
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "一周前",
|
||||
text: '一周前',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", date);
|
||||
},
|
||||
},
|
||||
],
|
||||
const date = new Date()
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
|
||||
picker.$emit('pick', date)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
tempFormData: {},
|
||||
};
|
||||
tempFormData: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
ruleForm: {
|
||||
immediate: true, // 立即执行
|
||||
deep: true, // 深度监听复杂类型内变化
|
||||
handler(newVal, oldVal) {
|
||||
this.$emit("dataChanges");
|
||||
},
|
||||
},
|
||||
this.$emit('dataChanges')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.tempFormData = deepClone(this.ruleForm);
|
||||
this.tempFormData = deepClone(this.ruleForm)
|
||||
},
|
||||
mounted() {
|
||||
// this.ruleForm = this.formdata
|
||||
|
@ -506,13 +506,13 @@ export default {
|
|||
methods: {
|
||||
selectShow(row) {
|
||||
try {
|
||||
this.$emit("selectFormSearch", row);
|
||||
this.$emit('selectFormSearch', row)
|
||||
} catch (error) {
|
||||
console.log(this.ruleForm, row, "23232出错了");
|
||||
console.log(this.ruleForm, row, '23232出错了')
|
||||
}
|
||||
},
|
||||
close() {
|
||||
this.$emit("closeDialog");
|
||||
this.$emit('closeDialog')
|
||||
},
|
||||
integerNumber(row) {
|
||||
// row.rules?(v)=>()):''
|
||||
|
@ -521,127 +521,127 @@ export default {
|
|||
// return this.ruleForm[row.prop].replace(/[^\d]/g,'')
|
||||
//
|
||||
// integer整数
|
||||
if (row.rulesName == "integer") {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, "");
|
||||
if (row.rulesName == 'integer') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g, '')
|
||||
}
|
||||
// decimal小数
|
||||
if (row.rulesName == "decimal") {
|
||||
if (row.rulesName == 'decimal') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop]
|
||||
.replace(/[^\d.]/g, "")
|
||||
.replace(/\.{2,}/g, ".")
|
||||
.replace(".", "$#$")
|
||||
.replace(/\./g, "")
|
||||
.replace("$#$", ".")
|
||||
.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")
|
||||
.replace(/^\./g, "");
|
||||
.replace(/[^\d.]/g, '')
|
||||
.replace(/\.{2,}/g, '.')
|
||||
.replace('.', '$#$')
|
||||
.replace(/\./g, '')
|
||||
.replace('$#$', '.')
|
||||
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
|
||||
.replace(/^\./g, '')
|
||||
}
|
||||
// 身份证
|
||||
if (row.rulesName == "identity") {
|
||||
if (row.rulesName == 'identity') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
|
||||
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
||||
""
|
||||
);
|
||||
''
|
||||
)
|
||||
}
|
||||
// 手机号
|
||||
if (row.rulesName == "phone") {
|
||||
if (row.rulesName == 'phone') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
|
||||
/^1(3|4|5|7|8|9)\\d{9}$/,
|
||||
""
|
||||
);
|
||||
''
|
||||
)
|
||||
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/^1[3,4,5,6,7,8,9][0-9]{9}$/, '')
|
||||
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/1(\d{2})\d{4}(\d{4})/g,'').replace(/[^\d]/g, '')
|
||||
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/\.{11,}/g, '')
|
||||
// /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
|
||||
}
|
||||
// 邮箱
|
||||
if (row.rulesName == "eMail") {
|
||||
if (row.rulesName == 'eMail') {
|
||||
this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(
|
||||
/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/,
|
||||
""
|
||||
);
|
||||
''
|
||||
)
|
||||
}
|
||||
// this.ruleForm[row.prop] = this.ruleForm[row.prop].replace(/[^\d]/g,'')
|
||||
},
|
||||
//根据地址获取经纬度
|
||||
searchByStationName(type) {
|
||||
if (type == "address") {
|
||||
let address = this.ruleForm[type];
|
||||
let that = this;
|
||||
var map = new BMap.Map("container");
|
||||
map.centerAndZoom(address, 18);
|
||||
map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用
|
||||
map.enableContinuousZoom(); //启用地图惯性拖拽,默认禁用
|
||||
map.addControl(new BMap.NavigationControl()); //添加默认缩放平移控件
|
||||
map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
|
||||
if (type == 'address') {
|
||||
let address = this.ruleForm[type]
|
||||
let that = this
|
||||
var map = new BMap.Map('container')
|
||||
map.centerAndZoom(address, 18)
|
||||
map.enableScrollWheelZoom() //启用滚轮放大缩小,默认禁用
|
||||
map.enableContinuousZoom() //启用地图惯性拖拽,默认禁用
|
||||
map.addControl(new BMap.NavigationControl()) //添加默认缩放平移控件
|
||||
map.addControl(new BMap.OverviewMapControl()) //添加默认缩略地图控件
|
||||
map.addControl(
|
||||
new BMap.OverviewMapControl({
|
||||
isOpen: true,
|
||||
anchor: BMAP_ANCHOR_BOTTOM_RIGHT,
|
||||
anchor: BMAP_ANCHOR_BOTTOM_RIGHT
|
||||
})
|
||||
); //右下角,打开
|
||||
var localSearch = new BMap.LocalSearch(map);
|
||||
localSearch.enableAutoViewport(); //允许自动调节窗体大小
|
||||
map.clearOverlays(); //清空原来的标注
|
||||
var keyword = address;
|
||||
localSearch.setSearchCompleteCallback(function (searchResult) {
|
||||
var poi = searchResult.getPoi(0);
|
||||
map.centerAndZoom(poi.point, 13);
|
||||
) //右下角,打开
|
||||
var localSearch = new BMap.LocalSearch(map)
|
||||
localSearch.enableAutoViewport() //允许自动调节窗体大小
|
||||
map.clearOverlays() //清空原来的标注
|
||||
var keyword = address
|
||||
localSearch.setSearchCompleteCallback(function(searchResult) {
|
||||
var poi = searchResult.getPoi(0)
|
||||
map.centerAndZoom(poi.point, 13)
|
||||
var marker = new BMap.Marker(
|
||||
new BMap.Point(poi.point.lng, poi.point.lat)
|
||||
); // 创建标注,为要查询的地方对应的经纬度
|
||||
map.addOverlay(marker);
|
||||
) // 创建标注,为要查询的地方对应的经纬度
|
||||
map.addOverlay(marker)
|
||||
var content =
|
||||
keyword +
|
||||
"<br/><br/>经度:" +
|
||||
'<br/><br/>经度:' +
|
||||
poi.point.lng +
|
||||
"<br/>纬度:" +
|
||||
poi.point.lat;
|
||||
that.ruleForm["lng"] = poi.point.lng;
|
||||
that.ruleForm["lat"] = poi.point.lat;
|
||||
'<br/>纬度:' +
|
||||
poi.point.lat
|
||||
that.ruleForm['lng'] = poi.point.lng
|
||||
that.ruleForm['lat'] = poi.point.lat
|
||||
var infoWindow = new BMap.InfoWindow(
|
||||
"<p style='font-size:14px;'>" + content + "</p>"
|
||||
);
|
||||
marker.addEventListener("click", function () {
|
||||
this.openInfoWindow(infoWindow);
|
||||
});
|
||||
'<p style=\'font-size:14px;\'>' + content + '</p>'
|
||||
)
|
||||
marker.addEventListener('click', function() {
|
||||
this.openInfoWindow(infoWindow)
|
||||
})
|
||||
// marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
|
||||
});
|
||||
localSearch.search(keyword);
|
||||
})
|
||||
localSearch.search(keyword)
|
||||
}
|
||||
},
|
||||
//计步器
|
||||
handleChange(val) {
|
||||
this.$emit("handleChange", val);
|
||||
this.$emit('handleChange', val)
|
||||
},
|
||||
// 获取图片
|
||||
getImage(imagePath) {
|
||||
let licenseImg = imagePath.join(",");
|
||||
let licenseImg = imagePath.join(',')
|
||||
},
|
||||
// 处置前照片
|
||||
getbeforeImgList(imagePath) {
|
||||
let licenseImg = imagePath.join(",");
|
||||
this.$set(this.ruleForm, "beforeImgList", licenseImg);
|
||||
let licenseImg = imagePath.join(',')
|
||||
this.$set(this.ruleForm, 'beforeImgList', licenseImg)
|
||||
},
|
||||
// 处置材料
|
||||
getmaterialsList(imagePath) {
|
||||
let licenseImg = imagePath.join(",");
|
||||
this.$set(this.ruleForm, "materialsList", licenseImg);
|
||||
let licenseImg = imagePath.join(',')
|
||||
this.$set(this.ruleForm, 'materialsList', licenseImg)
|
||||
},
|
||||
// 处置后材料
|
||||
getmaterialsListAfter(imagePath) {
|
||||
let licenseImg = imagePath.join(",");
|
||||
this.$set(this.ruleForm, "materialsListAfter", licenseImg);
|
||||
let licenseImg = imagePath.join(',')
|
||||
this.$set(this.ruleForm, 'materialsListAfter', licenseImg)
|
||||
},
|
||||
revealPhoto(licenseImg) {
|
||||
this.$refs.imgFile.revealImg(licenseImg);
|
||||
this.$refs.imgFile.revealImg(licenseImg)
|
||||
},
|
||||
// 回显数据
|
||||
echoFromData(echoData, otherField) {
|
||||
let jsonData = [];
|
||||
let jsonData = []
|
||||
this.formRow.forEach((item) => {
|
||||
jsonData.push(item.elCol);
|
||||
});
|
||||
let newJson = [].concat.apply([], jsonData);
|
||||
jsonData.push(item.elCol)
|
||||
})
|
||||
let newJson = [].concat.apply([], jsonData)
|
||||
newJson.forEach((item) => {
|
||||
if (this.ruleForm.factoryInFlag == 1) {
|
||||
for (let i = 0; i < this.formRow[8].elCol.length; i++) {
|
||||
|
@ -651,31 +651,31 @@ export default {
|
|||
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])
|
||||
})
|
||||
// 回显自定义多级选择组件
|
||||
if (typeof otherField == "object") {
|
||||
this.$refs[otherField.props][0].setEchoData(echoData[otherField.field]);
|
||||
if (typeof otherField == 'object') {
|
||||
this.$refs[otherField.props][0].setEchoData(echoData[otherField.field])
|
||||
}
|
||||
},
|
||||
// 获取指定字段参数
|
||||
//参数propLabel , 值value
|
||||
getField(propLabel, value) {
|
||||
this.$set(this.ruleForm, propLabel, value);
|
||||
this.$set(this.ruleForm, propLabel, value)
|
||||
},
|
||||
//弹窗赋值
|
||||
choiceAssignment(value) {
|
||||
this.ruleForm = Object.assign({}, value);
|
||||
this.ruleForm = Object.assign({}, value)
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
incomingParameters(vale) {
|
||||
let ruleLength = 0;
|
||||
let valeLength = 0;
|
||||
let ruleLength = 0
|
||||
let valeLength = 0
|
||||
for (let i in vale) {
|
||||
valeLength = valeLength + 1;
|
||||
valeLength = valeLength + 1
|
||||
}
|
||||
for (let i in this.ruleForm) {
|
||||
ruleLength = ruleLength + 1;
|
||||
ruleLength = ruleLength + 1
|
||||
}
|
||||
// if(ruleLength == valeLength){
|
||||
// this.choiceAssignment(vale)
|
||||
|
@ -685,107 +685,107 @@ export default {
|
|||
// }
|
||||
// }
|
||||
for (let i in vale) {
|
||||
this.getField(i, vale[i]);
|
||||
this.getField(i, vale[i])
|
||||
}
|
||||
},
|
||||
resetFormPlus(formName) {
|
||||
for (let i in this.$refs[formName]) {
|
||||
this.getField(i, "");
|
||||
this.getField(i, '')
|
||||
}
|
||||
},
|
||||
// 重置表单字段
|
||||
resetField(field) {
|
||||
if (this.ruleForm[field]) {
|
||||
this.$set(this.ruleForm, field, "");
|
||||
this.$refs["ruleForm"].clearValidate(field); // 清除表单特定属性
|
||||
this.$set(this.ruleForm, field, '')
|
||||
this.$refs['ruleForm'].clearValidate(field) // 清除表单特定属性
|
||||
}
|
||||
},
|
||||
resetFields() {
|
||||
// this.choiceAssignment({});
|
||||
this.$refs.ruleForm.resetFields();
|
||||
this.$refs.ruleForm.resetFields()
|
||||
},
|
||||
// 下拉框更改,可根据 index 与 indexRow 定位具体位置
|
||||
selectChange(val, index, indexRow, options) {
|
||||
let obj = {};
|
||||
let obj = {}
|
||||
options.forEach((item) => {
|
||||
if (item.value == val) {
|
||||
obj = item;
|
||||
obj = item
|
||||
}
|
||||
});
|
||||
this.$emit("onSelect", val, index, indexRow, obj);
|
||||
this.$forceUpdate();
|
||||
})
|
||||
this.$emit('onSelect', val, index, indexRow, obj)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
switchChange(val, index, indexRow, row) {
|
||||
this.$emit("switchChange", val, index, indexRow, row);
|
||||
this.$emit('switchChange', val, index, indexRow, row)
|
||||
},
|
||||
// 自定义级联选择器返回值
|
||||
getCascader(value, field) {
|
||||
this.$set(this.ruleForm, field, value);
|
||||
this.$set(this.ruleForm, field, value)
|
||||
},
|
||||
// 表单提交
|
||||
submitForm() {
|
||||
let formName = "ruleForm";
|
||||
let formName = 'ruleForm'
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
// 判断是否有更改
|
||||
let flag =
|
||||
JSON.stringify(this.tempFormData) === JSON.stringify(this.ruleForm);
|
||||
this.$emit("onSubmit", this.ruleForm, flag);
|
||||
JSON.stringify(this.tempFormData) === JSON.stringify(this.ruleForm)
|
||||
this.$emit('onSubmit', this.ruleForm, flag)
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 表单重置
|
||||
resetForm(formName) {
|
||||
let tempObj = deepClone(this.tempFormData);
|
||||
let tempObj = deepClone(this.tempFormData)
|
||||
// // this.tableColumn
|
||||
// // .filter((item) => item.disabled)
|
||||
// // .forEach((item) => {
|
||||
// // tempObj[item.id] = this.ruleForm[item.id];
|
||||
// // });
|
||||
// // this.choiceAssignment({});
|
||||
this.$confirm("确认要重置表单吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
this.$confirm('确认要重置表单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit("resetForm", tempObj);
|
||||
this.$refs[formName].resetFields();
|
||||
this.$emit('resetForm', tempObj)
|
||||
this.$refs[formName].resetFields()
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: "info",
|
||||
message: "已取消重置",
|
||||
});
|
||||
});
|
||||
type: 'info',
|
||||
message: '已取消重置'
|
||||
})
|
||||
})
|
||||
},
|
||||
clearCheck(propName) {
|
||||
this.ruleForm[propName] = "";
|
||||
this.ruleForm[propName] = ''
|
||||
},
|
||||
elDialogClick(row, index, indexRow) {
|
||||
if (row.disabled) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
// row.prop
|
||||
this.$emit("elDialogClick", row, index);
|
||||
this.$emit('elDialogClick', row, index)
|
||||
},
|
||||
elDialogHover(row) {
|
||||
row.elDialogHoverType = true;
|
||||
row.elDialogHoverType = true
|
||||
},
|
||||
elDialogLeave(row) {
|
||||
// row.elDialogHoverType = false
|
||||
},
|
||||
// 单选按钮组input事件
|
||||
changeRadio(val, index, indexRow, row) {
|
||||
this.$emit("onChangeRadio", val, index, indexRow, row);
|
||||
this.$emit('onChangeRadio', val, index, indexRow, row)
|
||||
},
|
||||
normalizer(node, row) {
|
||||
//去掉children=null的属性
|
||||
if (node.children == null || node.children == "null") {
|
||||
delete node.children;
|
||||
if (node.children == null || node.children == 'null') {
|
||||
delete node.children
|
||||
}
|
||||
// return{
|
||||
// ...node,
|
||||
|
@ -793,22 +793,22 @@ export default {
|
|||
// }
|
||||
},
|
||||
selectTree(row) {
|
||||
console.log(row);
|
||||
this.$emit("selectTree");
|
||||
console.log(row)
|
||||
this.$emit('selectTree')
|
||||
if (this.$refs.ruleForm) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.validateField(row.id);
|
||||
});
|
||||
this.$refs.ruleForm.validateField(row.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
treeSelectClear() {
|
||||
this.$refs.selectTree.clear();
|
||||
},
|
||||
this.$refs.selectTree.clear()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.ruleForm.resetFields();
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-form-item__label {
|
||||
|
@ -817,8 +817,9 @@ export default {
|
|||
}
|
||||
|
||||
.el-form-item--medium .el-form-item__content {
|
||||
/* line-height: 36px; */
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
|
||||
|
@ -826,7 +827,7 @@ export default {
|
|||
content: "";
|
||||
}
|
||||
</style>
|
||||
<style scoped lang='scss'>
|
||||
<style scoped lang="scss">
|
||||
.label {
|
||||
/* @include fontBase(16px, #333333) ; */
|
||||
color: #333;
|
||||
|
@ -922,4 +923,7 @@ export default {
|
|||
resize: none;
|
||||
}
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<template slot-scope="scope">
|
||||
<!-- 定义插槽:父组件可以使用 v-slot:prop="{row}" 搭配template标签,自定义每一列单元格的样式与操作 -->
|
||||
<slot :name="item.id" :row="slotrow ? scope : scope.row">
|
||||
<template v-if="scope.$index + 1 != tableInfo.tableData.length">
|
||||
<template v-if="scope.$index + 1 != tableInfo.tableData.length || lookflag">
|
||||
<template v-if="!lookflag">
|
||||
<el-input
|
||||
v-if="item.type === 'input' || item.type === 'textrea'"
|
||||
|
|
|
@ -565,6 +565,7 @@ export default {
|
|||
this.dialogFormName = res.attribute.mainMdmModuleDb.dbName
|
||||
this.formRow = []
|
||||
this.baseFormRowDispose(res.attribute.mainMdmModuleDb.sublistMdmModuleDbFileds, this.formRow)
|
||||
console.log(this.formRow, 'this.formRow')
|
||||
//子表处理
|
||||
this.dialogTabaleInfo = []
|
||||
res.attribute.sublistMdmModuleDb.forEach(table => {
|
||||
|
@ -853,8 +854,8 @@ export default {
|
|||
this.appSearch(item.appId, item)
|
||||
})
|
||||
this.rowId = id
|
||||
this.sendCheckboxType=''
|
||||
this.sendCheckboxList=''
|
||||
this.sendCheckboxType = ''
|
||||
this.sendCheckboxList = ''
|
||||
this.sendShow = true
|
||||
},
|
||||
//应用名查找
|
||||
|
|
|
@ -48,7 +48,7 @@ const optionFormRow = [
|
|||
required: true,
|
||||
fontSize: 16,
|
||||
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||
message: "必须以小写字母开头,只能包含小写字母、数字和下划线,不能包含中文字符或其他符号。",
|
||||
disabledOfId: true,
|
||||
},
|
||||
],
|
||||
|
|
|
@ -100,7 +100,7 @@ export default {
|
|||
required: true,
|
||||
fontSize: 16,
|
||||
pattern: /^[a-z][a-z0-9_]{0,50}$/,
|
||||
message: "须以需字母开头且字母小写且不能出现_外的字符与中文",
|
||||
message: "必须以小写字母开头,只能包含小写字母、数字和下划线,不能包含中文字符或其他符号。",
|
||||
disabledOfId: true
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue