Ben Lin
2024-06-13 1b970c588245935181610e93e84a9a3a10d80ecd
工艺路线绑定岗位资源更新
已修改3个文件
38 ■■■■ 文件已修改
src/views/tigerprojects/mes/eng/route/components/PostProps.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/PostProps.vue
@@ -1,16 +1,16 @@
<!--
 * @Description: file content
 * @Author: your name
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-06-11 21:07:04
 * @LastEditors: your name
 * @LastEditTime: 2024-06-12 23:51:52
 * @LastEditTime: 2024-06-13 08:55:09
-->
<!--
 * @Description: 右侧属性面板控件 表单属性面板
-->
<template>
  <div class="mt-3">
  <div class="m-1">
    <BasicTable @register="registerTable">
      <template #toolbar>
        <a-button type="primary" @click="handleCreate" preIcon="add_02|svg" :size="size"> 新增 </a-button>
@@ -37,7 +37,7 @@
import { notification } from 'ant-design-vue';
import { BasicTable, TableAction, useTable } from '/@/components/Table';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { onMounted, ref, unref, watch } from 'vue';
import { nextTick, onMounted, ref, unref, watch } from 'vue';
import { useModal } from '/@/components/Modal';
import NormalModal from '/@/views/components/NormalModal.vue';
import { useI18n } from '/@/hooks/web/useI18n';
@@ -72,6 +72,7 @@
  showTableSetting: false,
  bordered: true,
  showIndexColumn: false,
  pagination: { pageSize: 10 },
  actionColumn: {
    width: 80,
    title: '操作',
@@ -79,11 +80,16 @@
    slots: { customRender: 'action' },
  },
});
defineExpose({
  reload
});
// watch(
//   () => routeConfig.currentItem.ID,
//   (newVal, oldVal) => {
//     if (newVal != oldVal) {
//       reload();
//       nextTick(() => {
//         reload();
//       });
//     }
//   },
//   { deep: true, immediate: true },
@@ -136,7 +142,7 @@
   * @return {*}
   */
function handleDelete(record: Recordable) {
  DeleteWhere(`POST_CODE = '${record.POST_CODE}'`, 'MES_ROUTE_NODE_POST').then((res) => {
  DeleteWhere(`POST_CODE = '${record.POST_CODE}' And NODE_ID = '${record.NODE_ID}'`, 'MES_ROUTE_NODE_POST').then((res) => {
    reload();
  });
}
src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue
@@ -4,14 +4,14 @@
 * @version: 
 * @Date: 2024-04-28 15:15:22
 * @LastEditors: your name
 * @LastEditTime: 2024-06-12 22:53:25
 * @LastEditTime: 2024-06-13 08:50:47
-->
<!--
 * @Description: 右侧属性配置面板
-->
<template>
  <div>
    <Tabs v-model:activeKey="routeConfig.activeKey" :tabBarStyle="{ margin: 0 }" >
    <Tabs v-model:activeKey="routeConfig.activeKey" :tabBarStyle="{ margin: 0 }" @tabClick="tabclkCallback">
      <TabPane :key="1" tab="工艺路线">
        <FormProps />
      </TabPane>
@@ -20,7 +20,7 @@
        <ActionItemProps v-if="!IsOper"  />
      </TabPane>
      <TabPane :key="3" :tab="posttitle" >
        <PostProps v-if="IsOper" />
        <PostProps ref="postProps" v-if="IsOper" />
      </TabPane>
      <!-- <TabPane :key="4" tab="组件">
        <slot v-if="slotProps" :name="slotProps.component + 'Props'"></slot>
@@ -51,6 +51,7 @@
    crudColSlots: [],
    entityName: String,
  });
  const postProps = ref(null);
  const IsOper = ref(false);
  const IsReload = ref(false);
  const title = ref('');
@@ -70,6 +71,17 @@
        },
        { deep: true },
      );
  /**
   * @description: 点击tab回调方法
   * @param {*} val
   * @return {*}
   */
  function tabclkCallback(val){
    if(val == '3'){
      postProps.value?.reload();
    }
  }
</script>
<style lang="less" scoped>
src/views/tigerprojects/mes/eng/route/index.vue
@@ -506,7 +506,7 @@
      IsOperation.value = true;
      title.value = '工序';
      posttitle.value = '岗位';
    }, 50);
    }, 100);
  }
}