wangggziwen 2 лет назад
Родитель
Сommit
b31c659736

+ 39 - 29
master/src/main/java/com/ruoyi/project/process/service/impl/TMocServiceImpl.java

@@ -81,7 +81,7 @@ public class TMocServiceImpl implements ITMocService
         if (tempState.equals("0") && !historyTempState.equals(tempState)
             || status.equals("0") && !historyStatus.equals(status)) {
             // 更新移除时间
-            tMoc.setRemoveTime(new Date());
+//            tMoc.setRemoveTime(new Date());
         } else {
             // 清除移除时间
             tMoc.setRemoveTime(null);
@@ -134,37 +134,12 @@ public class TMocServiceImpl implements ITMocService
             } else if (sealDate != null) {
                 now = sealDate;
             }
-            int year = now.getYear();
-            int month = now.getMonth();
-            int date = now.getDate();
-            // 3.31 => 9.30
-            // 5.31 => 11.30
-            // 10.31 => 4.30
-            // 12.31 => 6.30
-            if (month == 2 || month == 4 || month == 9 || month == 11) {
-                if (date == 31) {
-                    date = 30;
-                }
-            }
-            // 8.31 => 2.28/29
-            if (month == 7) {
-                if ((year + 1) % 4 == 0) {  // 闰年
-                    if (date > 29) {
-                        date = 29;
-                    }
-                } else {    // 非闰年
-                    if (date > 28) {
-                        date = 28;
-                    }
-                }
-            }
-            month += 6;
-            extention = new Date(year, month, date);
+            extention = this.addSixMonth(now);
         } else {    // 手动延期
             extention = delayVO.getExtention();
         }
-        // 到期时间修改为延期时间
-        tMoc.setExpTime(extention);
+        // 到期时间修改为延期时间加6个月
+        tMoc.setExpTime(this.addSixMonth(extention));
         // 判断第几次延期
         if (tMoc.getExtention1() == null) {
             tMoc.setExtention1(extention);
@@ -204,6 +179,41 @@ public class TMocServiceImpl implements ITMocService
         return this.updateTMoc(tMoc);
     }
 
