|
@@ -7,15 +7,13 @@
|
|
<el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
|
|
<el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
<el-divider class="divi"></el-divider>
|
|
<el-divider class="divi"></el-divider>
|
|
-
|
|
|
|
|
|
+ <div v-loading="loading">
|
|
<el-steps :active="active" align-center finish-status="success" style="margin: 50px 20px 0px 10px;">
|
|
<el-steps :active="active" align-center finish-status="success" style="margin: 50px 20px 0px 10px;">
|
|
<el-step title="选择目标" description="选择需要度量的目标数据集字段"></el-step>
|
|
<el-step title="选择目标" description="选择需要度量的目标数据集字段"></el-step>
|
|
<el-step title="定义/选择模型" description="定义将应用于所选字段的语法检查逻辑"></el-step>
|
|
<el-step title="定义/选择模型" description="定义将应用于所选字段的语法检查逻辑"></el-step>
|
|
<el-step title="分区配置" description="设置目标数据集的分区配置"></el-step>
|
|
<el-step title="分区配置" description="设置目标数据集的分区配置"></el-step>
|
|
<el-step title="完成" description="设置模型的基本配置"></el-step>
|
|
<el-step title="完成" description="设置模型的基本配置"></el-step>
|
|
</el-steps>
|
|
</el-steps>
|
|
-
|
|
|
|
-
|
|
|
|
<div style=" margin: 10px 120px 0px 166px;height: 420px;">
|
|
<div style=" margin: 10px 120px 0px 166px;height: 420px;">
|
|
<el-row :gutter="50">
|
|
<el-row :gutter="50">
|
|
<div v-if="active == 0">
|
|
<div v-if="active == 0">
|
|
@@ -144,7 +142,7 @@
|
|
<el-input v-model="datacForm.name"></el-input>
|
|
<el-input v-model="datacForm.name"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="度量描述 :">
|
|
<el-form-item label="度量描述 :">
|
|
- <el-input v-model="datacForm.description"></el-input>
|
|
|
|
|
|
+ <el-input v-model="datacForm.description" onkeyup="this.value=this.value.replace(/[\u4E00-\u9FA5]/g,'')"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
<h5>数据源配置 : </h5>
|
|
<h5>数据源配置 : </h5>
|
|
@@ -231,7 +229,7 @@
|
|
<el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
|
|
<el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
-
|
|
|
|
|
|
+ </div>
|
|
<show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
|
|
<show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -253,6 +251,7 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
value: [],
|
|
value: [],
|
|
|
|
+ loading: false,
|
|
showTree: true,
|
|
showTree: true,
|
|
visible: false,
|
|
visible: false,
|
|
chooseEqpment: '',
|
|
chooseEqpment: '',
|
|
@@ -262,6 +261,7 @@ export default {
|
|
userID: this.$store.state.user.id, // 用户编号
|
|
userID: this.$store.state.user.id, // 用户编号
|
|
// userName: this.$store.state.user.name, // 用户编号
|
|
// userName: this.$store.state.user.name, // 用户编号
|
|
userName: 'test', // 用户编号
|
|
userName: 'test', // 用户编号
|
|
|
|
+ submit: false,
|
|
isShowRules: {
|
|
isShowRules: {
|
|
showRules: false
|
|
showRules: false
|
|
},
|
|
},
|
|
@@ -555,6 +555,7 @@ export default {
|
|
},
|
|
},
|
|
// 向后台提交数据
|
|
// 向后台提交数据
|
|
async finallySubmit () {
|
|
async finallySubmit () {
|
|
|
|
+ this.loading = true
|
|
this.newMeasure = {
|
|
this.newMeasure = {
|
|
'name': this.goal_info.config.name,
|
|
'name': this.goal_info.config.name,
|
|
'measure.type': 'griffin',
|
|
'measure.type': 'griffin',
|
|
@@ -590,8 +591,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.getGrouprule()
|
|
this.getGrouprule()
|
|
- console.log(666)
|
|
|
|
- console.log(this.newMeasure)
|
|
|
|
|
|
+ // console.log(666)
|
|
|
|
+ // console.log(this.newMeasure)
|
|
await this.$http({
|
|
await this.$http({
|
|
url: this.$http.adornUrl('/v1/measures'),
|
|
url: this.$http.adornUrl('/v1/measures'),
|
|
method: 'post',
|
|
method: 'post',
|
|
@@ -599,16 +600,17 @@ export default {
|
|
}).then((datas) => {
|
|
}).then((datas) => {
|
|
console.log(datas)
|
|
console.log(datas)
|
|
if (datas.status === 201) {
|
|
if (datas.status === 201) {
|
|
- return true
|
|
|
|
|
|
+ this.submit = true
|
|
} else {
|
|
} else {
|
|
- return false
|
|
|
|
|
|
+ this.submit = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
submitForm () {
|
|
submitForm () {
|
|
- var submit = this.finallySubmit()
|
|
|
|
|
|
+ this.finallySubmit()
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- if (submit) {
|
|
|
|
|
|
+ this.loading = true
|
|
|
|
+ if (this.submit) {
|
|
Message({
|
|
Message({
|
|
message: '度量标准 ' + this.datacForm.name + ' 创建成功',
|
|
message: '度量标准 ' + this.datacForm.name + ' 创建成功',
|
|
type: 'success'
|
|
type: 'success'
|
|
@@ -619,8 +621,10 @@ export default {
|
|
type: 'error'
|
|
type: 'error'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.loading = false
|
|
this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
|
|
this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
|
|
this.$destroy()
|
|
this.$destroy()
|
|
|
|
+
|
|
}, 2 * 1000)
|
|
}, 2 * 1000)
|
|
},
|
|
},
|
|
getGrouprule () {
|
|
getGrouprule () {
|