|
@@ -3,13 +3,13 @@
|
|
|
<div class="content-main">
|
|
|
<div class="content-body-wrap">
|
|
|
<div class="content-body">
|
|
|
- <statistics-list :tabsInitData="tabsInitData" :tabsTitleColor="tabsTitleColor" :tabsIcon="tabsIcon"></statistics-list>
|
|
|
+ <statistics-list :tabsInitData="tabsInitData" :tabsTitleColor="tabsTitleColor" :unitArr="unitArr" :tabsIcon="tabsIcon" url="metroapi/datarule/summary" ref="statistics"></statistics-list>
|
|
|
<div class="search-list">
|
|
|
<div class="search-left">
|
|
|
<Form class="common-form common-form-list" ref="tableParams" :model="tableParams" inline>
|
|
|
- <FormItem label="" prop="roleId">
|
|
|
- <Select v-model="tableParams.roleId" placeholder="指标类型">
|
|
|
- <Option v-for="item in indexTypeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
+ <FormItem label="" prop="targetTypeId">
|
|
|
+ <Select v-model="tableParams.targetTypeId" placeholder="指标类型">
|
|
|
+ <Option v-for="item in targetTypeNameList" :value="item.id" :key="item.id">{{ item.value}}</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="" prop="businessTypeId">
|
|
@@ -20,11 +20,11 @@
|
|
|
<FormItem label="">
|
|
|
<DatePicker type="datetimerange" :value="dateRange" format="yyyy-MM-dd HH:mm:ss" placeholder="更新时间范围" class="common-date-picker date-picker-main" :clearable="false" :editable="false" @on-change="changePicker"></DatePicker>
|
|
|
</FormItem>
|
|
|
- <FormItem label="" prop="moduleName">
|
|
|
- <Input placeholder="输入规则名称关键词查询" clearable search v-model="tableParams.moduleName" />
|
|
|
+ <FormItem label="" prop="ruleName">
|
|
|
+ <Input placeholder="输入规则名称关键词查询" clearable search v-model="tableParams.ruleName" />
|
|
|
</FormItem>
|
|
|
- <FormItem label="" prop="operationName">
|
|
|
- <Input placeholder="输入字段关键词查询" clearable search v-model="tableParams.operationName" />
|
|
|
+ <FormItem label="" prop="field">
|
|
|
+ <Input placeholder="输入字段关键词查询" clearable search v-model="tableParams.field" />
|
|
|
</FormItem>
|
|
|
<FormItem label="" >
|
|
|
<Button type="primary" class="common-btn-search" @click="searchClick">
|
|
@@ -39,15 +39,15 @@
|
|
|
<div class="btn-container">
|
|
|
<Button icon="ios-add" class="common-add-btn" @click="addClick">新增规则</Button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
<div class="manage-main-center">
|
|
|
<Table :columns="columns" :data="tableData" class="common-table app-table" no-data-text="" :row-class-name="rowClassName" :loading="loading">
|
|
|
<template slot="loading">
|
|
|
<Loading-animation></Loading-animation>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row }" slot="operationUser">
|
|
|
+ <!-- <template slot-scope="{ row }" slot="operationUser">
|
|
|
{{row.operationUser}}
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<template slot-scope="{ row }" slot="action">
|
|
|
<Tooltip content="编辑" placement="top">
|
|
|
<i class="iconfont icon-bianji" style="cursor:pointer;color:#64ACFE;fontSize:20px;marginRight:6px" @click="editClick(row)"></i>
|
|
@@ -82,34 +82,33 @@
|
|
|
<div class="modal-content" v-show="currentStep==1">
|
|
|
<div class="modal-content-top-title">基础信息</div>
|
|
|
<Form class="common-form" ref="formOption" :model="formOption" :rules="ruleValidate" :label-width="120">
|
|
|
- <FormItem label="规则名称:" prop="appName">
|
|
|
- <Input v-model.trim="formOption.appName" maxlength="20" show-word-limit />
|
|
|
+ <FormItem label="规则名称:" prop="ruleName">
|
|
|
+ <Input v-model.trim="formOption.ruleName" maxlength="20" show-word-limit />
|
|
|
</FormItem>
|
|
|
- <FormItem label="指标类型:" prop="businessTypeId">
|
|
|
- <Select v-model="formOption.businessTypeId" placeholder="指标类型" label-in-value @on-change="selectModalBusiness">
|
|
|
- <Option v-for="item in indexTypeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
+ <FormItem label="指标类型:" prop="targetType">
|
|
|
+ <Select v-model="formOption.targetType" placeholder="指标类型" label-in-value @on-change="selectModalBusiness">
|
|
|
+ <Option v-for="item in targetTypeNameModalList" :value="item.id" :key="item.id">{{ item.value}}</Option>
|
|
|
</Select>
|
|
|
- <!-- <Select v-model="formOption.businessTypeId" placeholder="指标类型" label-in-value @on-change="selectModalBusiness">
|
|
|
- <Option v-for="item in indexTypeList" :value="item.id" :key="item.id">{{ item.businessTypeName }}</Option>
|
|
|
- </Select> -->
|
|
|
</FormItem>
|
|
|
- <FormItem label="规则描述:" prop="appName">
|
|
|
- <Input v-model.trim="formOption.appName" type="textarea" :rows="6" maxlength="100" show-word-limit />
|
|
|
+ <FormItem label="规则描述:" prop="ruleDesc">
|
|
|
+ <Input v-model.trim="formOption.ruleDesc" type="textarea" :rows="6" maxlength="100" show-word-limit />
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
</div>
|
|
|
<div class="modal-content" v-show="currentStep==2">
|
|
|
- <rule-step-two :businessData="businessData" v-if="showModal" ref="ruleStep2" @selectTableChange="selectTableChange"></rule-step-two>
|
|
|
+ <rule-step-two :businessModalData="businessModalData" :currentObj="formOption" :modalTitle="title" v-if="showModal" ref="ruleStep2" @selectTableChange="selectTableChange"></rule-step-two>
|
|
|
</div>
|
|
|
<div class="modal-content" v-show="currentStep==3">
|
|
|
- <rule-step-three :currentObj="formOption" v-if="showModal"></rule-step-three>
|
|
|
+ <rule-step-three :currentObj="formOption" v-if="showModal" ref="ruleStep3"></rule-step-three>
|
|
|
+ </div>
|
|
|
+ <div class="modal-content" v-show="currentStep==4">
|
|
|
+ <rule-step-four :currentObj="formOption" v-if="showModal" ref="ruleStep4"></rule-step-four>
|
|
|
</div>
|
|
|
- <div class="modal-content" v-show="currentStep==4"></div>
|
|
|
</div>
|
|
|
<div slot="footer" class="custom-footer">
|
|
|
<Button type="primary" @click="previousStep" :style="{visibility:currentStep>1 ? 'visible': 'hidden'}">上一步</Button>
|
|
|
<Button type="primary" @click="nextStep('formOption',1)" v-show="currentStep<4">下一步</Button>
|
|
|
- <Button type="primary" v-show="currentStep==4">保存</Button>
|
|
|
+ <Button type="primary" v-show="currentStep==4" @click="saveRule">保存</Button>
|
|
|
</div>
|
|
|
</Modal>
|
|
|
<Modal
|
|
@@ -135,10 +134,12 @@ import StatisticsList from '../../../components/StatisticsList.vue'
|
|
|
import TabsList from '../../../components/TabsList.vue'
|
|
|
import RuleStepTwo from './QualityRules/RuleStepTwo.vue'
|
|
|
import RuleStepThree from './QualityRules/RuleStepThree.vue'
|
|
|
+import RuleStepFour from './QualityRules/RuleStepFour.vue'
|
|
|
+const defaultFrom = {ruleName:'',targetType:'',targetName: '',ruleDesc:'',applicationId:'',applicationName: '',equipmentTypeCode:'',field:'',expr: '',dataType:'all',dataValue:'',logicalValueDTOList:[],exprDesc: ''}
|
|
|
export default {
|
|
|
name: "DataRules",
|
|
|
components: {
|
|
|
- StatisticsList,TabsList,RuleStepTwo,RuleStepThree
|
|
|
+ StatisticsList,TabsList,RuleStepTwo,RuleStepThree,RuleStepFour
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -149,94 +150,105 @@ export default {
|
|
|
{ imgSrc: require('@/assets/images/dataQuality4.png') },
|
|
|
],
|
|
|
tabsTitleColor:['#45F2FD', '#EBF310', '#54D593', '#FD7545'],
|
|
|
+ unitArr: ['条','条','条','条'],
|
|
|
tabsInitData: [
|
|
|
- { text: '准确性规则', value: 0, company: '条' },
|
|
|
- { text: '及时性规则', value: 0, company: '条' },
|
|
|
- { text: '一致性规则', value: 0, company: '条' },
|
|
|
- { text: '完整性规则', value: 0, company: '条' }
|
|
|
+ { name: '准确性规则', value: 0},
|
|
|
+ { name: '及时性规则', value: 0},
|
|
|
+ { name: '一致性规则', value: 0},
|
|
|
+ { name: '完整性规则', value: 0}
|
|
|
],
|
|
|
loading: true,
|
|
|
businessData: [],
|
|
|
businessModalData: [],
|
|
|
- indexTypeList: [{label:"及时性",value:'及时性'}, {label:"一致性",value:'一致性'}, {label:"准确性",value:'准确性'}, {label:"完整性",value:'完整性'}],
|
|
|
+ targetTypeNameList: [],
|
|
|
+ targetTypeNameModalList: [],
|
|
|
+ // targetTypeNameList: [{label:"及时性",value:'及时性'}, {label:"一致性",value:'一致性'}, {label:"准确性",value:'准确性'}, {label:"完整性",value:'完整性'}],
|
|
|
dateRange: [],
|
|
|
tableParams: {
|
|
|
- roleId: '',
|
|
|
- beginOperateTime: '',
|
|
|
+ targetTypeId: '',
|
|
|
+ businessTypeId: '',
|
|
|
+ beginUpdateTime: '',
|
|
|
endOperateTime: '',
|
|
|
- moduleName: '',
|
|
|
- operationName: '',
|
|
|
+ ruleName: '',
|
|
|
+ field: '',
|
|
|
pageNum: 1,
|
|
|
- pageSize: 50
|
|
|
+ pageSize: 10
|
|
|
},
|
|
|
tableData: [],
|
|
|
tableTotal: 0,
|
|
|
tablePage: 0,
|
|
|
columns: [
|
|
|
- {
|
|
|
+ {
|
|
|
title: '序号',
|
|
|
type: 'index',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
tooltip: true
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
title: '规则名称',
|
|
|
- // key: 'operationUser',
|
|
|
- slot: 'operationUser',
|
|
|
+ key: 'ruleName',
|
|
|
align: 'center',
|
|
|
- // ellipsis: true,
|
|
|
- // tooltip: true
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '',
|
|
|
+ // // key: 'operationUser',
|
|
|
+ // slot: 'operationUser',
|
|
|
+ // align: 'center',
|
|
|
+ // // ellipsis: true,
|
|
|
+ // // tooltip: true
|
|
|
+ // },
|
|
|
{
|
|
|
title: '规则描述',
|
|
|
- key: 'roleName',
|
|
|
+ key: 'ruleDesc',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
tooltip: true
|
|
|
},
|
|
|
{
|
|
|
title: '规则类型',
|
|
|
- key: 'operator',
|
|
|
+ key: 'targetName',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
tooltip: true
|
|
|
},
|
|
|
{
|
|
|
title: '应用',
|
|
|
- key: 'moduleName',
|
|
|
+ key: 'applicationName',
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '应用业务类型',
|
|
|
+ key: 'businessTypeName',
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '字段',
|
|
|
+ key: 'field',
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '计算方法',
|
|
|
+ key: 'expr',
|
|
|
+ align: 'center',
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '更新时间',
|
|
|
+ key: 'updateTime',
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
tooltip: true
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '应用业务类型',
|
|
|
- // key: 'moduleName',
|
|
|
- // align: 'center',
|
|
|
- // ellipsis: true,
|
|
|
- // tooltip: true
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '字段',
|
|
|
- // key: 'moduleName',
|
|
|
- // align: 'center',
|
|
|
- // ellipsis: true,
|
|
|
- // tooltip: true
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '计算方法',
|
|
|
- // key: 'moduleName',
|
|
|
- // align: 'center',
|
|
|
- // ellipsis: true,
|
|
|
- // tooltip: true
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '更新时间',
|
|
|
- // key: 'operationName',
|
|
|
- // align: 'center',
|
|
|
- // ellipsis: true,
|
|
|
- // tooltip: true
|
|
|
- // },
|
|
|
{
|
|
|
title: '操作',
|
|
|
align: 'center',
|
|
@@ -253,19 +265,25 @@ export default {
|
|
|
activeClass: '',
|
|
|
modalTitle: '',
|
|
|
currentStep: 1,
|
|
|
- formOption: {appName:'',businessTypeId: '',remark: '',businessTypeName:'',fieldName:''},
|
|
|
+ formOption: {ruleName:'',targetType:'',targetName: '',ruleDesc:'',applicationId:'',applicationName: '',equipmentTypeCode:'',field:'',expr: '',dataType:'all',dataValue: '',logicalValueDTOList:[],exprDesc: ''},
|
|
|
+ // formOption: {"name":"","ruleType":"","moduleName":"","targetTypeNameId":'',"targetTypeName":"","businessTypeId":'',"ruleDescription":"","field":"","unit":" ","formulaJsonMap":{}},
|
|
|
ruleValidate: {
|
|
|
- // appName: [{
|
|
|
- // required: true,
|
|
|
- // message: '请输入应用名称',
|
|
|
- // trigger: 'blur'
|
|
|
- // }],
|
|
|
- businessTypeId: [{
|
|
|
+ ruleName: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入规则名称',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ targetType: [{
|
|
|
required: true,
|
|
|
- // type: 'number',
|
|
|
- message: '请选择业务类型',
|
|
|
+ type: 'number',
|
|
|
+ message: '请选择指标类型',
|
|
|
trigger: 'change'
|
|
|
- }]
|
|
|
+ }],
|
|
|
+ ruleDesc: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入规则描述',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
},
|
|
|
// columnsModal: [
|
|
|
// {
|
|
@@ -292,6 +310,7 @@ export default {
|
|
|
// ],
|
|
|
// modalAppData: [],
|
|
|
index: 0,
|
|
|
+ appModalId: null,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -301,7 +320,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
changePicker (date) {
|
|
|
- this.tableParams.beginOperateTime = date[0]
|
|
|
+ this.tableParams.beginUpdateTime = date[0]
|
|
|
this.tableParams.endOperateTime = date[1]
|
|
|
},
|
|
|
rowClassName(row, index) {
|
|
@@ -322,12 +341,22 @@ export default {
|
|
|
this.getTableData()
|
|
|
},
|
|
|
getType () {
|
|
|
+ // 指标类型数据
|
|
|
+ this.$get('metroapi/dic/queryDictionary', {name:'指标类型'}).then(res=>{
|
|
|
+ if (res.httpCode == 1 ){
|
|
|
+ this.targetTypeNameModalList = JSON.parse(JSON.stringify(res.data))
|
|
|
+ this.targetTypeNameList = res.data
|
|
|
+ this.targetTypeNameList.unshift({ id: '-1', value: '指标类型' })
|
|
|
+ } else {
|
|
|
+ this.targetTypeNameList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
// 业务类型数据
|
|
|
this.$get('metroapi/businessType/box').then(res=>{
|
|
|
if (res.httpCode == 1 ){
|
|
|
- this.businessModalData = JSON.parse(JSON.stringify(res.data))
|
|
|
this.businessData = res.data
|
|
|
this.businessData.unshift({ id: '-1', businessTypeName: '业务类型' })
|
|
|
+ this.businessModalData = this.businessData
|
|
|
} else {
|
|
|
this.businessData = []
|
|
|
this.businessModalData = []
|
|
@@ -337,9 +366,10 @@ export default {
|
|
|
// 获取表格数据
|
|
|
getTableData () {
|
|
|
let params = JSON.parse(JSON.stringify(this.tableParams))
|
|
|
- params.roleId= params.roleId == '-1'?'':params.roleId
|
|
|
+ params.targetTypeId= params.targetTypeId == '-1'?'':params.targetTypeId
|
|
|
+ params.businessTypeId= params.businessTypeId == '-1'?'':params.businessTypeId
|
|
|
this.loading = true
|
|
|
- this.$get('metroapi/log/querySysLogPage', params).then(res=>{
|
|
|
+ this.$get('metroapi/datarule/queryDataRulePage', params).then(res=>{
|
|
|
this.loading = false
|
|
|
if (res.httpCode == 1 ){
|
|
|
this.tableData = res.data.data
|
|
@@ -366,7 +396,7 @@ export default {
|
|
|
},
|
|
|
resetClick (name) {
|
|
|
this.dateRange = []
|
|
|
- this.tableParams.beginOperateTime = ''
|
|
|
+ this.tableParams.beginUpdateTime = ''
|
|
|
this.tableParams.endOperateTime = ''
|
|
|
this.$refs[name].resetFields()
|
|
|
this.tableParams.pageNum = 1
|
|
@@ -377,31 +407,28 @@ export default {
|
|
|
// this.$get('metroapi/role/box').then(res=>{
|
|
|
// if (res.httpCode == 1 ){
|
|
|
// this.roleModalData = JSON.parse(JSON.stringify(res.data))
|
|
|
- // this.indexTypeList = res.data
|
|
|
- // this.indexTypeList.unshift({ value: '-1', label: '指标类型' })
|
|
|
+ // this.targetTypeNameList = res.data
|
|
|
+ // this.targetTypeNameList.unshift({ value: '-1', label: '指标类型' })
|
|
|
// } else {
|
|
|
- // this.indexTypeList = []
|
|
|
+ // this.targetTypeNameList = []
|
|
|
// }
|
|
|
// })
|
|
|
},
|
|
|
addClick () {
|
|
|
+ this.formOption = JSON.parse(JSON.stringify(defaultFrom))
|
|
|
+ // this.appModalId = 172
|
|
|
this.currentStep = 1
|
|
|
this.title = '新增规则'
|
|
|
this.showModal = true
|
|
|
},
|
|
|
editClick (row) {
|
|
|
- console.log(this.modalAppData)
|
|
|
this.currentStep = 1
|
|
|
this.rowObj = row
|
|
|
- this.formOption = JSON.parse(JSON.stringify(row));
|
|
|
- // this.modalAppData[this.index]._highlight = true
|
|
|
- // this.formOption.lineId = this.formOption.lineId ? String(this.formOption.lineId) : '-1'
|
|
|
- // this.formOption.stationId = this.formOption.stationId ? String(this.formOption.stationId) : '-1'
|
|
|
- // this.formOption.level = String(this.formOption.level)
|
|
|
- // this.getStationData(this.formOption.lineId)
|
|
|
- // this.levelModalData = this.getCurrentLevel()
|
|
|
+ // this.formOption = JSON.parse(JSON.stringify(row));
|
|
|
this.title = '编辑规则'
|
|
|
this.showModal = true
|
|
|
+ this.formOption = JSON.parse(JSON.stringify(row));
|
|
|
+ this.formOption.equipmentTypeCode = !this.formOption.equipmentTypeCode ? 0 : this.formOption.equipmentTypeCode
|
|
|
},
|
|
|
delClick (row) {
|
|
|
this.rowObj = row
|
|
@@ -416,7 +443,7 @@ export default {
|
|
|
this.$refs.formOption.resetFields();
|
|
|
}
|
|
|
},
|
|
|
- nextStep (formName,num) {
|
|
|
+ nextStep (formName,num) {
|
|
|
if (this.currentStep ==1) {
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -430,13 +457,35 @@ export default {
|
|
|
this.currentStep = this.currentStep + num
|
|
|
}
|
|
|
} else if (this.currentStep == 3) {
|
|
|
-
|
|
|
- }
|
|
|
- console.log(this.currentStep)
|
|
|
+ if (this.$refs.ruleStep3.saveValid()) {
|
|
|
+ if (this.formOption.targetName == '及时性(数据采集)') {
|
|
|
+ this.formOption.dataValue = this.$refs.ruleStep3.formCustom.timelinArry1[0].dataValue
|
|
|
+ } else if (this.formOption.targetName == '及时性(数据入库)') {
|
|
|
+ this.formOption.dataValue = this.$refs.ruleStep3.formCustom.timelinArry2[0].dataValue
|
|
|
+ } else if (this.formOption.targetName == '准确性') {
|
|
|
+ this.formOption.logicalValueDTOList = this.$refs.ruleStep3.formCustomAcc.accuracyArr
|
|
|
+ this.formOption.exprDesc = this.$refs.ruleStep3.formCustomAcc.exprDesc
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleStep3.ruleObj.dataType) {
|
|
|
+ this.formOption.dataType = this.$refs.ruleStep3.ruleObj.dataType
|
|
|
+ } else {
|
|
|
+ if (this.formOption.targetName == '一致性') {
|
|
|
+ delete this.formOption.dataType
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.currentStep = this.currentStep + num
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
previousStep () {
|
|
|
this.currentStep--
|
|
|
},
|
|
|
+ saveRule () {
|
|
|
+ let params = JSON.parse(JSON.stringify(this.formOption))
|
|
|
+ params.equipmentTypeCode = params.equipmentTypeCode== '展示全部字段' ? '': params.equipmentTypeCode
|
|
|
+ console.log('params',params)
|
|
|
+ this.saveData(params)
|
|
|
+ },
|
|
|
commonOk () {
|
|
|
let params = {
|
|
|
id: this.rowObj.id
|
|
@@ -446,10 +495,29 @@ export default {
|
|
|
commonCancel () {
|
|
|
this.modalStatus = false
|
|
|
},
|
|
|
+ saveData (params) {
|
|
|
+ let url = ''
|
|
|
+ if (this.title == '新增规则') {
|
|
|
+ url = 'metroapi/datarule/addDataRule'
|
|
|
+ } else {
|
|
|
+ url = 'metroapi/datarule/editDataRule'
|
|
|
+ }
|
|
|
+ this.$post(url, params).then(res=>{
|
|
|
+ if (res.httpCode == 1 ){
|
|
|
+ this.$refs.statistics.getStatisList()
|
|
|
+ this.showModal = false
|
|
|
+ this.$Message.info(res.msg)
|
|
|
+ this.getTableData()
|
|
|
+ } else {
|
|
|
+ this.$Message.info(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 删除接口
|
|
|
delData (params) {
|
|
|
- this.$get('metroapi/equipment/delEquipmentType',params).then(res=>{
|
|
|
+ this.$get('metroapi/datarule/delDataRule',params).then(res=>{
|
|
|
if (res.httpCode == 1 ){
|
|
|
+ this.$refs.statistics.getStatisList()
|
|
|
this.modalStatus = false
|
|
|
this.$Message.info(res.msg)
|
|
|
this.getTableData()
|
|
@@ -458,16 +526,22 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- selectTableChange (id) {
|
|
|
- this.formOption.fieldName = id
|
|
|
- console.log('selectTableChange',this.formOption)
|
|
|
+ selectTableChange (obj) {
|
|
|
+ if (obj.text == 'applicationId') {
|
|
|
+ this.formOption.applicationId = obj.id
|
|
|
+ this.formOption.applicationName = obj.applicationName
|
|
|
+ this.formOption.equipmentTypeCode = ''
|
|
|
+ } else if (obj.text == 'equipmentTypeCode') {
|
|
|
+ this.formOption.equipmentTypeCode = obj.id
|
|
|
+ } else {
|
|
|
+ this.formOption.field = obj.id
|
|
|
+ }
|
|
|
+ console.log('formOption', this.formOption)
|
|
|
},
|
|
|
selectModalBusiness (option) {
|
|
|
if (option) {
|
|
|
- this.formOption.businessTypeName = option.label
|
|
|
- console.log('selectModalBusiness',this.formOption)
|
|
|
+ this.formOption.targetName = option.label
|
|
|
}
|
|
|
- console.log(option)
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -579,4 +653,17 @@ export default {
|
|
|
.modal-content {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
+/* 对话框里的input里的placeholder样式修改 */
|
|
|
+/deep/ .ivu-input::-webkit-input-placeholder , /deep/ .ivu-input-number-input::-webkit-input-placeholder{
|
|
|
+ color: #718EBD;
|
|
|
+}
|
|
|
+/deep/ .ivu-input::-moz-placeholder, /deep/ .ivu-input-number-input::-webkit-input-placeholder{ /* Mozilla Firefox 19+ */
|
|
|
+ color: #718EBD;
|
|
|
+}
|
|
|
+/deep/ .ivu-input::-moz-placeholde, /deep/ .ivu-input-number-input::-webkit-input-placeholderr{ /* Mozilla Firefox 4 to 18 */
|
|
|
+ color: #718EBD;
|
|
|
+}
|
|
|
+/deep/ .ivu-input::-ms-input-placeholder, /deep/ .ivu-input-number-input::-webkit-input-placeholder{ /* Internet Explorer 10-11 */
|
|
|
+ color: #718EBD;
|
|
|
+}
|
|
|
</style>
|