qymljy 1 năm trước cách đây
mục cha
commit
552d376bbd

+ 126 - 0
src/Form/caseManage/add.vue

@@ -0,0 +1,126 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="addBtn(dialogFormVisible = true)">新 建</el-button>
+    <el-drawer
+        title="新增案例"
+        :visible.sync="dialogFormVisible"
+        size="60%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onCancel">
+      <div class="drawer__panel" style="margin-bottom: 0!important;">
+        <el-row :gutter="10">
+          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="top">
+            <el-col :span="24">
+              <el-form-item label="标题" prop="title">
+                <el-input v-model="form.title" placeholder="请输入标题"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="状态" prop="status">
+                <el-radio-group v-model="form.status" >
+                  <el-radio label="新建">新建</el-radio>
+                  <el-radio label="发布">发布</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="排序" prop="sequence">
+                <el-input v-model="form.sequence" placeholder="请输入排序"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="封面" prop="image">
+                <previewImage v-if="form.cover" style="width:256px" :image="form.image" :deletebtn="true"
+                              @onSuccess="clearCover"></previewImage>
+                <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG"
+                        :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"
+                        @onSuccess="onCoverSubmit"></upload>
+                <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="内容" prop="notes">
+                <myEditor ref="editor" :content="form.notes" :id="form.sat_sharematerialid"></myEditor>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+        <div>
+          <div style="font-size: 16px;font-weight: bold">关联产品</div>
+        </div>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" type="primary" @click="onCancel" plain class="normal-btn-width" >取 消</el-button>
+        <el-button size="small"  @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import upload from '@/components/upload/hw_obs_upload.vue'
+import previewImage from '@/components/previewImage/index.vue'
+import myEditor from '@/components/my-editor/Editor.vue'
+export default {
+  name: "add",
+  components:{upload,previewImage,myEditor},
+  data(){
+    return {
+      dialogFormVisible:false,
+      form:{
+        "title": "",
+        "notes": "",
+        "content": "",
+        "sat_sharematerialid":0,
+        "status":"发布",
+        "sequence":'',
+        "image":{},
+      },
+      rules:{
+        title: [
+          { required: true, message: '请输入标题名称', trigger: 'blur' },
+        ],
+        image: [
+          { required: true, message: '请上传封面', trigger: 'change' }
+        ],
+      },
+      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      attinfo_attachment:[],
+    }
+  },
+  methods:{
+    addBtn(){},
+    onSubmit(){},
+    onCancel(){},
+    clearCover() {
+      this.form.cover = null
+      this.image = {}
+    },
+    async onCoverSubmit(data) {
+      // console.log(res,'上传图片1111')
+      // this.image = res.data.attachmentids[0]
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sat_notice',
+          "ownerid": this.form.sat_noticeid,
+          "usetype": 'cover'//传空返回有所
+        }
+      })
+      console.log(res,'封面数据获取')
+      this.form.cover = res.data[0].url
+      this.image = res.data[0]
+      this.queryNoticeMain()
+      // this.form.cover = JSON.parse(res.attinfos).data[0].url
+      // this.image = JSON.parse(res.attinfos).data[0]
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 0
src/Form/consultManage/add.vue

@@ -73,6 +73,7 @@
           </attachmentList>
         </div>
       </div>
+
       <div class="fixed__btn__panel">
         <el-button size="small" type="primary" @click="onCancel" plain class="normal-btn-width" >取 消</el-button>
         <el-button size="small"  @click="onSubmit" class="normal-btn-width">确 定</el-button>

+ 58 - 0
src/WebsiteManagement/caseManage/index.vue

@@ -0,0 +1,58 @@
+<template>
+  <div>
+    <basicLayout
+        style="padding-top:0 !important"
+        ref="basicLayout"
+        formPath="caseManage"
+        tableName="caseTable"
+        idName="sat_sharematerialid"
+        :apiId="{query:20240801133603,del:''}"
+        :isExport="false"
+    >
+      <template #custom >
+        <div class="mt-10">
+          <label  class="search__label">类型:</label>
+          <el-select class="inline-24" v-model="status" placeholder="请选择类型" @change="selectChange" size="small" clearable>
+            <el-option label="新建" value="新建"></el-option>
+            <el-option label="发布" value="发布"></el-option>
+          </el-select>
+        </div>
+      </template>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname === 'status'">
+          <div>
+            <span v-if="scope.data.column.data[scope.data.column.columnname] === '发布'" style="color:#52C41A">{{scope.data.column.data[scope.data.column.columnname]}}</span>
+            <span v-else>{{scope.data.column.data[scope.data.column.columnname]}}</span>
+          </div>
+        </div>
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <detailInfo :sat_noticeid="scope.data.data.sat_noticeid" @onSuccess="onSuccess"></detailInfo>
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import detailInfo from "./modules/detailInfo"
+export default {
+  name: "index",
+  components:{detailInfo},
+  methods:{
+    selectChange(){
+      this.$refs.basicLayout.param.content.where.status = this.status
+      this.$refs.basicLayout.listData(this.$refs.basicLayout.param.content.pageNumber = 1)
+    },
+    onSuccess(){
+      this.$refs.basicLayout.listData()
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 0
src/WebsiteManagement/caseManage/modules/detailInfo.vue

@@ -0,0 +1,13 @@
+<template>
+  <div></div>
+</template>
+
+<script>
+export default {
+  name: "detailInfo"
+}
+</script>
+
+<style scoped>
+
+</style>

+ 10 - 0
src/router/WebsiteManagement.js

@@ -9,5 +9,15 @@ const WebsiteManagement = [
         },
         component: () => import('@/WebsiteManagement/consultManage/index')
     },
+    {
+        path: '/caseManage',
+        name: 'caseManage',
+        meta: {
+            title: '咨询管理',
+            ast_nav: true,
+            keeproute: true,
+        },
+        component: () => import('@/WebsiteManagement/caseManage/index')
+    },
 ];
 export default WebsiteManagement;