| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <div>
- <!-- 规则组名称 -->
- <a-form-item :label="$t('network_waf_statement.label.rule_group_name')" v-bind="formLayout">
- <a-input v-if="isEdit" :value="value" />
- <box-show v-else :value="value" />
- </a-form-item>
- <!-- 规则组子项 -->
- </div>
- </template>
- <script>
- import WafMixin from '../../mixins/waf'
- import BoxShow from './BoxShow.vue'
- // import { uuid } from '@/utils/utils'
- import WindowsMixin from '@/mixins/windows'
- export default {
- name: 'RuleGroupStatement',
- components: { BoxShow },
- mixins: [WindowsMixin, WafMixin],
- props: {
- type: String,
- value: String,
- isEdit: Boolean,
- ruleGroupId: String,
- },
- data () {
- return {
- formLayout: {
- wrapperCol: {
- span: 20,
- },
- labelCol: {
- span: 4,
- },
- },
- }
- },
- computed: {
- },
- watch: {
- },
- created () {
- // this.initData()
- },
- methods: {
- initData () {
- if (this.ruleGroupId) {
- this.getRuleGroup()
- }
- },
- async getRuleGroup () {
- try {
- // 获取规则组中的子项
- // const ruleGroup = await new this.$Manager('waf_rules', 'v2').list({ params: { $t: uuid(), waf_rule_group_id: this.ruleGroupId } })
- // console.log('规则组', ruleGroup)
- } catch (err) { throw err }
- },
- },
- }
- </script>
|