Compare commits

..

2 Commits

2 changed files with 2 additions and 3 deletions

View File

@ -84,7 +84,7 @@ export default defineComponent({
//update-end-author:taoyan date:2022-6-21 for:
getDictItems(temp).then((res) => {
if (res) {
checkOptions.value = res.map((item) => ({ value: item.value, label: item.text, disabled: item.status != 0 && !checkboxArray.value.includes(item.value), color: item.color }));
checkOptions.value = res.map((item) => ({ value: item.value, label: item.text, disabled: item.status == 1 && !checkboxArray.value.includes(item.value), color: item.color }));
//console.info('res', dictOptions.value);
} else {
console.error('getDictItems error: : ', res);

View File

@ -129,12 +129,11 @@ export default defineComponent({
const dictData = await initDictOptions(dictCode);
dictOptions.value = dictData.reduce((prev, next) => {
if (next) {
console.log(next['status'] == 1)
const value = next['value'];
prev.push({
label: next['text'] || next['label'],
value: stringToNumber ? +value : value,
disabled: next['status'] != 0,
disabled: next['status'] == 1,
color: next['color'],
...omit(next, ['text', 'value', 'color']),
});