+    /**
+     * 日期加6个月
+     *
+     * @param inputDate 输入日期
+     * @return 输出日期
+     */
+    private Date addSixMonth(Date inputDate) {
+        int year = inputDate.getYear();
+        int month = inputDate.getMonth();
+        int date = inputDate.getDate();
+        // 3.31 => 9.30
+        // 5.31 => 11.30
+        // 10.31 => 4.30
+        // 12.31 => 6.30
+        if (month == 2 || month == 4 || month == 9 || month == 11) {
+            if (date == 31) {
+                date = 30;
+            }
+        }
+        // 8.31 => 2.28/29
+        if (month == 7) {
+            if ((year + 1) % 4 == 0) {  // 闰年
+                if (date > 29) {
+                    date = 29;
+                }
+            } else {    // 非闰年
+                if (date > 28) {
+                    date = 28;
+                }
+            }
+        }
+        month += 6;
+        return new Date(year, month, date);
+    }
+
     /**
      * 批量删除MOC管理
      *

+ 1 - 1
master/src/main/resources/mybatis/process/TMocMapper.xml

@@ -515,7 +515,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT count(1) as dataNum, TEMP_STATE as dataName FROM t_moc d
         <where>
             and d.timeliness = #{timeliness}
-            and d.temp_category = #{tempCategory}
+            <if test="tempCategory != null  and tempCategory != ''"> and d.temp_category = #{tempCategory} </if>
             and d.del_flag = 0
         </where>
         GROUP BY TEMP_STATE

+ 57 - 11
ui/src/views/process/moc/aquifier/index.vue

@@ -279,6 +279,24 @@
       @pagination="getList"
     />
 
+    <!-- 移除对话框 -->
+    <el-dialog v-dialogDrag :title="removeDialog.title" :visible.sync="removeDialog.open" width="500px" append-to-body>
+      <el-form ref="removeForm" :model="removeForm" :rules="rules" label-width="80px">
+        <el-form-item :label="$t('移除时间')" prop="removeTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="removeForm.removeTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('移除时间')">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleConfirmRemove()">{{ $t('确 定') }}</el-button>
+        <el-button @click="removeDialog.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 延期对话框 -->
     <el-dialog v-dialogDrag :title="delayDialog.title" :visible.sync="delayDialog.open" width="500px" append-to-body>
       <el-form ref="form" :model="delayForm" :rules="delayRules" label-width="80px">
@@ -637,6 +655,16 @@
         }
       };
       return {
+        removeForm: {
+          id: null,
+          timeliness: null,
+          tempCategory: null,
+          removeTime: null,
+        },
+        removeDialog: {
+          open: null,
+          title: null,
+        },
         leakLocationList: [],
         remarksList: [],
         sealDateChart: {
@@ -867,6 +895,9 @@
           deptId: [
             { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
           ],
+          removeTime: [
+            {required: true, message: this.$t('移除时间') + this.$t('不能为空'), trigger: "change"}
+          ],
         },
       };
     },
@@ -920,18 +951,33 @@
       });
     },
     methods: {
-      /** 移除按钮操作 */
+      /** 移除按钮处理 */
       handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          updateMoc({id: row.id, status: 0});
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
+        this.removeDialog.title = "移除操作";
+        this.removeDialog.open = true;
+        this.removeForm.id = row.id;
+        this.removeForm.timeliness = row.timeliness;
+        this.removeForm.tempCategory = row.tempCategory;
+        this.removeForm.removeTime = new Date();
+      },
+      /** 确定移除按钮处理 */
+      handleConfirmRemove() {
+        this.$refs["removeForm"].validate(valid => {
+          if (valid) {
+            if (this.removeForm.timeliness == 2 && this.removeForm.tempCategory == 1) {
+              this.removeForm.status = 0;
+              this.removeForm.tempState = null;
+            } else {
+              this.removeForm.tempState = 0;
+              this.removeForm.status = null;
+            }
+            updateMoc(this.removeForm).then(() => {
+              this.removeDialog.open = false;
+              this.getList();
+              this.msgSuccess(this.$t('移除成功'));
+            });
+          }
+        });
       },
       /** 查询MOC管理列表 */
       getList() {

+ 57 - 24
ui/src/views/process/moc/facility/index.vue

@@ -135,6 +135,24 @@
       @pagination="getList"
     />
 
+    <!-- 移除对话框 -->
+    <el-dialog v-dialogDrag :title="removeDialog.title" :visible.sync="removeDialog.open" width="500px" append-to-body>
+      <el-form ref="removeForm" :model="removeForm" :rules="rules" label-width="80px">
+        <el-form-item :label="$t('移除时间')" prop="removeTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="removeForm.removeTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('移除时间')">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleConfirmRemove()">{{ $t('确 定') }}</el-button>
+        <el-button @click="removeDialog.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 添加或修改MOC管理对话框 -->
     <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -333,6 +351,16 @@
         }
       };
       return {
+        removeForm: {
+          id: null,
+          timeliness: null,
+          tempCategory: null,
+          removeTime: null,
+        },
+        removeDialog: {
+          open: null,
+          title: null,
+        },
         tempStateChart: {
           open: false,
           title: '临时MOC状态数据统计'
@@ -513,6 +541,9 @@
           deptId: [
             { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
           ],
+          removeTime: [
+            {required: true, message: this.$t('移除时间') + this.$t('不能为空'), trigger: "change"}
+          ],
         },
       };
     },
@@ -566,18 +597,33 @@
       });
     },
     methods: {
-      /** 移除按钮操作 */
+      /** 移除按钮处理 */
       handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          updateMoc({id: row.id, tempState: 0});
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
+        this.removeDialog.title = "移除操作";
+        this.removeDialog.open = true;
+        this.removeForm.id = row.id;
+        this.removeForm.timeliness = row.timeliness;
+        this.removeForm.tempCategory = row.tempCategory;
+        this.removeForm.removeTime = new Date();
+      },
+      /** 确定移除按钮处理 */
+      handleConfirmRemove() {
+        this.$refs["removeForm"].validate(valid => {
+          if (valid) {
+            if (this.removeForm.timeliness == 2 && this.removeForm.tempCategory == 1) {
+              this.removeForm.status = 0;
+              this.removeForm.tempState = null;
+            } else {
+              this.removeForm.tempState = 0;
+              this.removeForm.status = null;
+            }
+            updateMoc(this.removeForm).then(() => {
+              this.removeDialog.open = false;
+              this.getList();
+              this.msgSuccess(this.$t('移除成功'));
+            });
+          }
+        });
       },
       /** 查询MOC管理列表 */
       getList() {
@@ -815,19 +861,6 @@
           this.title = this.$t('修改') + this.$t('MOC管理');
         });
       },
