1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!--
- * @Author: zzy6937@qq.com
- * @Date: 2019-07-11 14:25:43
- * @LastEditors: zwy
- * @LastEditTime: 2021-03-09 14:59:56
- * @Description: 节点之间连线的配置页
- -->
- <template>
- <div class="bppmn">
- <ul class="bpmn-user_select">
- <div class="bpmn-title">节点动作</div>
- <div class="bpmn-content">
- <li>
- <label>等于</label>
- <el-select v-model="result" placeholder="请选择节点动作" clearable @change="resultChange">
- <el-option
- v-for="opt in resultList"
- :key="opt.actionValue"
- :value="opt.actionValue"
- :label="opt.actionName"
- ></el-option>
- </el-select>
- </li>
- </div>
- </ul>
- </div>
- </template>
- <script>
- export default {
- props: ['formKey', 'channelId', 'values'],
- data() {
- return {
- resultList: [],
- result: ''
- };
- },
- methods: {
- // 根据表单获取处理结果
- getFormResult() {
- this.$http.get('/workflow/form/' + this.formKey, { channelId: this.channelId }).then(({ data }) => {
- let actList = data ? data.userActionList || [] : [],
- j = actList.length,
- arr = [];
- while (j--) {
- if ('指派' != actList[j].actionName) {
- arr = arr.concat({
- actionName: actList[j].actionName,
- actionValue: actList[j].actionValue
- });
- }
- }
- this.resultList = arr;
- // 设置初始值
- if (this.values) {
- this.result = this.values.substr(11).replace('"}', '');
- }
- });
- },
- resultChange(val) {
- this.$emit('change', val);
- }
- },
- created() {
- this.getFormResult();
- }
- };
- </script>
- <style lang="scss" scoped>
- .bppmn {
- border: 1px solid #d8d8d8;
- .bpmn-title {
- line-height: 30px;
- border-bottom: 1px solid #d8d8d8;
- padding: 0 20px;
- }
- .bpmn-content {
- padding: 20px;
- li {
- margin: 10px 0;
- label {
- margin-right: 10px;
- }
- .el-select {
- width: 80%;
- }
- }
- }
- }
- </style>
|