大宝管理后台代码
dcc
2024-07-08 08ea93854a1e647518a751db4e1fbded7b381a6c
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,17 +353,32 @@
        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) {
      console.log(val);
      this.currentdetail = val
      this.Lockvisibledialog = true
      this.fields.forEach((v) => this.addUserform.getFieldDecorator(v))
      console.log(this.fields);
      this.addUserform.setFieldsValue(pick(val, this.fields))
    },
    getLockopen(val) {
@@ -362,8 +405,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() {
@@ -407,6 +456,26 @@
        }
      })
    },
    getkeyDialogok() {
      const form = this.$refs.addkeyUserform.form
      form.validateFields((errors, values) => {
        if (!errors) {
          values.id = this.details.id
          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.visibledialog = false
            })
        }
      })
    },
    getinit() {
      this.queryParam = {
        pageNum: 1,