-      /** 移除按钮操作 */
-      handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          updateMoc({id: row.id, tempState: 0});
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
-      },
       /** 提交按钮 */
       submitForm() {
         this.$refs["form"].validate(valid => {

+ 57 - 24
ui/src/views/process/moc/interlock/index.vue

@@ -135,6 +135,24 @@
       @pagination="getList"
     />
 
+    <!-- 移除对话框 -->
+    <el-dialog v-dialogDrag :title="removeDialog.title" :visible.sync="removeDialog.open" width="500px" append-to-body>
+      <el-form ref="removeForm" :model="removeForm" :rules="rules" label-width="80px">
+        <el-form-item :label="$t('移除时间')" prop="removeTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="removeForm.removeTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('移除时间')">
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleConfirmRemove()">{{ $t('确 定') }}</el-button>
+        <el-button @click="removeDialog.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+
     <!-- 添加或修改MOC管理对话框 -->
     <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -337,6 +355,16 @@
         }
       };
       return {
+        removeForm: {
+          id: null,
+          timeliness: null,
+          tempCategory: null,
+          removeTime: null,
+        },
+        removeDialog: {
+          open: null,
+          title: null,
+        },
         tempStateChart: {
           open: false,
           title: '临时MOC状态数据统计'
@@ -517,6 +545,9 @@
           deptId: [
             { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
           ],
+          removeTime: [
+            {required: true, message: this.$t('移除时间') + this.$t('不能为空'), trigger: "change"}
+          ],
         },
       };
     },
@@ -570,18 +601,33 @@
       });
     },
     methods: {
-      /** 移除按钮操作 */
+      /** 移除按钮处理 */
       handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          updateMoc({id: row.id, tempState: 0});
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
+        this.removeDialog.title = "移除操作";
+        this.removeDialog.open = true;
+        this.removeForm.id = row.id;
+        this.removeForm.timeliness = row.timeliness;
+        this.removeForm.tempCategory = row.tempCategory;
+        this.removeForm.removeTime = new Date();
+      },
+      /** 确定移除按钮处理 */
+      handleConfirmRemove() {
+        this.$refs["removeForm"].validate(valid => {
+          if (valid) {
+            if (this.removeForm.timeliness == 2 && this.removeForm.tempCategory == 1) {
+              this.removeForm.status = 0;
+              this.removeForm.tempState = null;
+            } else {
+              this.removeForm.tempState = 0;
+              this.removeForm.status = null;
+            }
+            updateMoc(this.removeForm).then(() => {
+              this.removeDialog.open = false;
+              this.getList();
+              this.msgSuccess(this.$t('移除成功'));
+            });
+          }
+        });
       },
       /** 查询MOC管理列表 */
       getList() {
@@ -819,19 +865,6 @@
           this.title = this.$t('修改') + this.$t('MOC管理');
         });
       },
