| | |
| | | @close="handleClose" @open="opens"> |
| | | <avue-form ref="DisCussFrom" :option="option" v-model="froms" @submit="handleSubmit"></avue-form> |
| | | </el-dialog> |
| | | |
| | | <userList ref="userList" @selectPersonList="selectPersonList"></userList> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | getDictionary |
| | | } from '@/api/system/dict' |
| | | import userList from "./userList.vue"; |
| | | |
| | | |
| | | // import { |
| | | // getList as getHouseholdList, |
| | |
| | | |
| | | let formData = {} |
| | | export default { |
| | | components: { |
| | | userList |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisibles: false, |
| | |
| | | { |
| | | display: false, |
| | | label: "选择用户", |
| | | prop: "userIds", |
| | | prop: "userName", |
| | | tags: true, |
| | | type: "tree", |
| | | type: "input", |
| | | multiple: true, |
| | | span: 12, |
| | | offset: 8, |
| | |
| | | hide: true, |
| | | row: true, |
| | | // dicUrl: `/api/blade-system/user/getUserlnfoByDistrictlds?districtlds={{}}`, |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | dicData: [], |
| | | // props: { |
| | | // label: 'name', |
| | | // value: 'id', |
| | | // }, |
| | | // dicData: [], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入姓名', |
| | | trigger: 'blur' |
| | | }], |
| | | focus: ({ |
| | | value, |
| | | column |
| | | }) => { |
| | | // this.$message.success('focus事件查看控制台') |
| | | // console.log('获取焦点', value, column) |
| | | // this.$refs.userList && this.$refs.userList.resetForm() |
| | | this.$refs.userList.show(this.discussion.articleRange) |
| | | }, |
| | | }, |
| | | |
| | | { |
| | |
| | | dialogVisibles: false, |
| | | articleId: '', |
| | | discussion: {}, |
| | | id: "" |
| | | id: "", |
| | | personList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserList() |
| | | // this.getUserList() |
| | | }, |
| | | |
| | | mounted() { |
| | |
| | | watch: { |
| | | 'froms.appointUser': { |
| | | handler(newData) { |
| | | const column = this.findObject(this.option.column, "userIds") |
| | | const column = this.findObject(this.option.column, "userName") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | // this.$refs.userList.show() |
| | | } else { |
| | | column.display = false |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectPersonList(personList) { |
| | | console.log(personList, "++++++++++++") |
| | | this.personList = personList |
| | | let nameList = personList.map(e => { |
| | | return e.name |
| | | }) |
| | | this.froms.userName = nameList.join(",") |
| | | }, |
| | | getuserInfoByDistrictId() { |
| | | getUserlnfoByDistrictlds(this.discussion.articleRange).then(res => { |
| | | const column = this.findObject(this.option.column, "userIds") |
| | | column.dicData = res.data.data |
| | | column.dicData = res.data.data.records |
| | | }) |
| | | }, |
| | | getUserList() { |
| | |
| | | handleSubmit(form, done) { |
| | | form.articleId = this.articleId |
| | | form.eventType = 1 |
| | | form.userIds = JSON.stringify(form.userIds) |
| | | form.userIds = this.personList.map(e => e.id).join(",") |
| | | // form.userIds = JSON.stringify(form.userIds) |
| | | if (form.appointUser == 0) { |
| | | form.userIds = '' |
| | | } |
| | |
| | | this.froms.userIds = JSON.parse(this.froms.userIds) |
| | | } |
| | | } |
| | | this.getuserInfoByDistrictId() |
| | | // this.getuserInfoByDistrictId() |
| | | |
| | | }) |
| | | }, |