|
@@ -7,15 +7,13 @@
|
|
|
<el-breadcrumb-item>创建度量标准</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
<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-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>
|
|
|
-
|
|
|
-
|
|
|
<div style=" margin: 10px 120px 0px 166px;height: 420px;">
|
|
|
<el-row :gutter="50">
|
|
|
<div v-if="active == 0">
|
|
@@ -144,7 +142,7 @@
|
|
|
<el-input v-model="datacForm.name"></el-input>
|
|
|
</el-form-item>
|
|
|
<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>
|
|
|
|
|
|
<h5>数据源配置 : </h5>
|
|
@@ -231,7 +229,7 @@
|
|
|
<el-button v-if="buttonFinish" type="primary" @click="submitForm()" >完成</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+ </div>
|
|
|
<show-rules v-if="isShowRulesDrog" ref="ShowRulesDrogref"></show-rules>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -253,6 +251,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
value: [],
|
|
|
+ loading: false,
|
|
|
showTree: true,
|
|
|
visible: false,
|
|
|
chooseEqpment: '',
|
|
@@ -262,6 +261,7 @@ export default {
|
|
|
userID: this.$store.state.user.id, // 用户编号
|
|
|
// userName: this.$store.state.user.name, // 用户编号
|
|
|
userName: 'test', // 用户编号
|
|
|
+ submit: false,
|
|
|
isShowRules: {
|
|
|
showRules: false
|
|
|
},
|
|
@@ -555,6 +555,7 @@ export default {
|
|
|
},
|
|
|
// 向后台提交数据
|
|
|
async finallySubmit () {
|
|
|
+ this.loading = true
|
|
|
this.newMeasure = {
|
|
|
'name': this.goal_info.config.name,
|
|
|
'measure.type': 'griffin',
|
|
@@ -590,8 +591,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.getGrouprule()
|
|
|
- console.log(666)
|
|
|
- console.log(this.newMeasure)
|
|
|
+ // console.log(666)
|
|
|
+ // console.log(this.newMeasure)
|
|
|
await this.$http({
|
|
|
url: this.$http.adornUrl('/v1/measures'),
|
|
|
method: 'post',
|
|
@@ -599,16 +600,17 @@ export default {
|
|
|
}).then((datas) => {
|
|
|
console.log(datas)
|
|
|
if (datas.status === 201) {
|
|
|
- return true
|
|
|
+ this.submit = true
|
|
|
} else {
|
|
|
- return false
|
|
|
+ this.submit = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
submitForm () {
|
|
|
- var submit = this.finallySubmit()
|
|
|
+ this.finallySubmit()
|
|
|
setTimeout(() => {
|
|
|
- if (submit) {
|
|
|
+ this.loading = true
|
|
|
+ if (this.submit) {
|
|
|
Message({
|
|
|
message: '度量标准 ' + this.datacForm.name + ' 创建成功',
|
|
|
type: 'success'
|
|
@@ -619,8 +621,10 @@ export default {
|
|
|
type: 'error'
|
|
|
})
|
|
|
}
|
|
|
+ this.loading = false
|
|
|
this.$router.replace({path: '/snoop-home', query: {'status': '0'}})
|
|
|
this.$destroy()
|
|
|
+
|
|
|
}, 2 * 1000)
|
|
|
},
|
|
|
getGrouprule () {
|