-      /** 移除按钮操作 */
-      handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          updateMoc({id: row.id, tempState: 0});
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
-      },
       /** 提交按钮 */
       submitForm() {
         this.$refs["form"].validate(valid => {

+ 57 - 96
ui/src/views/process/moc/temporaryMoc/index.vue

@@ -294,7 +294,7 @@
               :value="dict.dictValue"
             ></el-option>
           </el-select>
-          <span id="question" @click="mocTypeInfo.open = true" style="margin-left: 10px;">
+          <span class="question" @click="mocTypeInfo.open = true" style="margin-left: 10px;">
             <i class="el-icon-question"></i>
           </span>
         </el-form-item>
@@ -375,36 +375,6 @@
                           :picker-options="trainingDatePicker">
           </el-date-picker>
         </el-form-item>
-        <!--<el-form-item :label="$t('PID更新')" prop="pidMaster">-->
-          <!--<el-select v-model="form.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">-->
-            <!--<el-option-->
-              <!--v-for="dict in pidMasterOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('SOP更新')" prop="sopUpdate">-->
-          <!--<el-select v-model="form.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">-->
-            <!--<el-option-->
-              <!--v-for="dict in sopUpdateOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('文档更新')" prop="docUpdate">-->
-          <!--<el-select v-model="form.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">-->
-            <!--<el-option-->
-              <!--v-for="dict in docUpdateOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
         <el-form-item label="PSSR" prop="pssr">
           <el-date-picker clearable size="small" style="width: 200px"
                           v-model="form.pssr"
@@ -417,64 +387,31 @@
         <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
           <el-input v-model="form.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
         </el-form-item>
-        <!--<el-form-item :label="$t('装置编号')" prop="plantNumber">
-          <el-input v-model="form.plantNumber" :placeholder="$t('请输入') + $t('装置编号')" />
-        </el-form-item>
-        <el-form-item :label="$t('通知单')" prop="noticeLetter">
-          <el-input v-model="form.noticeLetter" :placeholder="$t('请输入') + $t('通知单')" />
-        </el-form-item>
-        <el-form-item :label="$t('工作单')" prop="workLetter">
-          <el-input v-model="form.workLetter" :placeholder="$t('请输入') + $t('工作单')" />
-        </el-form-item>
-        <el-form-item :label="$t('CTE工作号')" prop="cteNo">
-          <el-input v-model="form.cteNo" :placeholder="$t('请输入') + $t('CTE工作号')" />
-        </el-form-item>
-        <el-form-item :label="$t('投资费用(RMB)')" prop="investCost">
-          <el-input v-model="form.investCost" :placeholder="$t('请输入') + $t('投资费用(RMB)')" />
-        </el-form-item>
-        <el-form-item :label="$t('类别')" prop="category">
-          <el-select v-model="form.category" :placeholder="$t('请选择') + $t('类别')">
-            <el-option
-              v-for="dict in categoryOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('重要性')" prop="significance">
-          <el-input v-model="form.significance" :placeholder="$t('请输入') + $t('重要性')" />
-        </el-form-item>
-        <el-form-item :label="$t('分类')" prop="classification">
-          <el-input v-model="form.classification" :placeholder="$t('请输入') + $t('分类')" />
-        </el-form-item>
-        <el-form-item :label="$t('仪表控制')" prop="dashControl">
-          <el-input v-model="form.dashControl" :placeholder="$t('请输入') + $t('仪表控制')" />
+        <el-form-item :label="$t('归属部门')" prop="deptId">
+          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
         </el-form-item>
-        <el-form-item :label="$t('预计完成时间')" prop="estimateEndtime">
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 移除对话框 -->
+    <el-dialog v-dialogDrag :title="removeDialog.title" :visible.sync="removeDialog.open" width="500px" append-to-body>
+      <el-form ref="removeForm" :model="removeForm" :rules="rules" label-width="80px">
+        <el-form-item :label="$t('移除时间')" prop="removeTime">
           <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.estimateEndtime"
+                          v-model="removeForm.removeTime"
                           type="date"
                           value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('预计完成时间')">
+                          :placeholder="$t('请选择') + $t('移除时间')">
           </el-date-picker>
         </el-form-item>
-        <el-form-item :label="$t('EHS审查数据库')" prop="ehsDb">
-          <el-input v-model="form.ehsDb" :placeholder="$t('请输入') + $t('EHS审查数据库')" />
-        </el-form-item>
-        <el-form-item :label="$t('PSSR数据库')" prop="pssrDb">
-          <el-input v-model="form.pssrDb" :placeholder="$t('请输入') + $t('PSSR数据库')" />
-        </el-form-item>
-        <el-form-item :label="$t('CAPEX计划')" prop="capex">
-          <el-input v-model="form.capex" :placeholder="$t('请输入') + $t('CAPEX计划')" />
-        </el-form-item>-->
-        <el-form-item :label="$t('归属部门')" prop="deptId">
-          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
-        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
-        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+        <el-button type="primary" @click="handleConfirmRemove()">{{ $t('确 定') }}</el-button>
+        <el-button @click="removeDialog.open = false">{{ $t('取 消') }}</el-button>
       </div>
     </el-dialog>
 
@@ -683,6 +620,16 @@
         }
       };
       return {
+        removeForm: {
+          id: null,
+          timeliness: null,
+          tempCategory: null,
+          removeTime: null,
+        },
+        removeDialog: {
+          open: null,
+          title: null,
+        },
         statusChart: {
           open: false,
           title: '卡具状态数据统计'
@@ -887,6 +834,9 @@
           deptId: [
             { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
           ],
+          removeTime: [
+            {required: true, message: this.$t('移除时间') + this.$t('不能为空'), trigger: "change"}
+          ],
         },
       };
     },
@@ -1173,22 +1123,33 @@
           this.title = this.$t('修改') + this.$t('MOC管理');
         });
       },
-      /** 移除按钮操作 */
+      /** 移除按钮处理 */
       handleRemove(row) {
-        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          if (row.timeliness == 2 && row.tempCategory == 1) {
-            updateMoc({id: row.id, status: 0});
-          } else {
-            updateMoc({id: row.id, tempState: 0});
+        this.removeDialog.title = "移除操作";
+        this.removeDialog.open = true;
+        this.removeForm.id = row.id;
+        this.removeForm.timeliness = row.timeliness;
+        this.removeForm.tempCategory = row.tempCategory;
+        this.removeForm.removeTime = new Date();
+      },
+      /** 确定移除按钮处理 */
+      handleConfirmRemove() {
+        this.$refs["removeForm"].validate(valid => {
+          if (valid) {
+            if (this.removeForm.timeliness == 2 && this.removeForm.tempCategory == 1) {
+              this.removeForm.status = 0;
+              this.removeForm.tempState = null;
+            } else {
+              this.removeForm.tempState = 0;
+              this.removeForm.status = null;
+            }
+            updateMoc(this.removeForm).then(() => {
+              this.removeDialog.open = false;
+              this.getList();
+              this.msgSuccess(this.$t('移除成功'));
+            });
           }
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('移除成功'));
-        })
+        });
       },
       /** 提交按钮 */
       submitForm() {
@@ -1432,7 +1393,7 @@
   #tempState:hover{
     cursor: pointer;
   }
-  #question:hover{
+  .question:hover{
     cursor: pointer;
   }
   #moc-type:hover{