فهرست منبع

修改sheet组件

noob 3 سال پیش
والد
کامیت
01346db09c
1فایلهای تغییر یافته به همراه12 افزوده شده و 4 حذف شده
  1. 12 4
      src/pages/main/performance/components/sheet.vue

+ 12 - 4
src/pages/main/performance/components/sheet.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-24 18:50:26
+ * @LastEditTime : 2021-12-26 17:05:12
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 
@@ -153,7 +153,11 @@ export default {
     props: {
         type: {
             type: String,
-            default: "view",
+            default: "view", // view 查看 edit 编辑
+        },
+        attribute: {
+            type: String,
+            default: "template", // template 模板 order 工单 file 文件
         },
         id: {
             type: Number,
@@ -198,13 +202,17 @@ export default {
             const {
                 data: { templateContent, templateName, list },
             } = await this.$http({
-                url: "/market/CMKFileTemplate/QueryCMKFileTemplateById",
+                url:
+                    this.attribute === "template"
+                        ? "/market/CMKFileTemplate/QueryCMKFileTemplateById"
+                        : "/market/CMKIssued/CMKQueryIssuedById",
                 method: "post",
                 headers: {
                     "Content-Type": "application/json",
                 },
                 data: {
-                    templateId: this.id,
+                    [this.attribute === "template" ? "templateId" : "id"]:
+                        this.id,
                 },
             });
             if (list && list.length) {