zhaojiale
2022-08-04 2e76881491ddf4d15881c9112fffc7caebd55650
事故报告状态默认值修改
已修改3个文件
41 ■■■■■ 文件已修改
src/views/accidentManagementSystem/accidentReport/component/openAdd.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/accidentManagementSystem/accidentReport/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/accidentManagementSystem/workInjuryDeclaration/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/accidentManagementSystem/accidentReport/component/openAdd.vue
@@ -179,7 +179,7 @@
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="事故状态" prop="status">
                            <el-select v-model="ruleForm.status" :disabled="disabled" class="w100" placeholder="请选择">
                            <el-select v-model="ruleForm.status" :disabled="statusDisabled" class="w100" placeholder="请选择">
                                <el-option label="处理中" :value="1"></el-option>
                                <el-option label="已处理" :value="2"></el-option>
                            </el-select>
@@ -272,11 +272,22 @@
        });
        const titles = ref();
        const disabled = ref();
        const statusDisabled = ref(true)
        // 打开弹窗
        const openDialog = (title: string, id: number, type: boolean) => {
        const openDialog = (title: string, id: number, type: boolean,statusDisabledFlag:string) => {
            isShowDialog.value = true;
            titles.value = title;
            disabled.value = type;
            if(statusDisabledFlag.value=='first'){
                ruleForm.value.status = 1
            }else if(statusDisabledFlag.value=='second'){
                ruleForm.value.status = 2
            }
            if (title == '修改事故报告') {
                statusDisabled.value = false
            }else {
                statusDisabled.value = true
            }
            if (title == '查看事故报告' || title == '修改事故报告') {
                accidentManagementSystemApi()
                    .seeAccidentReport(id)
@@ -386,7 +397,7 @@
                    trigger: 'change',
                },
            ],
            fillInUserUid: [
            fillInUserName: [
                {
                    required: true,
                    message: '填写人不能为空',
@@ -623,7 +634,8 @@
            newTreeList,
            department,
            getTreeList,
            propse
            propse,
            statusDisabled
        };
    },
});
src/views/accidentManagementSystem/accidentReport/index.vue
@@ -138,16 +138,19 @@
  },
  setup() {
    const activeName = ref('first')
    const statusDisabledFlag = ref('first')//控制弹窗中的事件状态是否可以修改
    const handleClick = (tab: TabsPaneContext, event: Event) => {
        console.log(tab.props.name)
        if(tab.props.name=='first'){
            listQuery.searchParams.status=1
            statusDisabledFlag.value = 'first'
            listApi()
        }else if(tab.props.name=='second'){
            listQuery.searchParams.status=2
            statusDisabledFlag.value = 'second'
            listApi()
        }
    }
      const editableTabs = ref([
          {
              title: '处理中',
@@ -210,7 +213,7 @@
    // 打开新建用户弹窗
    const addRef = ref();
    const onOpenAdd = () => {
      addRef.value.openDialog('新建事故报告',false);
      addRef.value.openDialog('新建事故报告','',false,statusDisabledFlag);
    };
    // 新增后刷新
    const onMyAdd = (e: boolean) => {
@@ -223,9 +226,9 @@
    // 打开修改用户弹窗
    const onEdit = (val: string, row: object) => {
      if (val == '详情') {
        addRef.value.openDialog('查看事故报告',row,true);
        addRef.value.openDialog('查看事故报告',row,true,statusDisabledFlag);
      } else {
        addRef.value.openDialog('修改事故报告',row,false);
        addRef.value.openDialog('修改事故报告',row,false,statusDisabledFlag);
      }
    };
    // 上传
src/views/accidentManagementSystem/workInjuryDeclaration/index.vue
@@ -54,12 +54,12 @@
                <el-table-column prop="visitHospital" label="就诊医院" show-overflow-tooltip sortable></el-table-column>
                <el-table-column label="操作" width="260" align="center" fixed="right">
                    <template #default="scope">
                        <el-button size="small" text disabled>
                            <el-icon style="margin-right: 5px"> <Upload /> </el-icon>上报
                        <!--<el-button size="small" text disabled>-->
                            <!--<el-icon style="margin-right: 5px"> <Upload /> </el-icon>上报-->
                        <!--</el-button>-->
                        <el-button size="small" text type="primary" @click="onEdit('详情',scope.row.id)">
                          <el-icon style="margin-right: 5px"> <View /> </el-icon>查看
                        </el-button>
            <el-button size="small" text type="primary" @click="onEdit('详情',scope.row.id)">
              <el-icon style="margin-right: 5px"> <View /> </el-icon>查看
            </el-button>
                        <el-button size="small" text type="primary" @click="onEdit('修改',scope.row.id)">
                            <el-icon style="margin-right: 5px"> <EditPen /> </el-icon>修改
                        </el-button>