From bfd4f0e5ac1c8da2b997c2fee7738e9f4bb976da Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Wed, 10 Jul 2024 17:47:15 +0800
Subject: [PATCH] 涨停板审核
---
src/views/vip/components/VIPScramble-hold.vue | 76 ++++++++++++++++++++++++++++++++++++--
1 files changed, 72 insertions(+), 4 deletions(-)
diff --git a/src/views/vip/components/VIPScramble-hold.vue b/src/views/vip/components/VIPScramble-hold.vue
index 33dc8eb..802a051 100644
--- a/src/views/vip/components/VIPScramble-hold.vue
+++ b/src/views/vip/components/VIPScramble-hold.vue
@@ -34,6 +34,9 @@
<a-button type="primary" icon="plus-circle" style="margin-left: 8px" @click="Lockvisibledialog = true"
>添加
</a-button>
+ <a-button type="primary" icon="key" style="margin-left: 8px" @click="updateKey"
+ >密钥配置
+ </a-button>
</span>
</a-form-item>
</a-col>
@@ -207,10 +210,32 @@
</a-row>
</a-form>
</a-modal>
+ <a-modal
+ title="密钥配置"
+ :width="830"
+ :visible="visibledialog"
+ :confirmLoading="keyvisibleloading"
+ @ok="getkeyDialogok"
+ @cancel="handlekeyCancel"
+ >
+ <a-form :form="addkeyUserform" ref="addkeyUserform">
+ <a-row :gutter="48">
+ <a-col :md="12" :lg="12" :sm="12">
+ <a-form-item label="密钥配置" :labelCol="labelCol" :wrapperCol="wrapperCol">
+ <a-input
+ placeholder="请输入密钥配置"
+ v-decorator="['vipPassword', { rules: [{ required: true, message: '请输入密钥配置' }] }]"
+ />
+ </a-form-item>
+ </a-col>
+ </a-row>
+ </a-form>
+ </a-modal>
</div>
</template>
<script>
import { positionlock, positionsell, examine, sitevipList, sitevipAdd, sitevipUpdate,sitevipUpdateStatus,sitevipDel } from '@/api/position'
+import { setupdate,admingetSetting } from '@/api/risksetting'
import { nextagent } from '@/api/home'
import pick from 'lodash.pick'
import moment from 'moment'
@@ -302,12 +327,15 @@
'lowestTrade',
'createTime',
'updateTime',
+ 'vipPassword'
],
datalist: [],
agentlist: [],
agentloading: false,
Lockvisibledialog: false,
+ visibledialog: false,
Lockvisibleloading: false,
+ keyvisibleloading: false,
Lockvisibleform: this.$form.createForm(this),
clickpositionId: '',
agentqueryParam: {
@@ -325,13 +353,26 @@
md: { span: 14 },
},
addUserform: this.$form.createForm(this),
+ addkeyUserform: this.$form.createForm(this),
currentdetail: '',
+ details: {}
}
},
created() {
this.getlist()
+ this.getdetail()
},
methods: {
+ updateKey(){
+ this.visibledialog = true
+ this.fields.forEach((v) => this.addkeyUserform.getFieldDecorator(v))
+ this.addkeyUserform.setFieldsValue(pick(this.details, this.fields))
+ },
+ getdetail () {
+ admingetSetting().then((res) => {
+ this.details = res.data
+ })
+ },
geteditStock(val) {
this.currentdetail = val
this.Lockvisibledialog = true
@@ -362,8 +403,14 @@
})
},
handleCancel() {
+ console.log('handleCancel',this.Lockvisibledialog);
this.Lockvisibledialog = false
const form = this.$refs.addUserform.form
+ form.resetFields()
+ },
+ handlekeyCancel() {
+ this.visibledialog = false
+ const form = this.$refs.addkeyUserform.form
form.resetFields()
},
getDialogok() {
@@ -373,7 +420,7 @@
console.log(values);
if (!errors) {
if (this.currentdetail != '') {
- this.Lockvisibledialog = true
+ this.Lockvisibleloading = true
values.id = this.currentdetail.id
// values.subscriptionTime = this.subscriptionTime
@@ -388,10 +435,10 @@
} else {
this.$message.error(res.msg)
}
- this.Lockvisibledialog = false
+ this.Lockvisibleloading = false
})
} else {
- this.addUserDialogloading = true
+ this.Lockvisibleloading = true
sitevipAdd(values).then((res) => {
if (res.status == 0) {
this.Lockvisibledialog = false
@@ -401,12 +448,33 @@
} else {
this.$message.error(res.msg)
}
- this.addUserDialogloading = false
+ this.Lockvisibleloading = false
})
}
}
})
},
+ getkeyDialogok() {
+ const form = this.$refs.addkeyUserform.form
+
+ form.validateFields((errors, values) => {
+ if (!errors) {
+ values.id = this.details.id
+ this.keyvisibleloading = true
+ setupdate(values).then((res) => {
+ if (res.status == 0) {
+ this.visibledialog = false
+ this.$message.success('修改成功')
+ form.resetFields()
+ this.getdetail()
+ } else {
+ this.$message.error(res.msg)
+ }
+ this.keyvisibleloading = false
+ })
+ }
+ })
+ },
getinit() {
this.queryParam = {
pageNum: 1,
--
Gitblit v1.9.3