Update index.vue

peiyanni 3 years ago
parent b975c53d9e
commit 3880b18d89

@ -6,224 +6,103 @@
!-->
<template>
<div class="app-container">
<el-form>
<el-form v-permission="'resultsetManage:query'">
<!-- 搜索 -->
<el-row :gutter="10">
<el-col :xs="24"
:sm="20"
:md="6"
:lg="6"
:xl="6">
<el-form-item label="数据集编码"
label-width="120px">
<el-input v-model.trim="query.setCode"
size="mini"
clearable
placeholder="数据集编码"
class="filter-item" />
<el-col :xs="24" :sm="20" :md="6" :lg="6" :xl="6">
<el-form-item label="数据集编码" label-width="120px">
<el-input v-model.trim="query.setCode" size="mini" clearable placeholder="数据集编码" class="filter-item" />
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="6"
:lg="6"
:xl="6">
<el-form-item label="数据集名称"
label-width="120px">
<el-input v-model.trim="query.setName"
size="mini"
clearable
placeholder="数据源名称"
class="filter-item" />
<el-col :xs="24" :sm="20" :md="6" :lg="6" :xl="6">
<el-form-item label="数据集名称" label-width="120px">
<el-input v-model.trim="query.setName" size="mini" clearable placeholder="数据源名称" class="filter-item" />
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="4"
:lg="4"
:xl="4" class="query">
<el-button type="primary"
size="mini"
@click="search('form')">查询</el-button>
<el-button type="danger"
size="mini"
@click="reset('form')">重置</el-button>
<el-col :xs="24" :sm="20" :md="4" :lg="4" :xl="4" class="query">
<el-button type="primary" size="mini" @click="search('form')"></el-button>
<el-button type="danger" size="mini" @click="reset('form')"></el-button>
</el-col>
</el-row>
</el-form>
<el-button type="primary"
size="mini"
@click="addOrEditDataSet()">+ 新增</el-button>
<el-button type="primary" size="mini" @click="addOrEditDataSet()" v-permission="'resultsetManage:insert'">+ </el-button>
<!--表格渲染-->
<el-table ref="table"
v-loading="listLoading"
border
:data="data"
size="small"
class="mt10"
style="width: 100%">
<el-table-column align="center"
label="序号"
type="index"
min-width="40" />
<el-table-column prop="setName"
label="数据集名称" />
<el-table-column prop="setCode"
label="数据集编码" />
<el-table-column prop="setDesc"
label="描述" />
<el-table ref="table" v-loading="listLoading" border :data="data" size="small" class="mt10" style="width: 100%">
<el-table-column align="center" label="序号" type="index" min-width="40" />
<el-table-column prop="setName" label="数据集名称" />
<el-table-column prop="setCode" label="数据集编码" />
<el-table-column prop="setDesc" label="描述" />
<el-table-column label="折叠列">
<template slot-scope="scope">
<el-button @click="isShowCaseResult(scope.row)"></el-button>
</template>
</el-table-column>
<el-table-column prop="createBy"
width="100"
label="创建人" />
<el-table-column prop="createTime"
width="140"
label="创建人" />
<el-table-column prop="updateBy"
width="100"
label="更新人" />
<el-table-column prop="updateTime"
width="140"
label="更新时间" />
<el-table-column label="操作"
width="120px"
align="center">
<el-table-column prop="createBy" width="100" label="创建人" />
<el-table-column prop="createTime" width="140" label="创建人" />
<el-table-column prop="updateBy" width="100" label="更新人" />
<el-table-column prop="updateTime" width="140" label="更新时间" />
<el-table-column label="操作" width="120px" align="center">
<template slot-scope="scope">
<el-button size="mini"
type="text"
@click="addOrEditDataSet(scope.row)">编辑</el-button>
<el-button size="mini" type="text" @click="addOrEditDataSet(scope.row)" v-permission="'resultsetManage:update'"></el-button>
<!-- <el-popconfirm :title="'确定删除' + scope.row.setName + '吗?'"
@onConfirm="delect(scope.row)"> -->
<el-button slot="reference"
type="text"
@click="delect(scope.row)">删除</el-button>
<el-button slot="reference" type="text" @click="delect(scope.row)" v-permission="'resultsetManage:delete'"></el-button>
<!-- </el-popconfirm> -->
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<div class="block">
<el-pagination :total="totalCount"
:page-sizes="[10, 20, 50, 100]"
:page-size="params.pageSize"
:current-page="params.pageNumber"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
<el-pagination :total="totalCount" :page-sizes="[10, 20, 50, 100]" :page-size="params.pageSize" :current-page="params.pageNumber" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
</div>
<!--表单组件-->
<el-dialog :visible.sync="dialogFormVisible"
:title="dialogFormVisibleTitle"
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="handleClose"
width="65%">
<el-form ref="form"
:model="formData"
:rules="formRules"
size="small"
label-width="130px">
<el-dialog :visible.sync="dialogFormVisible" :title="dialogFormVisibleTitle" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="handleClose" width="65%">
<el-form ref="form" :model="formData" :rules="formRules" size="small" label-width="130px">
<el-row :gutter="10">
<el-col :xs="24"
:sm="20"
:md="6"
:lg="6"
:xl="6">
<el-form-item label="数据源"
prop="sourceCode">
<el-select v-model.trim="formData.sourceCode"
class="organisation"
size="mini"
@change="changeSource">
<el-option v-for="item in sourceList"
:key="item.sourceName"
:label="item.sourceName"
:value="item.sourceCode" />
<el-col :xs="24" :sm="20" :md="6" :lg="6" :xl="6">
<el-form-item label="数据源" prop="sourceCode">
<el-select v-model.trim="formData.sourceCode" class="organisation" size="mini" @change="changeSource">
<el-option v-for="item in sourceList" :key="item.sourceName" :label="item.sourceName" :value="item.sourceCode" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="8"
:lg="8"
:xl="8">
<el-form-item label="数据集编码"
prop="setCode">
<el-input :disabled="updataDisabled" v-model.trim="formData.setCode"
size="mini" />
<el-col :xs="24" :sm="20" :md="8" :lg="8" :xl="8">
<el-form-item label="数据集编码" prop="setCode">
<el-input :disabled="updataDisabled" v-model.trim="formData.setCode" size="mini" />
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="8"
:lg="8"
:xl="8">
<el-form-item label="数据集名称"
prop="setName">
<el-input v-model.trim="formData.setName"
size="mini" />
<el-col :xs="24" :sm="20" :md="8" :lg="8" :xl="8">
<el-form-item label="数据集名称" prop="setName">
<el-input v-model.trim="formData.setName" size="mini" />
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="22"
:lg="22"
:xl="22">
<el-col :xs="24" :sm="20" :md="22" :lg="22" :xl="22">
<el-form-item label="数据集描述">
<el-input v-model.trim="formData.setDesc"
size="mini" />
<el-input v-model.trim="formData.setDesc" size="mini" />
</el-form-item>
</el-col>
<el-col :xs="24"
:sm="20"
:md="22"
:lg="22"
:xl="22"
class="code-mirror-form">
<el-col :xs="24" :sm="20" :md="22" :lg="22" :xl="22" class="code-mirror-form">
<el-form-item label="查询SQL或请求体">
<div class="codemirror">
<codemirror v-model.trim="formData.dynSentence"
:options="optionsSql"
style="height: 190px" />
<codemirror v-model.trim="formData.dynSentence" :options="optionsSql" style="height: 190px" />
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :xs="24"
:sm="20"
:md="22"
:lg="22"
:xl="22">
<el-form label-width="100px"
class="demo-ruleForm">
<el-tabs v-model.trim="tabsActiveName"
type="card"
@tab-click="handleClickTabs">
<el-tab-pane label="查询参数"
name="first">
<el-button v-if="tableData.length == 0"
type="text"
size="small"
@click="addRow()">添加</el-button>
<el-table :data="tableData"
border
style="width: 100%">
<el-table-column align="center"
label="序号"
type="index"
min-width="40" />
<el-col :xs="24" :sm="20" :md="22" :lg="22" :xl="22">
<el-form label-width="100px" class="demo-ruleForm">
<el-tabs v-model.trim="tabsActiveName" type="card" @tab-click="handleClickTabs">
<el-tab-pane label="查询参数" name="first">
<el-button v-if="tableData.length == 0" type="text" size="small" @click="addRow()"></el-button>
<el-table :data="tableData" border style="width: 100%">
<el-table-column align="center" label="序号" type="index" min-width="40" />
<el-table-column label="参数名">
<template slot-scope="scope">
<el-input v-model.trim="tableData[scope.$index].paramName"
:disabled="tableData[scope.$index].paramName == 'pageSize' || tableData[scope.$index].paramName == 'pageNumber'" />
<el-input v-model.trim="tableData[scope.$index].paramName" :disabled="tableData[scope.$index].paramName == 'pageSize' || tableData[scope.$index].paramName == 'pageNumber'" />
</template>
</el-table-column>
<el-table-column label="描述">
@ -241,14 +120,10 @@
<el-input v-model.trim="tableData[scope.$index].sampleItem" />
</template>
</el-table-column>
<el-table-column label="校验"
width="220">
<el-table-column label="校验" width="220">
<template slot-scope="scope">
<el-checkbox v-model="tableData[scope.$index].mandatory"
@change="Mandatory(scope.$index)">必选</el-checkbox>
<el-button type="primary"
icon="el-icon-plus"
@click="permissionClick(scope.row, scope.$index)"> 高级规则 </el-button>
<el-checkbox v-model="tableData[scope.$index].mandatory" @change="Mandatory(scope.$index)"></el-checkbox>
<el-button type="primary" icon="el-icon-plus" @click="permissionClick(scope.row, scope.$index)"> 高级规则 </el-button>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('btn.operationCol')"
@ -263,65 +138,34 @@
</template>
</el-table-column> -->
</el-table>
<el-checkbox v-model="isShowPagination"
@change="changePagination">加入分页参数</el-checkbox>
<el-checkbox v-model="isShowPagination" @change="changePagination"></el-checkbox>
</el-tab-pane>
<el-tab-pane label="数据转换"
name="second">
<el-tab-pane label="数据转换" name="second">
<template>
<div class="filterWrapper">
<div class="filterTable">
<div v-for="(item, index) in itemFilterList"
:key="index"
class="filterBox">
<div v-for="(item, index) in itemFilterList" :key="index" class="filterBox">
<div class="box">
<Dictionary v-model="item.transformType"
:updata-dict="item.transformType"
:dict-key="'TRANSFORM_TYPE'" />
<el-button type="text"
class="reduceFilter"
icon="el-icon-close"
@click="reduceFilter(item)" />
<el-button v-if="item.transformType == 'js' || item.transformType == 'dict'"
type="text"
class="editor"
icon="el-icon-edit"
@click="filterScriptBtn(item)" />
<Dictionary v-model="item.transformType" :updata-dict="item.transformType" :dict-key="'TRANSFORM_TYPE'" />
<el-button type="text" class="reduceFilter" icon="el-icon-close" @click="reduceFilter(item)" />
<el-button v-if="item.transformType == 'js' || item.transformType == 'dict'" type="text" class="editor" icon="el-icon-edit" @click="filterScriptBtn(item)" />
</div>
<el-button type="text"
class="font-icon-right"
icon="el-icon-right" />
<el-button type="text" class="font-icon-right" icon="el-icon-right" />
</div>
<el-dialog :title="dialogTitle"
:visible.sync="dialogSwitchVisible"
width="60%"
min-height="400px"
append-to-body>
<el-dialog :title="dialogTitle" :visible.sync="dialogSwitchVisible" width="60%" min-height="400px" append-to-body>
<div v-if="isItemFilterType.transformType == 'js'">
<div class="codemirror">
<!-- // -->
<codemirror v-model.trim="transformScript"
:options="optionsJavascript"
style="height: 210px;overflow: hidden;" />
<codemirror v-model.trim="transformScript" :options="optionsJavascript" style="height: 210px;overflow: hidden;" />
</div>
</div>
<div v-else>
<div v-for="(item, index) in tableData2"
:key="index">
<div v-for="(item, index) in tableData2" :key="index">
<label>字典项名称</label>
<el-input v-model.trim="item.name"
size="small"
style="width: 25%" />
<el-button type="danger"
size="small"
plain
icon="el-icon-delete"
@click="delAllDict(index, tableData2)" />
<el-table :data="item.children"
border
style="width: 80%">
<el-table-column label="key"
width="180">
<el-input v-model.trim="item.name" size="small" style="width: 25%" />
<el-button type="danger" size="small" plain icon="el-icon-delete" @click="delAllDict(index, tableData2)" />
<el-table :data="item.children" border style="width: 80%">
<el-table-column label="key" width="180">
<template slot-scope="scope">
<el-input v-model.trim="item.children[scope.$index].name" />
</template>
@ -331,54 +175,33 @@
<el-input v-model.trim="item.children[scope.$index].value" />
</template>
</el-table-column>
<el-table-column label="操作"
width="150px"
align="center">
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button type="success"
circle
plain
icon="el-icon-plus"
@click="addDict(scope.$index, item.children)" />
<el-button type="success" circle plain icon="el-icon-plus" @click="addDict(scope.$index, item.children)" />
<el-button type="danger"
circle
plain
icon="el-icon-delete"
@click="delDict(scope.$index, item.children)" />
<el-button type="danger" circle plain icon="el-icon-delete" @click="delDict(scope.$index, item.children)" />
</template>
</el-table-column>
</el-table>
</div>
<el-button type="success"
@click="addAllDict()">新增</el-button>
<el-button type="success" @click="addAllDict()"></el-button>
</div>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="dialogSwitchVisible = false">取消</el-button>
<el-button type="primary"
@click="filterScriptConfirm">保存</el-button>
<el-button type="primary" @click="filterScriptConfirm"></el-button>
</span>
</el-dialog>
<!-- // -->
<div class="addFilter"
disabled="true"
@click="addFilter">
<div class="addFilter" disabled="true" @click="addFilter">
<i class="el-icon-plus" /><span>新增</span>
</div>
</div>
</div>
</template>
</el-tab-pane>
<el-tab-pane label="测试预览"
name="third">
<el-tab-pane label="测试预览" name="third">
<div style="max-height: 400px; overflow: auto">
<vue-json-editor v-model="cols"
:show-btns="false"
:mode="'code'"
lang="zh"
@json-change="onJsonChange"
@json-save="onJsonSave" />
<vue-json-editor v-model="cols" :show-btns="false" :mode="'code'" lang="zh" @json-change="onJsonChange" @json-save="onJsonSave" />
</div>
</el-tab-pane>
</el-tabs>
@ -386,54 +209,44 @@
</el-col>
</el-row>
</el-form>
<div slot="footer"
class="dialog-footer">
<div slot="footer" class="dialog-footer">
<!-- <el-button type="warning" @click="test"></el-button> -->
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary"
@click="submit('form')">保存</el-button>
<el-button type="primary" @click="submit('form')"></el-button>
</div>
</el-dialog>
<el-dialog :title="title"
:visible.sync="dialogPermissionVisible"
width="60%">
<el-dialog :title="title" :visible.sync="dialogPermissionVisible" width="60%">
<div class="codemirror">
<!-- // -->
<codemirror v-model.trim="validationRules"
:options="optionsJavascript"
style="height: 210px;overflow: hidden;" />
<codemirror v-model.trim="validationRules" :options="optionsJavascript" style="height: 210px;overflow: hidden;" />
</div>
<span slot="footer"
class="dialog-footer">
<el-button type="warning"
@click="testResultset">测试</el-button>
<span slot="footer" class="dialog-footer">
<el-button type="warning" @click="testResultset"></el-button>
<el-button type="primary"
@click="dialogValidationRules">保存</el-button>
<el-button type="primary" @click="dialogValidationRules"></el-button>
<el-button @click="dialogPermissionVisible = false">关闭</el-button>
</span>
</el-dialog>
<el-dialog :title="caseResultTitle"
:visible.sync="dialogCaseResult"
width="70%">
<vue-json-editor v-model="caseResultContent"
:show-btns="false"
:mode="'code'"
lang="zh"
class="my-editor"
@json-change="onJsonChange"
@json-save="onJsonSave" />
<span slot="footer"
class="dialog-footer">
<el-button type="primary"
@click="dialogCaseResult = false">关闭</el-button>
<el-dialog :title="caseResultTitle" :visible.sync="dialogCaseResult" width="70%">
<vue-json-editor v-model="caseResultContent" :show-btns="false" :mode="'code'" lang="zh" class="my-editor" @json-change="onJsonChange" @json-save="onJsonSave" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogCaseResult = false">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { queryAllDataSourceSet, verificationSet, testTransformSet, dataSetPreview, addDataSet, editDataSet, deleteDataSet, dataSetPageList } from '@/api/report'
import {
queryAllDataSourceSet,
verificationSet,
testTransformSet,
dataSetPreview,
addDataSet,
editDataSet,
deleteDataSet,
dataSetPageList,
} from '@/api/report'
import Dictionary from '@/components/Dictionary/index'
import { codemirror } from 'vue-codemirror' // codeMirror
import 'codemirror/mode/sql/sql.js'
@ -447,7 +260,7 @@ export default {
dicts: ['pricing_method'],
data () {
data() {
return {
data: [],
listLoading: true,
@ -518,9 +331,15 @@ export default {
sort: 'update_time',
},
formRules: {
setName: [{ required: true, message: '数据集名称必填', trigger: 'blur' }],
setCode: [{ required: true, message: '数据集编码必填', trigger: 'blur' }],
sourceCode: [{ required: true, message: '数据源必选', trigger: 'change' }],
setName: [
{ required: true, message: '数据集名称必填', trigger: 'blur' },
],
setCode: [
{ required: true, message: '数据集编码必填', trigger: 'blur' },
],
sourceCode: [
{ required: true, message: '数据源必选', trigger: 'change' },
],
},
sourceList: [],
validationRules: '',
@ -551,41 +370,41 @@ export default {
testMassageCode: null,
query: {
setName: '',
setCode: ''
}
setCode: '',
},
}
},
watch: {},
// beforeCreatethis
beforeCreate: function () { },
mounted () {
beforeCreate: function () {},
mounted() {
this.queryByPage()
},
created () {
created() {
this.getAllDataSourceSet()
},
methods: {
//
search () {
search() {
this.params.pageNumber = 1
this.queryByPage()
},
//
reset (formName) {
reset(formName) {
// this.$refs[formName].resetFields()
this.query.setName = ''
this.query.setCode = ''
this.params.pageNumber = 1
this.queryByPage()
},
async queryByPage () {
async queryByPage() {
let params = {
page: this.params.pageNumber,
size: this.params.pageSize,
sort: "update_time",
order: "DESC",
sort: 'update_time',
order: 'DESC',
pageNumber: this.params.pageNumber,
pageSize: this.params.pageSize
pageSize: this.params.pageSize,
}
const res = await dataSetPageList(params)
if (res.code != '200') return
@ -596,26 +415,26 @@ export default {
this.listLoading = false
},
handleSizeChange (val) {
handleSizeChange(val) {
this.params.pageSize = val
this.queryByPage()
},
handleCurrentChange (val) {
handleCurrentChange(val) {
this.params.pageNumber = val
this.queryByPage()
},
onJsonChange (value) { },
onJsonSave (value) { },
handleClose (done) {
onJsonChange(value) {},
onJsonSave(value) {},
handleClose(done) {
this.dialogFormVisible = false
},
isShowCaseResult (item) {
isShowCaseResult(item) {
this.dialogCaseResult = true
this.caseResultTitle = item.setName
this.caseResultContent = JSON.parse(item.caseResult)
},
delect (row) {
delect(row) {
this.$confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -640,7 +459,7 @@ export default {
})
},
// ,
addOrEditDataSet (row) {
addOrEditDataSet(row) {
this.dialogFormVisible = true
this.tabsActiveName = 'first'
this.testMassageCode = null
@ -649,11 +468,17 @@ export default {
this.dialogFormVisibleTitle = '编辑数据集'
dataSetPreview(row).then((data) => {
this.formData = data.data
if (data.data.dataSetParamDtoList != null || data.data.dataSetParamDtoList.length > 0) {
if (
data.data.dataSetParamDtoList != null ||
data.data.dataSetParamDtoList.length > 0
) {
this.tableData = data.data.dataSetParamDtoList
var count = 0
this.tableData.find((value, i) => {
if (value.paramName === 'pageNumber' || value.paramName === 'pageSize') {
if (
value.paramName === 'pageNumber' ||
value.paramName === 'pageSize'
) {
count++
}
if (value.requiredFlag == 1) {
@ -707,13 +532,13 @@ export default {
}
},
//
async getAllDataSourceSet () {
async getAllDataSourceSet() {
const { code, data } = await queryAllDataSourceSet()
if (code != '200') return
this.sourceList = data
},
//
async handleClickTabs (tab, event) {
async handleClickTabs(tab, event) {
if (tab.paneName == 'third') {
const params = {
sourceCode: this.formData.sourceCode,
@ -728,7 +553,7 @@ export default {
}
},
//
Mandatory (val) {
Mandatory(val) {
if (!this.tableData[val].mandatory) {
this.tableData[val].requiredFlag = 0
} else {
@ -736,7 +561,7 @@ export default {
}
},
//
changePagination () {
changePagination() {
if (this.isShowPagination) {
this.tableData.push(
{
@ -773,7 +598,7 @@ export default {
}
},
// js
async filterScriptBtn (item) {
async filterScriptBtn(item) {
console.log(item)
this.isItemFilterType = item
this.dialogSwitchVisible = true
@ -783,7 +608,9 @@ export default {
//
return data;
}`
this.transformScript = item.transformScript ? item.transformScript : fnCont
this.transformScript = item.transformScript
? item.transformScript
: fnCont
} else if (item.transformType == 'dict') {
// this.dialogTitle = ''
// this.itemFilterScriptId = item.itemFilterSort
@ -807,7 +634,7 @@ export default {
}
},
// js
filterScriptConfirm () {
filterScriptConfirm() {
const arr = this.toObject(this.tableData2)
this.itemFilterList.forEach((el, index) => {
if (el.transformType == 'dict') {
@ -818,7 +645,7 @@ export default {
})
this.dialogSwitchVisible = false
},
addFilter () {
addFilter() {
let obj = {}
this.tableData2 = []
if (this.itemFilterList.length == 0) {
@ -837,7 +664,7 @@ export default {
this.itemFilterList.push(obj)
},
// filter
reduceFilter (item) {
reduceFilter(item) {
if (this.itemFilterList.length > 1) {
var index = this.itemFilterList.indexOf(item)
if (index > -1) {
@ -846,7 +673,7 @@ export default {
}
},
// -------------------///////////////////////////////////////////////////////////////////////
permissionClick (row, index) {
permissionClick(row, index) {
this.title = '自定义高级规则'
if (this.isRowData.sampleItem != '') {
this.isRowData = row
@ -854,28 +681,30 @@ export default {
//
return true;
}`
this.validationRules = row.validationRules ? row.validationRules : fnCont
this.validationRules = row.validationRules
? row.validationRules
: fnCont
this.dialogPermissionVisible = true
}
},
dialogValidationRules () {
dialogValidationRules() {
this.isRowData.validationRules = this.validationRules
this.dialogPermissionVisible = false
},
//
addAllDict () {
addAllDict() {
this.tableData2.push({
name: '',
children: [{ name: '', value: '' }],
})
},
addDict (index, item) {
addDict(index, item) {
item.push({ name: '', value: '' })
},
delAllDict (index, rows) {
delAllDict(index, rows) {
rows.splice(index, 1)
},
delDict (index, rows) {
delDict(index, rows) {
if (index == 0) {
this.$message.error('至少保留一条')
return
@ -884,20 +713,20 @@ export default {
},
// -------------------------------------------------------------------------------
//
changeSource () { },
changeSource() {},
//
testResultset () {
testResultset() {
this.isRowData.validationRules = this.validationRules
verificationSet(this.isRowData).then((data) => {
// console.log(data)
})
},
//
cutOutRow (index, rows) {
cutOutRow(index, rows) {
rows.splice(index, 1)
},
//
addRow (index, row) {
addRow(index, row) {
this.tableData.push({
paramName: '',
paramDesc: '',
@ -911,7 +740,7 @@ export default {
}`,
})
},
async submit (formName) {
async submit(formName) {
this.$refs[formName].validate(async (valid, obj) => {
if (valid) {
if (this.testMassageCode == 200) {
@ -937,7 +766,7 @@ export default {
}
})
},
toObject (val) {
toObject(val) {
const objfirst = {}
const objSecond = {}
val.forEach((el) => {
@ -1089,7 +918,7 @@ export default {
overflow-y: auto;
padding: 10px;
}
.query{
.query {
margin-top: 5px;
}
</style>

Loading…
Cancel
Save