hookehuyr

树形组件只读判断

1 <!-- 1 <!--
2 * @Date: 2022-08-29 14:31:20 2 * @Date: 2022-08-29 14:31:20
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-06-14 14:56:35 4 + * @LastEditTime: 2024-06-14 16:06:58
5 * @FilePath: /data-table/src/components/OrgPickerField/MyComponent.vue 5 * @FilePath: /data-table/src/components/OrgPickerField/MyComponent.vue
6 * @Description: 树形组件 6 * @Description: 树形组件
7 --> 7 -->
...@@ -271,6 +271,8 @@ onMounted(async () => { ...@@ -271,6 +271,8 @@ onMounted(async () => {
271 }); 271 });
272 272
273 const openTree = () => { 273 const openTree = () => {
274 + if (props.component_props.readonly) return false; // 只读判断
275 + // 打开弹窗
274 showPopover.value = true; 276 showPopover.value = true;
275 // 获取数据 277 // 获取数据
276 nextTick(() => { 278 nextTick(() => {
......
1 <!-- 1 <!--
2 * @Date: 2022-07-18 10:22:22 2 * @Date: 2022-07-18 10:22:22
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-06-14 10:04:24 4 + * @LastEditTime: 2024-06-14 16:01:58
5 * @FilePath: /data-table/src/views/index.vue 5 * @FilePath: /data-table/src/views/index.vue
6 * @Description: 首页 6 * @Description: 首页
7 --> 7 -->
...@@ -309,23 +309,6 @@ onMounted(async () => { ...@@ -309,23 +309,6 @@ onMounted(async () => {
309 }; 309 };
310 } 310 }
311 // TODO:待完善,集合组保存的字段和值怎么处理,都是单条数据都要合并到相应的 group_field_name 下面? 311 // TODO:待完善,集合组保存的字段和值怎么处理,都是单条数据都要合并到相应的 group_field_name 下面?
312 - // page_form.unshift({
313 - // data_type : "text",
314 - // default : '',
315 - // // default : '[{ "id": 107691, "name": "插花组", "type": "dept" }, { "id": 137902, "name": "大道大商营员组长", "type": "role" },{ "id": 107707, "name": "场地组长", "type": "user" }]',
316 - // disabled : false,
317 - // field_id : 1414832,
318 - // field_name : "field_4",
319 - // index : 41,
320 - // interaction_type : "h5edit",
321 - // label : "树形选择器",
322 - // name : "name_41",
323 - // placeholder : "请输入",
324 - // readonly : false,
325 - // required : true,
326 - // tag : "org_picker",
327 - // unique : false,
328 - // });
329 312
330 // page_form.unshift({ 313 // page_form.unshift({
331 // data_type : "text", 314 // data_type : "text",
......