Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhn
2022-05-24 18:15:33 +08:00
2 changed files with 18 additions and 40 deletions
+6 -7
View File
@@ -125,7 +125,7 @@
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
<!-- 角色配置 -->
<a-modal v-model="rolevisible" :title="$t('RoleAssignment')" width='650px' :footer="null">
<role-assignment v-if='rolevisible'></role-assignment>
<role-assignment v-if='rolevisible' :selectedRowKeysArray='selectedRowKeys'></role-assignment>
</a-modal>
</a-card>
</template>
@@ -251,16 +251,15 @@
},
methods: {
onSelectChange(val,value) {
console.log(val)
console.log(value)
this.selectedRowKeys = val
this.selectedRowKeysvalue = value
},
rolehandleOk() {
console.log('角色配置得弹框控制')
},
RoleAssignment: function(){
this.rolevisible = true
if(this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.rolevisible = true
}
},
getAvatarView: function(avatar) {
return getFileAccessHttpUrl(avatar)
@@ -12,15 +12,11 @@
<a-row :gutter='24'>
<a-col :span='24'>
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
mode="multiple"
style="width: 100%"
:placeholder="$t('selectUserRole')"
optionFilterProp="children"
v-model="selectedRole"
:getPopupContainer="(target) => target.parentNode">
<a-select-option v-for="(role,roleindex) in roleList" :key="roleindex.toString()" :value="role.id">
{{ role.roleName }}
<a-select mode="multiple" :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model:value="selectedRole">
<a-select-option v-for="(role,roleindex) in roleList" :key="role.id" :value="role.id">
<span style="display: inline-block;width: 100%">
{{ role.roleName }}
</span>
</a-select-option>
</a-select>
</a-form-item>
@@ -54,7 +50,7 @@ export default {
loading: false,
editId: '',
newVisible: false,
selectedRole: '',
selectedRole: undefined,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@@ -71,12 +67,13 @@ export default {
confirmLoading: false,
selectedRowKeys: [],
roleList: [],
defaultValue: undefined
}
},
props: {
selectedRowKeysArray: {
type: String,
default: '',
type: Array,
default: [],
require: true
}
},
@@ -86,8 +83,7 @@ export default {
methods: {
loadData() {
this.loading = true
let params = {}
getAction(`sys/role/queryall`, params).then(res => {
getAction(`sys/role/queryall`, {}).then(res => {
if (res.success) {
this.roleList = [...res.result]
}
@@ -95,23 +91,12 @@ export default {
this.loading = false
})
},
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
},
handleTableChange(val) {
},
//保存
handleSubmit() {
console.log(this.selectedRole,'llllllll')
let _this = this
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
let param = {ids: this.selectedRowKeysArray.join(','), deadline: `${this.pickerDate}`, }
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
if (res.success) {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
@@ -120,13 +105,7 @@ export default {
this.$message.warning(res.message)
}
})
},
onChange(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
onOk(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
}
}
}
</script>