tangzy
2022-01-18 ee4403d82eae5567e81c8a24cae4783aca515084
敏感词限制
2 files modified
81 ■■■■■ changed files
src/api/mgcx/mgcx.js 17 ●●●●● patch | view | raw | blame | history
src/views/mgcx/mgcx.vue 64 ●●●●● patch | view | raw | blame | history
src/api/mgcx/mgcx.js
@@ -48,3 +48,20 @@
  })
}
export const updates = (val) => {
  return request({
    url: '/api/blade-mgcx/mgcx/updateval',
    method: 'post',
    params: {
      val,
    }
  })
}
export const sel = () => {
  return request({
    url: '/api/blade-mgcx/mgcx/sel',
    method: 'post',
  })
}
src/views/mgcx/mgcx.vue
@@ -28,19 +28,41 @@
                   v-if="permission.mgcx_delete"
                   @click="handleDelete">删 除
        </el-button>
        <el-button type="primary"
                   size="small"
                   @click="handleDeletes">敏感词限制
        </el-button>
        <el-dialog
          title=""
          :visible.sync="dialogVisiblecc"
          width="30%"
          :modal-append-to-body="false"
        >
          <div class="flots">
            <span class="f_title">敏感词次数调整:</span>
            <avue-input v-model="forms" placeholder="请输入内容"></avue-input>
            <div class="but">
              <el-button type="primary" @click="subcc">确定</el-button>
              <el-button type="primary" @click="closecc">取消</el-button>
            </div>
          </div>
        </el-dialog>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/mgcx/mgcx";
import {getList, getDetail, add, update, remove, updates,sel} from "@/api/mgcx/mgcx";
import {mapGetters} from "vuex";
export default {
  data() {
    return {
      dialogVisiblecc: false,
      form: {},
      forms: '1',
      query: {},
      loading: true,
      page: {
@@ -199,6 +221,20 @@
          this.$refs.crud.toggleSelection();
        });
    },
    handleDeletes() {
      this.dialogVisiblecc = true;
      sel().then(res =>{
            this.forms=res.data.data
      })
    },
    closecc() {
      this.dialogVisiblecc = false;
      this.forms = 1
    },
    subcc() {
      this.dialogVisiblecc = false;
      updates(this.forms);
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then(res => {
@@ -247,5 +283,29 @@
};
</script>
<style>
<style lang="scss" scope>
.flots {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}
.f_title {
  position: absolute;
  top: 10px;
  font-size: 16px;
}
.but {
  margin-top: 15px;
  width: 100%;
  display: flex;
  align-content: center;
  justify-content: center;
  .el-button {
    padding: 12px 20px !important;
  }
}
</style>