修复房间标签报错
This commit is contained in:
@@ -472,12 +472,22 @@ export default {
|
|||||||
success: function (json) {
|
success: function (json) {
|
||||||
if (json) {
|
if (json) {
|
||||||
$("#id").val(id);
|
$("#id").val(id);
|
||||||
var jsonName = JSON.parse(json.name);
|
let name = json.name;
|
||||||
$("#modal_name").val(jsonName.zh);
|
if (name.startsWith('{') && name.endsWith('}')) {
|
||||||
// 阿语名称
|
var jsonName = JSON.parse(json.name);
|
||||||
$("#ar_modal_name").val(jsonName.ar);
|
$("#modal_name").val(jsonName.zh);
|
||||||
// 英语名称
|
// 阿语名称
|
||||||
$("#en_modal_name").val(jsonName.en);
|
$("#ar_modal_name").val(jsonName.ar);
|
||||||
|
// 英语名称
|
||||||
|
$("#en_modal_name").val(jsonName.en);
|
||||||
|
} else {
|
||||||
|
$("#modal_name").val(name);
|
||||||
|
// 阿语名称
|
||||||
|
$("#ar_modal_name").val(name);
|
||||||
|
// 英语名称
|
||||||
|
$("#en_modal_name").val(name);
|
||||||
|
}
|
||||||
|
|
||||||
$("#modal_seq").val(json.seq);
|
$("#modal_seq").val(json.seq);
|
||||||
$("#modal_description").val(json.description);
|
$("#modal_description").val(json.description);
|
||||||
if (json.status == true) {
|
if (json.status == true) {
|
||||||
@@ -538,10 +548,7 @@ export default {
|
|||||||
initPartition() {
|
initPartition() {
|
||||||
getPartitionInfoList().then(res => {
|
getPartitionInfoList().then(res => {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
buildSelectOption(
|
let array = [{
|
||||||
"#modal_partitionId",
|
|
||||||
null,
|
|
||||||
[{
|
|
||||||
value: '',
|
value: '',
|
||||||
text: '全部',
|
text: '全部',
|
||||||
}].concat(data.map((v) => {
|
}].concat(data.map((v) => {
|
||||||
@@ -549,7 +556,12 @@ export default {
|
|||||||
value: v.id,
|
value: v.id,
|
||||||
text: v.desc,
|
text: v.desc,
|
||||||
};
|
};
|
||||||
}))
|
}));
|
||||||
|
console.log(array);
|
||||||
|
buildSelectOption(
|
||||||
|
"#modal_partitionId",
|
||||||
|
null,
|
||||||
|
array
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user