rk
2025-09-22 cf2391a86bdea88196d49cd33949570f74c0985d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<template>
  <GlobalQuestionWindow
    :title="title"
    width="60%"
    top="5vh"
    :visible.sync="visible"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
    <div v-html="content"></div>
    <div slot="footer">
      <el-button @click="visible=false">返回</el-button>
    </div>
  </GlobalQuestionWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalQuestionWindow from '@/components/common/GlobalQuestionWindow'
import { companyUserRules } from '@/api/system/dictData'
export default {
  name: 'Question',
  extends: BaseOpera,
  components: { GlobalQuestionWindow },
  data () {
    return {
      content: '',
      // 表单数据
      form: {
        id: '',
      },
      type: 0, // 0 查看 1 答题
      companyId: '',
      baseForm: {},
      // 验证规则
      rules: {
      }
    }
  },
  created () {
    this.config({
      api: '/business/project',
      'field.id': 'id'
    })
  },
  methods: {
    open(title, target) {
      this.title = title
      this.visible = true
      if (target) {
        this.content = target
      } else {
        this.getProtocl()
      }
    },
    getProtocl() {
      companyUserRules()
        .then(res => {
          console.log(res);
          this.content = res.code
        })
        .catch(e => {
          this.$message.error(e)
        })
    },
 
  },
}
</script>
 
<style lang="scss" scoped>
.title {
  height: 20px;
  font-size: 20px;
  font-weight: 600;
  color: #222222;
  line-height: 20px;
  text-align: center;
}
.line {
  margin: 24px 0;
  background-color: #DFE2E8;
  height: 1px;
}
.problem {
  margin-bottom: 30px;
  .problem-title {
    font-size: 16px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #222222;
    line-height: 24px;
  }
}
.option {
  margin-top: 25px;
  display: flex;
  .el-radio {
    margin-right: 0px;
  }
  ::v-deep .el-radio__label {
    width: 0;
  }
  .value{
    height: 14px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    line-height: 14px;
    vertical-align: middle;
  }
  .mult-value{
    height: 14px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #333333;
    line-height: 19px;
    margin-left: 10px;
  }
}
</style>