Browse Source

Merge branch 'master' of https://git.agilestar.cn/spfm-group/spfm-market-front

daiqisheng 3 years ago
parent
commit
d85fbb4863

+ 5 - 0
src/assets/simple.scss

@@ -1,4 +1,9 @@
 // simple
+.el {
+    &-dialog.is-fullscreen {
+        border-radius: 0;
+    }
+}
 .simple {
     &-container {
         overflow: auto;

+ 2 - 2
src/pages/main/performance/analysis.vue

@@ -57,14 +57,14 @@ export default {
                     label: "主要内容",
                     props: "content",
                     width: 300,
-                    type: "edit",
+                    type: "textarea",
                     align: "left",
                 },
                 {
                     label: "完成标志及计分方法(需体现出完成时间)",
                     props: "mark",
                     width: 500,
-                    type: "edit",
+                    type: "textarea",
                     align: "left",
                 },
                 {

+ 6 - 0
src/pages/main/performance/components/dialog.vue

@@ -2,8 +2,10 @@
   <el-dialog
     :title="title"
     :visible.sync="visible"
+    :fullscreen="fullscreen"
     :key="reload"
     :before-close="handleCancel"
+    :modal-append-to-body="false"
     :width="width"
   >
     <!-- 表格主体部分 -->
@@ -37,6 +39,10 @@ export default {
       type: String,
       default: "500px",
     },
+    fullscreen: {
+        type: Boolean,
+        default: false
+    }
   },
   mounted() {
     console.log("我被初始化了");

+ 9 - 6
src/pages/main/performance/components/sheet.vue

@@ -2,14 +2,16 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-04 15:38:33
+ * @LastEditTime : 2021-12-04 16:00:20
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 
 <template>
     <div class="sheet-container">
         <el-upload action :on-change="handleChange" :show-file-list="false">
-            <el-button size="mini" type="success">上传</el-button>
+            <el-button size="mini" type="success" class="margin-bottom-20"
+                >上传</el-button
+            >
         </el-upload>
         <div id="luckysheet" class="sheet-container-block"></div>
     </div>
@@ -64,13 +66,14 @@ export default {
 
 <style lang="scss" scope>
 .sheet-container {
-    position: relative;
-    width: 1200px;
-    height: 500px;
+    position: fixed;
+    width: 100%;
+    height: 100%;
     &-block {
+        overflow: hidden;
         position: absolute;
         width: calc(100% - 40px);
-        height: 100%;
+        height: 80%;
     }
 }
 </style>

+ 37 - 4
src/pages/main/performance/components/table.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
  * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-03 21:22:43
+ * @LastEditTime : 2021-12-04 16:08:24
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\table.vue
 -->
 <template>
@@ -43,9 +43,42 @@
           :label="label"
           :align="align || 'center'"
         >
-          <template #default="scope">
-            <div>{{ scope.row[props] }}</div>
-          </template>
+            <template #default="scope">
+                <div v-if="type === 'edit'">
+                    <el-input
+                        v-if="scope.row[`${props}_${type}`]"
+                        v-model="scope.row[props]"
+                        autosize
+                        type="textarea"
+                    />
+                    <pre v-else>{{ scope.row[props] }}</pre>
+                    <el-button
+                        size="mini"
+                        class="margin-top-10"
+                        @click="handleEdit({ scope, type, props })"
+                    >
+                        {{ !scope.row[`${props}_${type}`] ? "编辑" : "完成" }}
+                    </el-button>
+                </div>
+                <div v-else-if="type === 'textarea'">
+                    <pre>{{ scope.row[props] }}</pre>
+                </div>
+                <div v-else>{{ scope.row[props] }}</div>
+            </template>
+            <template v-if="children">
+                <el-table-column
+                    v-for="({ props, label, width, align }, index) in children"
+                    :key="index"
+                    :prop="props"
+                    :width="width"
+                    :label="label"
+                    :align="align || 'center'"
+                >
+                    <template #default="scope">
+                        <div>{{ scope.row[props] }}</div>
+                    </template>
+                </el-table-column>
+            </template>
         </el-table-column>
       </template>
     </el-table-column>

+ 7 - 1
src/pages/main/performance/index.vue

@@ -65,9 +65,15 @@ export default {
 </script>
 <style lang="scss" scoped>
 .performance-container {
-    padding: 20px;
+    background: #ffffff;
+    padding-top: 20px;
+    margin: 15px;
+    overflow: auto;
+    width: calc(100% - 30px);
     height: 100%;
+    overflow-x: hidden;
     &-viewport {
+        width: calc(100% - 20px);
         overflow: auto;
     }
 }

+ 1 - 0
src/pages/main/performance/mould.vue

@@ -60,6 +60,7 @@
             </el-form>
         </simple-dialog>
         <simple-dialog
+            fullscreen
             title="新增模板"
             :visible="add_visible"
             :reload="reload"

+ 6 - 0
src/router/index.js

@@ -16,6 +16,12 @@ const routes = [{
             component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/infotech/index.vue'], resolve)
         },
         {
+            meta: { name:  '绩效', keepAlive: false },
+            path: '/performance',
+            name: 'performance',
+            component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/performance/index.vue'], resolve)
+        },
+        {
             meta: { name:  '宣传稿件下发', keepAlive: false,type: 1 },
             path: '/infotechgj',
             name: 'infotechgj',