12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!--
- * @Author: zwy
- * @Date: 2021-02-21 14:18:08
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2021-03-03 11:26:14
- * @Descripttion: 服务任务
- -->
- <template>
- <div>
- <div class="bpmn-service">
- <div class="bpmn-user">服务任务</div>
- <div class="sys-pop-bpmn-service_row">
- <el-select v-model="channel" placeholder="请选择服务任务类型" class="sys-pop-bpmn-service_select" @change="change">
- <el-option v-for="item in options5" :key="item.value" :label="item.label" :value="item.value"> </el-option>
- </el-select>
- </div>
- </div>
- <user :channelId="channelId" :values="userValues" @change="userChange" :prevTask="prevTask" ref="user"></user>
- </div>
- </template>
- <script>
- import user from './user.vue';
- export default {
- props: ['values', 'channelId', 'prevTask'],
- components: { user },
- data() {
- return {
- channel: '',
- options5: [
- {
- label: 'pc消息推送',
- value: '0'
- },
- {
- label: 'app消息推送',
- value: '1'
- }
- ],
- userValues: '',
- userSelect: { orgIds: [], userFormFlag: 0, userIds: [], channel: '' }
- };
- },
- methods: {
- userChange(obj) {
- this.userSelect = obj;
- this.change();
- },
- init() {
- if (this.values) {
- let data = this.values;
- this.channel = data.channel;
- this.userValues = JSON.stringify({
- orgIds: data.orgIds,
- userFormFlag: data.userFormFlag,
- userIds: data.userIds
- });
- }
- },
- change() {
- let arr = this.userSelect;
- arr['channel'] = this.channel;
- this.$emit('change', arr);
- }
- },
- created() {
- this.init();
- },
- mounted() {
- let $el = this.$refs.user.$el,
- $user = $el.querySelector('.bpmn-user');
- $el.removeChild($user);
- },
- watch: {
- values(n) {
- this.init();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .bpmn-service {
- padding: 0 20px 20px 20px;
- border: 1px solid #d8d8d8;
- .bpmn-user {
- line-height: 30px;
- }
- }
- </style>
|