Browse Source

官网新增营销产品

qymljy 1 năm trước cách đây
mục cha
commit
976df05590
23 tập tin đã thay đổi với 3351 bổ sung2063 xóa
  1. 51 29
      src/WebsiteManagement/caseManage/index.vue
  2. 290 214
      src/WebsiteManagement/caseManage/modules/add.vue
  3. 116 72
      src/WebsiteManagement/caseManage/modules/addProduct.vue
  4. 190 140
      src/WebsiteManagement/caseManage/modules/classManage.vue
  5. 245 163
      src/WebsiteManagement/caseManage/modules/detailInfo.vue
  6. 293 216
      src/WebsiteManagement/caseManage/modules/edit.vue
  7. 191 98
      src/WebsiteManagement/caseManage/modules/hw_obs_upload.vue
  8. 56 31
      src/WebsiteManagement/consultManage/index.vue
  9. 218 160
      src/WebsiteManagement/consultManage/modules/add.vue
  10. 195 148
      src/WebsiteManagement/consultManage/modules/classManage.vue
  11. 266 193
      src/WebsiteManagement/consultManage/modules/detailInfo.vue
  12. 224 161
      src/WebsiteManagement/consultManage/modules/edit.vue
  13. 45 0
      src/WebsiteManagement/marketproductMag/compents/productTemplate.vue
  14. 87 0
      src/WebsiteManagement/marketproductMag/index.vue
  15. 187 0
      src/WebsiteManagement/marketproductMag/modules/add.vue
  16. 13 0
      src/WebsiteManagement/marketproductMag/modules/edit.vue
  17. 33 24
      src/WebsiteManagement/serviceAppointMag/compents/dialogTemplate.vue
  18. 68 35
      src/WebsiteManagement/serviceAppointMag/compents/tableTemplate.vue
  19. 162 111
      src/WebsiteManagement/serviceAppointMag/detail/index.vue
  20. 87 60
      src/WebsiteManagement/serviceAppointMag/index.vue
  21. 315 201
      src/WebsiteManagement/serviceAppointMag/modules/transferService.vue
  22. 9 7
      src/components/my-editor/Editor.vue
  23. 10 0
      src/router/WebsiteManagement.js

+ 51 - 29
src/WebsiteManagement/caseManage/index.vue

@@ -1,21 +1,30 @@
 <template>
   <div>
     <basicLayout
-        style="padding-top:0 !important"
-        ref="basicLayout"
-        :oldFormPath="{add:'WebsiteManagement/caseManage/modules'}"
-        tableName="caseTable"
-        idName="sat_sharematerialid"
-        :apiId="{query:20240801133603,del:''}"
-        :isExport="false"
+      style="padding-top: 0 !important"
+      ref="basicLayout"
+      :oldFormPath="{ add: 'WebsiteManagement/caseManage/modules' }"
+      tableName="caseTable"
+      idName="sat_sharematerialid"
+      :apiId="{ query: 20240801133603, del: '' }"
+      :isExport="false"
     >
       <template #titleRight>
-        <classManage v-if="tool.checkAuth($route.name,'classManage')"></classManage>
+        <classManage
+          v-if="tool.checkAuth($route.name, 'classManage')"
+        ></classManage>
       </template>
-      <template #custom >
+      <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>
+          <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>
@@ -24,12 +33,24 @@
       <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>
+            <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]]:'--'}}
+          {{
+            scope.data.column.data[[scope.data.column.columnname]]
+              ? scope.data.column.data[[scope.data.column.columnname]]
+              : "--"
+          }}
         </div>
       </template>
       <template v-slot:tbOpreation="scope">
@@ -41,27 +62,28 @@
 
 <script>
 import classManage from "./modules/classManage";
-import detailInfo from "./modules/detailInfo"
+import detailInfo from "./modules/detailInfo";
 export default {
   name: "index",
-  components:{detailInfo,classManage},
-  data(){
+  components: { detailInfo, classManage },
+  data() {
     return {
-      status:""
-    }
+      status: "",
+    };
   },
-  methods:{
-    selectChange(){
-      this.$refs.basicLayout.param.content.where.status = this.status
-      this.$refs.basicLayout.listData(this.$refs.basicLayout.param.content.pageNumber = 1)
+  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()
-    }
-  }
-}
+    onSuccess() {
+      this.$refs.basicLayout.listData();
+    },
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 290 - 214
src/WebsiteManagement/caseManage/modules/add.vue

@@ -1,37 +1,58 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="addBtn(dialogFormVisible = true)">新 建</el-button>
+    <el-button
+      size="small"
+      type="primary"
+      @click="addBtn((dialogFormVisible = true))"
+      >新 建</el-button
+    >
     <el-drawer
-        title="新增案例"
-        :visible.sync="dialogFormVisible"
-        size="70%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onCancel">
-      <div class="drawer__panel" >
+      title="新增案例"
+      :visible.sync="dialogFormVisible"
+      size="70%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      @close="onCancel"
+    >
+      <div class="drawer__panel">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="top">
+          <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-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_sharematerial_classid">
-                <el-select v-model="form.sat_sharematerial_classid" clearable placeholder="请选择分类" style="width: 100%">
+                <el-select
+                  v-model="form.sat_sharematerial_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_sharematerial_classid"
-                      :label="item.classname"
-                      :value="item.sat_sharematerial_classid">
+                    v-for="item in classData"
+                    :key="item.sat_sharematerial_classid"
+                    :label="item.classname"
+                    :value="item.sat_sharematerial_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="状态" prop="status">
-                <el-radio-group v-model="form.status" >
+                <el-radio-group v-model="form.status">
                   <el-radio label="新建">新建</el-radio>
                   <el-radio label="发布">发布</el-radio>
                 </el-radio-group>
@@ -39,274 +60,329 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="排序" prop="sequence">
-                <el-input v-model="form.sequence" placeholder="请输入排序"></el-input>
+                <el-input
+                  v-model="form.sequence"
+                  placeholder="请输入排序"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="封面" prop="cover">
-                <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,.jpg,.png"
-                        :bindData="{ ownertable: 'sat_sharematerial', ownerid: form.sat_sharematerialid, usetype: 'cover' }"
-                        @onSuccess="onCoverSubmit"></upload>
-                <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png</p>
+                <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,.jpg,.png"
+                  :bindData="{
+                    ownertable: 'sat_sharematerial',
+                    ownerid: form.sat_sharematerialid,
+                    usetype: 'cover',
+                  }"
+                  @onSuccess="onCoverSubmit"
+                ></upload>
+                <p class="info">
+                  注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png
+                </p>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
         <div>
-          <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
-          <addProduct ref="addProductRef" :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData" ></addProduct>
-          <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                          :opwidth="200" :width="true" height="300px">
+          <div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
+            关联产品
+          </div>
+          <addProduct
+            ref="addProductRef"
+            :sat_sharematerialid="form.sat_sharematerialid"
+            style="margin-bottom: 10px"
+            @selectData="selectData"
+          ></addProduct>
+          <tableNewLayout
+            ref="tableRef"
+            :checkbox="false"
+            :custom="true"
+            :data="list"
+            :layout="tablecols"
+            :opwidth="200"
+            :width="true"
+            height="300px"
+          >
             <template v-slot:customcol="scope">
               <div v-if="scope.column.columnname === 'itemclassfullname'">
-                {{scope.column.data.itemclass?scope.column.data.itemclass.length>0?scope.column.data.itemclass[0].itemclassfullname:'':''}}
+                {{
+                  scope.column.data.itemclass
+                    ? scope.column.data.itemclass.length > 0
+                      ? scope.column.data.itemclass[0].itemclassfullname
+                      : ""
+                    : ""
+                }}
               </div>
-              <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+              <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
             </template>
             <template v-slot:opreation="scope">
-              <el-button type="text" @click="delClick(scope.data)">删除</el-button>
+              <el-button type="text" @click="delClick(scope.data)"
+                >删除</el-button
+              >
             </template>
           </tableNewLayout>
-          <div  class="container normal-panel" style="text-align:right">
+          <div class="container normal-panel" style="text-align: right">
             <el-pagination
-                background
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page="currentPage"
-                :page-sizes="[20, 50, 100, 200]"
-                :page-size="20"
-                layout="total,sizes, prev, pager, next, jumper"
-                :total="total">
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total"
+            >
             </el-pagination>
           </div>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">内容</p>
+        <p style="font-size: 14px; margin-top: 10px">内容</p>
         <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
+          <myEditor
+            ref="editor"
+            :content="form.content"
+            :id="form.sat_sharematerialid"
+          ></myEditor>
         </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>
+        <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'
-import tableNewLayout from '@/components/dynamic-newTable/index2'
-import addProduct from '@/WebsiteManagement/caseManage/modules/addProduct'
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import tableNewLayout from "@/components/dynamic-newTable/index2";
+import addProduct from "@/WebsiteManagement/caseManage/modules/addProduct";
 export default {
   name: "add",
-  components:{upload,previewImage,myEditor,tableNewLayout,addProduct},
-  data(){
+  components: { upload, previewImage, myEditor, tableNewLayout, addProduct },
+  data() {
     return {
-      dialogFormVisible:false,
-      tablecols:[],
-      list:[],
-      currentPage:0,
-      total:0,
-      form:{
-        "title": "",
-        "notes": "",
-        "content": "",
-        "sat_sharematerialid":0,
-        "sat_sharematerial_classid":'',
-        "status":"新建",
-        "sequence":'',
-        "image":'',
-        "cover":''
+      dialogFormVisible: false,
+      tablecols: [],
+      list: [],
+      currentPage: 0,
+      total: 0,
+      form: {
+        title: "",
+        notes: "",
+        content: "",
+        sat_sharematerialid: 0,
+        sat_sharematerial_classid: "",
+        status: "新建",
+        sequence: "",
+        image: "",
+        cover: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
-        cover: [
-          { required: true, message: '请上传封面', trigger: 'change' }
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
+        cover: [{ required: true, message: "请上传封面", trigger: "change" }],
       },
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attinfo_attachment:[],
-      productParam:{
-        "id": "20240801134003",
-        "content": {
-          "sat_sharematerialid": '',
-          "pageNumber":1,
-          "pageSize":20,
-          "where": {
-            "condition": ""
-          }
-
-        }
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      attinfo_attachment: [],
+      productParam: {
+        id: "20240801134003",
+        content: {
+          sat_sharematerialid: "",
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+          },
+        },
       },
-      classData:[],
-    }
+      classData: [],
+    };
   },
-  methods:{
-    addBtn(){
-      this.createCase()
-      this.classList()
+  methods: {
+    addBtn() {
+      this.createCase();
+      this.classList();
     },
     /*新建空的案例*/
-    async createCase(){
+    async createCase() {
       const res = await this.$api.requested({
-        "id": "20240801133403",
-        "content": {
-          "title": "",
-          "notes": "",
-          "content": "",
-          "sat_sharematerialid":0,
-          "status":"新建",
-          "sequence":''
-        }
-      })
-      if (res.code == 0){
-        this.tool.showMessage(res,()=>{
-        })
-      }else {
-        this.form.sat_sharematerialid = res.data.sat_sharematerialid
-        this.productParam.content.sat_sharematerialid = res.data.sat_sharematerialid
-        this.productData(this.productParam.content.pageNumber = 1)
+        id: "20240801133403",
+        content: {
+          title: "",
+          notes: "",
+          content: "",
+          sat_sharematerialid: 0,
+          status: "新建",
+          sequence: "",
+        },
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
+      } else {
+        this.form.sat_sharematerialid = res.data.sat_sharematerialid;
+        this.productParam.content.sat_sharematerialid =
+          res.data.sat_sharematerialid;
+        this.productData((this.productParam.content.pageNumber = 1));
       }
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240808105003",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
+        id: "20240808105003",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
     },
-    onSubmit(){
-      this.$refs.form.validate(async (valid)=>{
-        if (!valid) return false
-        this.form.content = this.$refs.editor.html
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.content = this.$refs.editor.html;
         const res = await this.$api.requested({
-          "id": "20240801133403",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$refs.form.resetFields()
-          this.$refs.editor.html = ''
-          this.form.image = ''
-          this.form.cover = ''
-          this.form.sat_sharematerialid = 0
-          this.$emit('onSuccess')
-        })
-      })
+          id: "20240801133403",
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.dialogFormVisible = false;
+          this.$refs.form.resetFields();
+          this.$refs.editor.html = "";
+          this.form.image = "";
+          this.form.cover = "";
+          this.form.sat_sharematerialid = 0;
+          this.$emit("onSuccess");
+        });
+      });
     },
-    async onCancel(){
-      this.dialogFormVisible = false
-      if (this.form.title == '' || this.form.image == {}){
+    async onCancel() {
+      this.dialogFormVisible = false;
+      if (this.form.title == "" || this.form.image == {}) {
         const res = await this.$api.requested({
-          "id":20240801133503,
-          "content": {
-            "sat_sharematerialids":[this.form.sat_sharematerialid]
-          }
-        })
+          id: 20240801133503,
+          content: {
+            sat_sharematerialids: [this.form.sat_sharematerialid],
+          },
+        });
       }
-      this.dialogFormVisible = false
-      this.$refs.form.resetFields()
-      this.$refs.editor.html = ''
-      this.form.image = ''
-      this.form.cover = ''
-      this.form.sat_sharematerialid = 0
+      this.dialogFormVisible = false;
+      this.$refs.form.resetFields();
+      this.$refs.editor.html = "";
+      this.form.image = "";
+      this.form.cover = "";
+      this.form.sat_sharematerialid = 0;
     },
     clearCover() {
-      this.form.cover = null
-      this.image = {}
+      this.form.cover = null;
+      this.image = {};
     },
-    async productData(){
-      const res = await this.$api.requested(this.productParam)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
+    async productData() {
+      const res = await this.$api.requested(this.productParam);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
     },
     async onCoverSubmit(data) {
       const res = await this.$api.requested({
-        "classname": "system.attachment.Attachment",
-        "method": "queryFileLink",
-        "content": {
-          "ownertable": 'sat_sharematerial',
-          "ownerid": this.form.sat_sharematerialid,
-          "usetype": 'cover'//传空返回有所
-        }
-      })
-      this.form.cover = res.data[0].url
-      this.form.image = res.data[0]
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_sharematerial",
+          ownerid: this.form.sat_sharematerialid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      this.form.cover = res.data[0].url;
+      this.form.image = res.data[0];
     },
-    async selectData(data){
+    async selectData(data) {
       const res = await this.$api.requested({
-        "id": "20240801133803",
-        "content": {
-          "sat_sharematerialid": this.form.sat_sharematerialid,
-          "iteminfos":[
+        id: "20240801133803",
+        content: {
+          sat_sharematerialid: this.form.sat_sharematerialid,
+          iteminfos: [
             {
-              "sat_sharematerial_itemsid": 0,
-              "itemid": data.itemid
-            }
-          ]
-        }
-      })
-      this.$nextTick(()=>{
-        this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
-        this.productData(this.productParam.content.pageNumber = 1)
-        this.$refs.addProductRef.listData()
-      })
+              sat_sharematerial_itemsid: 0,
+              itemid: data.itemid,
+            },
+          ],
+        },
+      });
+      this.$nextTick(() => {
+        this.productParam.content.sat_sharematerialid =
+          this.form.sat_sharematerialid;
+        this.productData((this.productParam.content.pageNumber = 1));
+        this.$refs.addProductRef.listData();
+      });
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.productParam.content.pageSize = val
-      this.productData()
+      this.productParam.content.pageSize = val;
+      this.productData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.productParam.content.pageNumber = val
-      this.productData()
+      this.productParam.content.pageNumber = val;
+      this.productData();
     },
-    delClick(data){
-      this.$confirm('确定删除该商品吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then( () => {
-        this.delSuccess(data)
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
+    delClick(data) {
+      this.$confirm("确定删除该商品吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.delSuccess(data);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
-      });
     },
-    async delSuccess(data){
+    async delSuccess(data) {
       const res = await this.$api.requested({
-        "id":20240801133903,
-        "content": {
-          "sat_sharematerial_itemsid":data.sat_sharematerial_itemsid
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.productData()
-      })
-    }
+        id: 20240801133903,
+        content: {
+          sat_sharematerial_itemsid: data.sat_sharematerial_itemsid,
+        },
+      });
+      this.tool.showMessage(res, () => {
+        this.productData();
+      });
+    },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).productTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(
+      this.$route.name
+    ).productTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 116 - 72
src/WebsiteManagement/caseManage/modules/addProduct.vue

@@ -1,39 +1,82 @@
 <template>
   <div>
-    <el-button  :type="disabled?'':'primary'" size="small" @click="addBtn(drawer = true)" :disabled="disabled">添加</el-button>
+    <el-button
+      :type="disabled ? '' : 'primary'"
+      size="small"
+      @click="addBtn((drawer = true))"
+      :disabled="disabled"
+      >添加</el-button
+    >
     <el-drawer
-        title="添加商品"
-        :visible.sync="drawer"
-        direction="rtl"
-        size="60%"
-        append-to-body
-        :show-close="false"
-        @close="closeDrawer">
-      <div class="drawer__panel" style="margin-bottom: 0!important;">
-        <el-input  style="width:200px;margin-bottom: 10px" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+      title="添加商品"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="60%"
+      append-to-body
+      :show-close="false"
+      @close="closeDrawer"
+    >
+      <div class="drawer__panel" style="margin-bottom: 0 !important">
+        <el-input
+          style="width: 200px; margin-bottom: 10px"
+          placeholder="搜索"
+          :suffix-icon="
+            param.content.where.condition
+              ? param.content.where.condition.length > 0
+                ? ''
+                : ''
+              : 'el-icon-search'
+          "
+          v-model="param.content.where.condition"
+          @keyup.native.enter="listData((param.content.pageNumber = 1))"
+          @clear="listData((param.content.pageNumber = 1))"
+          size="small"
+          class="input-with-select inline-16 layout_search__panel"
+          clearable
+        >
         </el-input>
-        <tableNewLayout  ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                        :opwidth="200" :width="true" height="calc(100vh - 200px)" >
+        <tableNewLayout
+          ref="tableRef"
+          :checkbox="false"
+          :custom="true"
+          :data="list"
+          :layout="tablecols"
+          :opwidth="200"
+          :width="true"
+          height="calc(100vh - 200px)"
+        >
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'attinfos'">
-              <previewImage v-if="scope.column.data.attinfos[0]" class="image" :image="scope.column.data.attinfos[0]" :list="scope.column.data.attinfos" :deletebtn="false"></previewImage>
+              <previewImage
+                v-if="scope.column.data.attinfos[0]"
+                class="image"
+                :image="scope.column.data.attinfos[0]"
+                :list="scope.column.data.attinfos"
+                :deletebtn="false"
+              ></previewImage>
             </div>
-            <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+            <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
           </template>
           <template v-slot:opreation="scope">
-            <el-button type="text" @click="selectClick(scope.data)" :loading="loading">选择</el-button>
+            <el-button
+              type="text"
+              @click="selectClick(scope.data)"
+              :loading="loading"
+              >选择</el-button
+            >
           </template>
         </tableNewLayout>
-        <div class="container normal-panel" style="text-align:right">
+        <div class="container normal-panel" style="text-align: right">
           <el-pagination
-              background
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="currentPage"
-              :page-sizes="[50, 100, 150, 200]"
-              :page-size="50"
-              layout="total,sizes, prev, pager, next, jumper"
-              :total="total">
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[50, 100, 150, 200]"
+            :page-size="50"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total"
+          >
           </el-pagination>
         </div>
       </div>
@@ -42,75 +85,76 @@
 </template>
 
 <script>
-import tableNewLayout from '@/components/dynamic-newTable/index2'
-import previewImage from '@/components/previewImage/index'
+import tableNewLayout from "@/components/dynamic-newTable/index2";
+import previewImage from "@/components/previewImage/index";
 export default {
   name: "addProduct",
-  components:{tableNewLayout,previewImage},
-  props:['sat_sharematerialid','disabled'],
-  data(){
+  components: { tableNewLayout, previewImage },
+  props: ["sat_sharematerialid", "disabled"],
+  data() {
     return {
-      drawer:false,
-      tablecols:[],
-      list:[],
-      total:0,
-      currentPage:0,
-      param:{
-        "id": "20240801134103",
-        "content": {
-          "sat_sharematerialid": '',
-          "pageNumber": 1,
-          "pageSize": 50,
-          "where": {
-            "condition": ""
-          }
-
-        }
+      drawer: false,
+      tablecols: [],
+      list: [],
+      total: 0,
+      currentPage: 0,
+      param: {
+        id: "20240801134103",
+        content: {
+          sat_sharematerialid: "",
+          pageNumber: 1,
+          pageSize: 50,
+          where: {
+            condition: "",
+          },
+        },
       },
-      loading:false
-    }
+      loading: false,
+    };
   },
-  methods:{
-    addBtn(){
-      this.param.content.sat_sharematerialid = this.sat_sharematerialid
-      this.param.content.where.condition = ''
-      this.listData(this.param.content.pageNumber = 1)
+  methods: {
+    addBtn() {
+      this.param.content.sat_sharematerialid = this.sat_sharematerialid;
+      this.param.content.where.condition = "";
+      this.listData((this.param.content.pageNumber = 1));
     },
-    async listData(){
-      const res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
-      this.loading = false
+    async listData() {
+      const res = await this.$api.requested(this.param);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
+      this.loading = false;
     },
-    selectClick(data){
-      this.loading = true
-      this.$emit('selectData',data)
+    selectClick(data) {
+      this.loading = true;
+      this.$emit("selectData", data);
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.listData()
+      this.param.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.listData()
+      this.param.content.pageNumber = val;
+      this.listData();
     },
-    closeDrawer(){
-      this.drawer = false
+    closeDrawer() {
+      this.drawer = false;
     },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).addProductTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(
+      this.$route.name
+    ).addProductTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-.image{
+.image {
   height: 38px;
   width: 38px;
-  margin-top:0;
+  margin-top: 0;
 }
 </style>

+ 190 - 140
src/WebsiteManagement/caseManage/modules/classManage.vue

@@ -1,49 +1,101 @@
 <template>
   <div>
-    <el-button  type="primary" size="small" @click="addBtn(drawer = true)">分类管理</el-button>
+    <el-button type="primary" size="small" @click="addBtn((drawer = true))"
+      >分类管理</el-button
+    >
     <el-drawer
-        title="分类管理"
-        :visible.sync="drawer"
-        direction="rtl"
-        size="60%"
-        append-to-body
-        :show-close="false"
-        @close="closeDrawer">
-      <div class="drawer__panel" style="margin-bottom: 0!important;">
-        <el-button style="margin-bottom: 10px" type="primary" size="small" @click="addClass">新增分类</el-button>
-        <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                        :opwidth="200" :width="true" height="calc(100vh - 210px)" @rowSort="rowSort" rowKey="sat_sharematerial_classid">
+      title="分类管理"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="60%"
+      append-to-body
+      :show-close="false"
+      @close="closeDrawer"
+    >
+      <div class="drawer__panel" style="margin-bottom: 0 !important">
+        <el-button
+          style="margin-bottom: 10px"
+          type="primary"
+          size="small"
+          @click="addClass"
+          >新增分类</el-button
+        >
+        <tableNewLayout
+          ref="tableRef"
+          :checkbox="false"
+          :custom="true"
+          :data="list"
+          :layout="tablecols"
+          :opwidth="200"
+          :width="true"
+          height="calc(100vh - 210px)"
+          @rowSort="rowSort"
+          rowKey="sat_sharematerial_classid"
+        >
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'classname'">
-              <el-input v-if="sat_sharematerial === scope.column.data.sat_sharematerial_classid" size="mini" v-model="scope.column.data.classname" placeholder="输入分类名称"></el-input>
+              <el-input
+                v-if="
+                  sat_sharematerial ===
+                  scope.column.data.sat_sharematerial_classid
+                "
+                size="mini"
+                v-model="scope.column.data.classname"
+                placeholder="输入分类名称"
+              ></el-input>
               <p v-else>{{ scope.column.data.classname }}</p>
             </div>
             <div v-else-if="scope.column.columnname === 'isenable'">
               <el-switch
-                  v-model="scope.column.data.isenable"
-                  :active-value="1"
-                  :inactive-value="0"
-                  @change="useChange(scope.column.data)">
+                v-model="scope.column.data.isenable"
+                :active-value="1"
+                :inactive-value="0"
+                @change="useChange(scope.column.data)"
+              >
               </el-switch>
             </div>
-            <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+            <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
           </template>
           <template v-slot:opreation="scope">
-            <el-button v-if="sat_sharematerial === scope.data.sat_sharematerial_classid" size="mini" type="text" class="table-button"  @click="saveDate(scope.data)">保 存</el-button>
-            <el-button v-if="sat_sharematerial !== scope.data.sat_sharematerial_classid" size="mini" type="text" class="table-button"  @click="updateDate(scope.data)" :disabled="scope.data.isenable == 1">编 辑</el-button>
-            <el-button v-if="sat_sharematerial !== scope.data.sat_sharematerial_classid" size="mini" type="text" class="table-button"  @click="delDate(scope.data)" :disabled="scope.data.isenable == 1">删 除</el-button>
+            <el-button
+              v-if="sat_sharematerial === scope.data.sat_sharematerial_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="saveDate(scope.data)"
+              >保 存</el-button
+            >
+            <el-button
+              v-if="sat_sharematerial !== scope.data.sat_sharematerial_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="updateDate(scope.data)"
+              :disabled="scope.data.isenable == 1"
+              >编 辑</el-button
+            >
+            <el-button
+              v-if="sat_sharematerial !== scope.data.sat_sharematerial_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="delDate(scope.data)"
+              :disabled="scope.data.isenable == 1"
+              >删 除</el-button
+            >
           </template>
         </tableNewLayout>
-        <div  class="container normal-panel" style="text-align:right">
+        <div class="container normal-panel" style="text-align: right">
           <el-pagination
-              background
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="currentPage"
-              :page-sizes="[50, 100, 150, 200]"
-              :page-size="50"
-              layout="total,sizes, prev, pager, next, jumper"
-              :total="total">
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[50, 100, 150, 200]"
+            :page-size="50"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total"
+          >
           </el-pagination>
         </div>
       </div>
@@ -52,145 +104,143 @@
 </template>
 
 <script>
-import tableNewLayout from '@/components/dynamic-newTable/index2'
+import tableNewLayout from "@/components/dynamic-newTable/index2";
 export default {
   name: "classManage",
-  components:{tableNewLayout},
-  data(){
+  components: { tableNewLayout },
+  data() {
     return {
-      drawer:false,
-      classData:[],
-      tablecols:[],
-      list:[],
-      sat_sharematerial:0,
-      total:0,
-      currentPage:0,
-      param:{
-        "id": "20240808105003",
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 50,
-          "where":{
-            "condition":""
-          }
-        }
-      }
-    }
+      drawer: false,
+      classData: [],
+      tablecols: [],
+      list: [],
+      sat_sharematerial: 0,
+      total: 0,
+      currentPage: 0,
+      param: {
+        id: "20240808105003",
+        content: {
+          pageNumber: 1,
+          pageSize: 50,
+          where: {
+            condition: "",
+          },
+        },
+      },
+    };
   },
-  methods:{
-    addBtn(){
-      this.listData(this.param.content.pageNumber = 1)
+  methods: {
+    addBtn() {
+      this.listData((this.param.content.pageNumber = 1));
     },
-    addClass(){
-      this.sat_sharematerial = 0
+    addClass() {
+      this.sat_sharematerial = 0;
       this.list.unshift({
-        "sat_sharematerial_classid":0,     //sat_sharematerial_classid<=0时 为新增
-        "classname": "",
-        "sequence":this.list.length + 1,
-        "isenable":true
-      })
+        sat_sharematerial_classid: 0, //sat_sharematerial_classid<=0时 为新增
+        classname: "",
+        sequence: this.list.length + 1,
+        isenable: true,
+      });
     },
-    async saveDate(row){
+    async saveDate(row) {
       const res = await this.$api.requested({
-        "id": "20240808104803",
-        "content": row
-      })
-      this.tool.showMessage(res,()=>{
-        this.sat_sharematerial = 0
-        this.listData()
-      })
+        id: "20240808104803",
+        content: row,
+      });
+      this.tool.showMessage(res, () => {
+        this.sat_sharematerial = 0;
+        this.listData();
+      });
     },
-    async useChange(row){
+    async useChange(row) {
       const res = await this.$api.requested({
-        "id": "20240808104803",
-        "content": {
-          "sat_sharematerial_classid":row.sat_sharematerial_classid,     //sat_sharematerial_classid<=0时 为新增
-          "classname":row.classname,
-          "sequence":row.sequence,
-          "isenable":row.isenable
-        }
-      })
-      if (res.code == 0){
-        this.tool.showMessage(res,()=>{
-
-        })
+        id: "20240808104803",
+        content: {
+          sat_sharematerial_classid: row.sat_sharematerial_classid, //sat_sharematerial_classid<=0时 为新增
+          classname: row.classname,
+          sequence: row.sequence,
+          isenable: row.isenable,
+        },
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
       }
-      this.listData()
-
+      this.listData();
     },
-    updateDate(row){
-      this.sat_sharematerial = row.sat_sharematerial_classid
+    updateDate(row) {
+      this.sat_sharematerial = row.sat_sharematerial_classid;
     },
-    delDate(row){
-      this.$confirm('确定删除当前分类吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async() => {
-        const res = await this.$api.requested({
-          "id": "20240808104903",
-          "content": {
-            "sat_sharematerial_classid":row.sat_sharematerial_classid
-          }
-        })
-        this.tool.showMessage(res,()=>{
-          this.listData()
+    delDate(row) {
+      this.$confirm("确定删除当前分类吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await this.$api.requested({
+            id: "20240808104903",
+            content: {
+              sat_sharematerial_classid: row.sat_sharematerial_classid,
+            },
+          });
+          this.tool.showMessage(res, () => {
+            this.listData();
+          });
         })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
-      });
     },
-    async listData(){
-      const res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
-      console.log(this.list,'list')
+    async listData() {
+      const res = await this.$api.requested(this.param);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
+      console.log(this.list, "list");
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.listData()
+      this.param.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.listData()
+      this.param.content.pageNumber = val;
+      this.listData();
     },
-    closeDrawer(){
-      this.drawer = false
+    closeDrawer() {
+      this.drawer = false;
     },
-    rowSort(data){
-      data.forEach((item,index)=>{
-        console.log(item.classname,item.index,item.sequence,index)
-        item.sequence = index
-      })
-      this.$nextTick(async()=>{
-        let sequencesorts = data.map(item=>{
+    rowSort(data) {
+      data.forEach((item, index) => {
+        console.log(item.classname, item.index, item.sequence, index);
+        item.sequence = index;
+      });
+      this.$nextTick(async () => {
+        let sequencesorts = data.map((item) => {
           return {
-            ownerid:item.sat_sharematerial_classid,
-            sequence:item.sequence
-          }
-        })
+            ownerid: item.sat_sharematerial_classid,
+            sequence: item.sequence,
+          };
+        });
         const res = await this.$api.requested({
-          id:20221201134901,
-          content:{
-            ownertable:'sat_sharematerial_class',
-            sequencesorts:sequencesorts
-          }
-        })
-      })
-    }
+          id: 20221201134901,
+          content: {
+            ownertable: "sat_sharematerial_class",
+            sequencesorts: sequencesorts,
+          },
+        });
+      });
+    },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).classTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(this.$route.name).classTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 245 - 163
src/WebsiteManagement/caseManage/modules/detailInfo.vue

@@ -1,40 +1,74 @@
 <template>
   <div>
-    <el-button size="small" type="text" @click="detailBtn(dialogFormVisible = true)">详情</el-button>
+    <el-button
+      size="small"
+      type="text"
+      @click="detailBtn((dialogFormVisible = true))"
+      >详情</el-button
+    >
     <el-drawer
-        title="案例管理"
-        :visible.sync="dialogFormVisible"
-        size="60%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        :with-header="false"
-        @close="onClose">
-      <div style="display: flex;justify-content: space-between;padding: 10px">
+      title="案例管理"
+      :visible.sync="dialogFormVisible"
+      size="60%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      :with-header="false"
+      @close="onClose"
+    >
+      <div style="display: flex; justify-content: space-between; padding: 10px">
+        <div>案例管理</div>
         <div>
-          案例管理
-        </div>
-        <div>
-          <edit v-if="tool.checkAuth($route.name,'update')" :sat_sharematerialid="data.sat_sharematerialid" @editSuccess="detailBtn" class="inline-16" :disabled="form.status == '发布'"></edit>
-          <el-button v-if="tool.checkAuth($route.name,'delete')" :type="form.status == '发布'?'':'primary'" size="small" @click="delBtn" :disabled="form.status == '发布'">删除</el-button>
+          <edit
+            v-if="tool.checkAuth($route.name, 'update')"
+            :sat_sharematerialid="data.sat_sharematerialid"
+            @editSuccess="detailBtn"
+            class="inline-16"
+            :disabled="form.status == '发布'"
+          ></edit>
+          <el-button
+            v-if="tool.checkAuth($route.name, 'delete')"
+            :type="form.status == '发布' ? '' : 'primary'"
+            size="small"
+            @click="delBtn"
+            :disabled="form.status == '发布'"
+            >删除</el-button
+          >
         </div>
       </div>
-      <div class="drawer__panel" style="margin-bottom: 0px !important;">
+      <div class="drawer__panel" style="margin-bottom: 0px !important">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="top">
+          <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="请输入标题" disabled></el-input>
+                <el-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_notice_classid">
-                <el-select v-model="form.sat_sharematerial_classid" clearable placeholder="请选择分类" style="width: 100%" disabled>
+                <el-select
+                  v-model="form.sat_sharematerial_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                  disabled
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_sharematerial_classid"
-                      :label="item.classname"
-                      :value="item.sat_sharematerial_classid">
+                    v-for="item in classData"
+                    :key="item.sat_sharematerial_classid"
+                    :label="item.classname"
+                    :value="item.sat_sharematerial_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -49,52 +83,94 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="排序" prop="sequence">
-                <el-input v-model="form.sequence" placeholder="请输入排序" disabled></el-input>
+                <el-input
+                  v-model="form.sequence"
+                  placeholder="请输入排序"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="封面" prop="cover">
-                <previewImage v-if="form.cover" style="width:256px" :image="form.image"
-                              ></previewImage>
-                <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG"
-                        :bindData="{ ownertable: 'sat_sharematerial', ownerid: form.sat_sharematerialid, usetype: 'cover' }"
-                       ></upload>
-                <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
+                <previewImage
+                  v-if="form.cover"
+                  style="width: 256px"
+                  :image="form.image"
+                ></previewImage>
+                <upload
+                  v-else
+                  btntype="image"
+                  :folderid="folderid"
+                  accept=".JPG,.PNG"
+                  :bindData="{
+                    ownertable: 'sat_sharematerial',
+                    ownerid: form.sat_sharematerialid,
+                    usetype: 'cover',
+                  }"
+                ></upload>
+                <p class="info">
+                  注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG
+                </p>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
         <div>
-          <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
-          <addProduct :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" :disabled="true"></addProduct>
-          <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                          :opwidth="200" :width="true" height="300px">
+          <div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
+            关联产品
+          </div>
+          <addProduct
+            :sat_sharematerialid="form.sat_sharematerialid"
+            style="margin-bottom: 10px"
+            :disabled="true"
+          ></addProduct>
+          <tableNewLayout
+            ref="tableRef"
+            :checkbox="false"
+            :custom="true"
+            :data="list"
+            :layout="tablecols"
+            :opwidth="200"
+            :width="true"
+            height="300px"
+          >
             <template v-slot:customcol="scope">
               <div v-if="scope.column.columnname === 'itemclassfullname'">
-                {{scope.column.data.itemclass?scope.column.data.itemclass.length>0?scope.column.data.itemclass[0].itemclassfullname:'':''}}
+                {{
+                  scope.column.data.itemclass
+                    ? scope.column.data.itemclass.length > 0
+                      ? scope.column.data.itemclass[0].itemclassfullname
+                      : ""
+                    : ""
+                }}
               </div>
-              <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+              <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
             </template>
             <template v-slot:opreation="scope">
               <el-button type="text" disabled>删除</el-button>
             </template>
           </tableNewLayout>
-          <div  class="container normal-panel" style="text-align:right">
+          <div class="container normal-panel" style="text-align: right">
             <el-pagination
-                background
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page="currentPage"
-                :page-sizes="[20, 50, 100, 200]"
-                :page-size="20"
-                layout="total,sizes, prev, pager, next, jumper"
-                :total="total">
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total"
+            >
             </el-pagination>
           </div>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">内容</p>
+        <p style="font-size: 14px; margin-top: 10px">内容</p>
         <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
+          <myEditor
+            ref="editor"
+            :content="form.content"
+            :id="form.sat_sharematerialid"
+          ></myEditor>
         </div>
       </div>
     </el-drawer>
@@ -102,154 +178,160 @@
 </template>
 
 <script>
-import edit from './edit'
-import upload from '@/components/upload/hw_obs_upload.vue'
-import previewImage from '@/components/previewImage/index.vue'
-import myEditor from '@/components/my-editor/Editor.vue'
-import tableNewLayout from '@/components/dynamic-newTable/index2'
-import addProduct from '@/WebsiteManagement/caseManage/modules/addProduct'
+import edit from "./edit";
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import tableNewLayout from "@/components/dynamic-newTable/index2";
+import addProduct from "@/WebsiteManagement/caseManage/modules/addProduct";
 export default {
   name: "detailInfo",
-  props:['data'],
-  components:{edit,upload,previewImage,myEditor,tableNewLayout,addProduct},
-  data(){
+  props: ["data"],
+  components: {
+    edit,
+    upload,
+    previewImage,
+    myEditor,
+    tableNewLayout,
+    addProduct,
+  },
+  data() {
     return {
-      dialogFormVisible:false,
-      tablecols:[],
-      list:[],
-      currentPage:0,
-      total:0,
-      form:{
-        "title": "",
-        "notes": "",
-        "content": "",
-        "sat_sharematerialid":'',
-        "status":"",
-        "sequence":'',
-        "image":'',
-        "cover":''
+      dialogFormVisible: false,
+      tablecols: [],
+      list: [],
+      currentPage: 0,
+      total: 0,
+      form: {
+        title: "",
+        notes: "",
+        content: "",
+        sat_sharematerialid: "",
+        status: "",
+        sequence: "",
+        image: "",
+        cover: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
-        cover: [
-          { required: true, message: '请上传封面', trigger: 'change' }
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
+        cover: [{ required: true, message: "请上传封面", trigger: "change" }],
       },
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      productParam:{
-        "id": "20240801134003",
-        "content": {
-          "sat_sharematerialid": '',
-          "pageNumber":1,
-          "pageSize":20,
-          "where": {
-            "condition": ""
-          }
-
-        }
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      productParam: {
+        id: "20240801134003",
+        content: {
+          sat_sharematerialid: "",
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+          },
+        },
       },
-      classData:[]
-    }
+      classData: [],
+    };
   },
-  methods:{
-    async detailBtn(){
+  methods: {
+    async detailBtn() {
       const res = await this.$api.requested({
-        "id":20240801133703,
-        "content": {
-          "sat_sharematerialid":this.data.sat_sharematerialid
-        }
-      })
-      if (res.code == 0){
-        this.tool.showMessage(res,()=>{})
-      }else {
-        this.form = Object.assign({},this.form,res.data)
-        this.$refs.editor.html = res.data.content
-        this.queryFileLink()
-        this.productParam.content.sat_sharematerialid = res.data.sat_sharematerialid
-        this.productData(this.productParam.content.pageNumber = 1)
-        this.classList()
+        id: 20240801133703,
+        content: {
+          sat_sharematerialid: this.data.sat_sharematerialid,
+        },
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
+      } else {
+        this.form = Object.assign({}, this.form, res.data);
+        this.$refs.editor.html = res.data.content;
+        this.queryFileLink();
+        this.productParam.content.sat_sharematerialid =
+          res.data.sat_sharematerialid;
+        this.productData((this.productParam.content.pageNumber = 1));
+        this.classList();
       }
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240808105003",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
+        id: "20240808105003",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
     },
     // 获取封面信息
     async queryFileLink() {
-      this.dialogEditVisible = true
+      this.dialogEditVisible = true;
       const res = await this.$api.requested({
-        "classname": "system.attachment.Attachment",
-        "method": "queryFileLink",
-        "content": {
-          "ownertable": 'sat_sharematerial',
-          "ownerid": this.form.sat_sharematerialid,
-          "usetype": 'cover'//传空返回有所
-        }
-      })
-      this.form.image = res.data[0]
-      this.form.cover = res.data[0].url
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_sharematerial",
+          ownerid: this.form.sat_sharematerialid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      this.form.image = res.data[0];
+      this.form.cover = res.data[0].url;
       /*res.data[0] ? this.image = res.data[0].url : this.image = { url: '' }*/
     },
-    onClose(){
-      this.$emit('onSuccess')
+    onClose() {
+      this.$emit("onSuccess");
     },
-    async delBtn(){
-      this.$confirm('确定删除当前案例吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async() => {
-        const res = await this.$api.requested({
-          "id":20240801133503,
-          "content": {
-            "sat_sharematerialids":[this.data.sat_sharematerialid]
-          }
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$emit('onSuccess')
+    async delBtn() {
+      this.$confirm("确定删除当前案例吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await this.$api.requested({
+            id: 20240801133503,
+            content: {
+              sat_sharematerialids: [this.data.sat_sharematerialid],
+            },
+          });
+          this.tool.showMessage(res, () => {
+            this.dialogFormVisible = false;
+            this.$emit("onSuccess");
+          });
         })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
-      });
     },
-    async productData(){
-      const res = await this.$api.requested(this.productParam)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
+    async productData() {
+      const res = await this.$api.requested(this.productParam);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.productParam.content.pageSize = val
-      this.productData()
+      this.productParam.content.pageSize = val;
+      this.productData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.productParam.content.pageNumber = val
-      this.productData()
+      this.productParam.content.pageNumber = val;
+      this.productData();
     },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).productTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(
+      this.$route.name
+    ).productTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 293 - 216
src/WebsiteManagement/caseManage/modules/edit.vue

@@ -1,37 +1,59 @@
 <template>
   <div>
-    <el-button size="small" :type="disabled?'':'primary'" @click="editBtn(dialogFormVisible = true)" :disabled="disabled">编 辑</el-button>
+    <el-button
+      size="small"
+      :type="disabled ? '' : 'primary'"
+      @click="editBtn((dialogFormVisible = true))"
+      :disabled="disabled"
+      >编 辑</el-button
+    >
     <el-drawer
-        title="编辑案例"
-        :visible.sync="dialogFormVisible"
-        size="70%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onCancel">
-      <div class="drawer__panel" >
+      title="编辑案例"
+      :visible.sync="dialogFormVisible"
+      size="70%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      @close="onCancel"
+    >
+      <div class="drawer__panel">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="top">
+          <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-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_notice_classid">
-                <el-select v-model="form.sat_sharematerial_classid" clearable placeholder="请选择分类" style="width: 100%">
+                <el-select
+                  v-model="form.sat_sharematerial_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_sharematerial_classid"
-                      :label="item.classname"
-                      :value="item.sat_sharematerial_classid">
+                    v-for="item in classData"
+                    :key="item.sat_sharematerial_classid"
+                    :label="item.classname"
+                    :value="item.sat_sharematerial_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="状态" prop="status">
-                <el-radio-group v-model="form.status" >
+                <el-radio-group v-model="form.status">
                   <el-radio label="新建">新建</el-radio>
                   <el-radio label="发布">发布</el-radio>
                 </el-radio-group>
@@ -39,278 +61,333 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="排序" prop="sequence">
-                <el-input v-model="form.sequence" placeholder="请输入排序"></el-input>
+                <el-input
+                  v-model="form.sequence"
+                  placeholder="请输入排序"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="封面" prop="cover">
-                <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,.jpg,.png"
-                        :bindData="{ ownertable: 'sat_sharematerial', ownerid: form.sat_sharematerialid, usetype: 'cover' }"
-                        @onSuccess="onCoverSubmit"></upload>
-                <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png</p>
+                <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,.jpg,.png"
+                  :bindData="{
+                    ownertable: 'sat_sharematerial',
+                    ownerid: form.sat_sharematerialid,
+                    usetype: 'cover',
+                  }"
+                  @onSuccess="onCoverSubmit"
+                ></upload>
+                <p class="info">
+                  注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png
+                </p>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
         <div>
-          <div style="font-size: 16px;font-weight: bold;margin-bottom: 10px">关联产品</div>
-          <addProduct ref="addProductRef" :sat_sharematerialid="form.sat_sharematerialid" style="margin-bottom: 10px" @selectData="selectData"></addProduct>
-          <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                          :opwidth="200" :width="true" height="300px">
+          <div style="font-size: 16px; font-weight: bold; margin-bottom: 10px">
+            关联产品
+          </div>
+          <addProduct
+            ref="addProductRef"
+            :sat_sharematerialid="form.sat_sharematerialid"
+            style="margin-bottom: 10px"
+            @selectData="selectData"
+          ></addProduct>
+          <tableNewLayout
+            ref="tableRef"
+            :checkbox="false"
+            :custom="true"
+            :data="list"
+            :layout="tablecols"
+            :opwidth="200"
+            :width="true"
+            height="300px"
+          >
             <template v-slot:customcol="scope">
               <div v-if="scope.column.columnname === 'itemclassfullname'">
-                {{scope.column.data.itemclass?scope.column.data.itemclass.length>0?scope.column.data.itemclass[0].itemclassfullname:'':''}}
+                {{
+                  scope.column.data.itemclass
+                    ? scope.column.data.itemclass.length > 0
+                      ? scope.column.data.itemclass[0].itemclassfullname
+                      : ""
+                    : ""
+                }}
               </div>
-              <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+              <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
             </template>
             <template v-slot:opreation="scope">
-              <el-button type="text" @click="delClick(scope.data)">删除</el-button>
+              <el-button type="text" @click="delClick(scope.data)"
+                >删除</el-button
+              >
             </template>
           </tableNewLayout>
-          <div  class="container normal-panel" style="text-align:right">
+          <div class="container normal-panel" style="text-align: right">
             <el-pagination
-                background
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page="currentPage"
-                :page-sizes="[20, 50, 100, 200]"
-                :page-size="20"
-                layout="total,sizes, prev, pager, next, jumper"
-                :total="total">
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total"
+            >
             </el-pagination>
           </div>
-          <p style="font-size: 14px;margin-top: 10px">内容</p>
+          <p style="font-size: 14px; margin-top: 10px">内容</p>
           <div style="margin-top: 10px">
-            <myEditor ref="editor" :content="form.content" :id="form.sat_sharematerialid"></myEditor>
+            <myEditor
+              ref="editor"
+              :content="form.content"
+              :id="form.sat_sharematerialid"
+            ></myEditor>
           </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>
+        <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'
-import tableNewLayout from '@/components/dynamic-newTable/index2'
-import addProduct from '@/WebsiteManagement/caseManage/modules/addProduct'
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import tableNewLayout from "@/components/dynamic-newTable/index2";
+import addProduct from "@/WebsiteManagement/caseManage/modules/addProduct";
 export default {
   name: "edit",
-  components:{upload,previewImage,myEditor,tableNewLayout,addProduct},
-  props:['sat_sharematerialid','disabled'],
-  data(){
+  components: { upload, previewImage, myEditor, tableNewLayout, addProduct },
+  props: ["sat_sharematerialid", "disabled"],
+  data() {
     return {
-      dialogFormVisible:false,
-      tablecols:[],
-      list:[],
-      currentPage:0,
-      total:0,
-      form:{
-        "title": "",
-        "notes": "",
-        "content": "",
-        "sat_sharematerialid":0,
-        "status":"新建",
-        "sequence":'',
-        "image":'',
-        "cover":''
+      dialogFormVisible: false,
+      tablecols: [],
+      list: [],
+      currentPage: 0,
+      total: 0,
+      form: {
+        title: "",
+        notes: "",
+        content: "",
+        sat_sharematerialid: 0,
+        status: "新建",
+        sequence: "",
+        image: "",
+        cover: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
-        cover: [
-          { required: true, message: '请上传封面', trigger: 'change' }
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
+        cover: [{ required: true, message: "请上传封面", trigger: "change" }],
       },
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attinfo_attachment:[],
-      productParam:{
-        "id": "20240801134003",
-        "content": {
-          "sat_sharematerialid": '',
-          "pageNumber":1,
-          "pageSize":20,
-          "where": {
-            "condition": ""
-          }
-
-        }
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      attinfo_attachment: [],
+      productParam: {
+        id: "20240801134003",
+        content: {
+          sat_sharematerialid: "",
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+          },
+        },
       },
-      classData:[]
-    }
+      classData: [],
+    };
   },
-  methods:{
-    editBtn(){
-      this.detailInfo()
-      this.classList()
+  methods: {
+    editBtn() {
+      this.detailInfo();
+      this.classList();
     },
-    async detailInfo(){
+    async detailInfo() {
       const res = await this.$api.requested({
-        "id":20240801133703,
-        "content": {
-          "sat_sharematerialid":this.sat_sharematerialid
-        }
-      })
-      if (res.code == 0){
-        this.tool.showMessage(res,()=>{})
-      }else {
-        this.form = Object.assign({},this.form,res.data)
-        this.$refs.editor.html = res.data.content
-        this.queryFileLink()
-        this.productParam.content.sat_sharematerialid = res.data.sat_sharematerialid
-        this.productData(this.productParam.content.pageNumber = 1)
+        id: 20240801133703,
+        content: {
+          sat_sharematerialid: this.sat_sharematerialid,
+        },
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
+      } else {
+        this.form = Object.assign({}, this.form, res.data);
+        this.$refs.editor.html = res.data.content;
+        this.queryFileLink();
+        this.productParam.content.sat_sharematerialid =
+          res.data.sat_sharematerialid;
+        this.productData((this.productParam.content.pageNumber = 1));
       }
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240808105003",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
+        id: "20240808105003",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
     },
     // 获取封面信息
     async queryFileLink() {
-      this.dialogEditVisible = true
+      this.dialogEditVisible = true;
       const res = await this.$api.requested({
-        "classname": "system.attachment.Attachment",
-        "method": "queryFileLink",
-        "content": {
-          "ownertable": 'sat_sharematerial',
-          "ownerid": this.form.sat_sharematerialid,
-          "usetype": 'cover'//传空返回有所
-        }
-      })
-      this.form.image = res.data[0]
-      this.form.cover = res.data[0].url
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_sharematerial",
+          ownerid: this.form.sat_sharematerialid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      this.form.image = res.data[0];
+      this.form.cover = res.data[0].url;
       /*res.data[0] ? this.image = res.data[0].url : this.image = { url: '' }*/
     },
-    onSubmit(){
-      this.$refs.form.validate(async (valid)=>{
-        if (!valid) return false
-        this.form.content = this.$refs.editor.html
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.content = this.$refs.editor.html;
         const res = await this.$api.requested({
-          "id": "20240801133403",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$refs.form.resetFields()
-          this.$refs.editor.html = ''
-          this.form.image = ''
-          this.form.cover = ''
-          this.form.sat_sharematerialid = 0
-          this.$emit('editSuccess')
-        })
-      })
+          id: "20240801133403",
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.dialogFormVisible = false;
+          this.$refs.form.resetFields();
+          this.$refs.editor.html = "";
+          this.form.image = "";
+          this.form.cover = "";
+          this.form.sat_sharematerialid = 0;
+          this.$emit("editSuccess");
+        });
+      });
     },
-    async onCancel(){
-      this.dialogFormVisible = false
-      this.$refs.form.resetFields()
-      this.$refs.editor.html = ''
-      this.form.image = ''
-      this.form.cover = ''
-      this.form.sat_sharematerialid = 0
-      this.$emit('editSuccess')
+    async onCancel() {
+      this.dialogFormVisible = false;
+      this.$refs.form.resetFields();
+      this.$refs.editor.html = "";
+      this.form.image = "";
+      this.form.cover = "";
+      this.form.sat_sharematerialid = 0;
+      this.$emit("editSuccess");
     },
     clearCover() {
-      this.form.cover = null
-      this.image = {}
+      this.form.cover = null;
+      this.image = {};
     },
-    async productData(){
-      const res = await this.$api.requested(this.productParam)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
+    async productData() {
+      const res = await this.$api.requested(this.productParam);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
     },
     async onCoverSubmit(data) {
       const res = await this.$api.requested({
-        "classname": "system.attachment.Attachment",
-        "method": "queryFileLink",
-        "content": {
-          "ownertable": 'sat_sharematerial',
-          "ownerid": this.form.sat_sharematerialid,
-          "usetype": 'cover'//传空返回有所
-        }
-      })
-      this.form.cover = res.data[0].url
-      this.form.image = res.data[0]
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_sharematerial",
+          ownerid: this.form.sat_sharematerialid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      this.form.cover = res.data[0].url;
+      this.form.image = res.data[0];
     },
-    async selectData(data){
+    async selectData(data) {
       const res = await this.$api.requested({
-        "id": "20240801133803",
-        "content": {
-          "sat_sharematerialid": this.form.sat_sharematerialid,
-          "iteminfos":[
+        id: "20240801133803",
+        content: {
+          sat_sharematerialid: this.form.sat_sharematerialid,
+          iteminfos: [
             {
-              "sat_sharematerial_itemsid": 0,
-              "itemid": data.itemid
-            }
-          ]
-
-        }
-      })
-      this.$nextTick(()=>{
-        this.productParam.content.sat_sharematerialid = this.form.sat_sharematerialid
-        this.productData(this.productParam.content.pageNumber = 1)
-        this.$refs.addProductRef.listData()
-      })
+              sat_sharematerial_itemsid: 0,
+              itemid: data.itemid,
+            },
+          ],
+        },
+      });
+      this.$nextTick(() => {
+        this.productParam.content.sat_sharematerialid =
+          this.form.sat_sharematerialid;
+        this.productData((this.productParam.content.pageNumber = 1));
+        this.$refs.addProductRef.listData();
+      });
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.productParam.content.pageSize = val
-      this.productData()
+      this.productParam.content.pageSize = val;
+      this.productData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.productParam.content.pageNumber = val
-      this.productData()
+      this.productParam.content.pageNumber = val;
+      this.productData();
     },
-    delClick(data){
-      this.$confirm('确定删除该商品吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then( () => {
-        this.delSuccess(data)
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
+    delClick(data) {
+      this.$confirm("确定删除该商品吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.delSuccess(data);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
-      });
     },
-    async delSuccess(data){
+    async delSuccess(data) {
       const res = await this.$api.requested({
-        "id":20240801133903,
-        "content": {
-          "sat_sharematerial_itemsid":data.sat_sharematerial_itemsid
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.productData()
-      })
-    }
+        id: 20240801133903,
+        content: {
+          sat_sharematerial_itemsid: data.sat_sharematerial_itemsid,
+        },
+      });
+      this.tool.showMessage(res, () => {
+        this.productData();
+      });
+    },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).productTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(
+      this.$route.name
+    ).productTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 191 - 98
src/WebsiteManagement/caseManage/modules/hw_obs_upload.vue

@@ -1,26 +1,69 @@
 <template>
   <div>
     <!-- 缩略图类型 -->
-    <div v-if="btntype === 'smallimage'" @click="dialogUploadVisible = true" class="small-image-upload-btn">
+    <div
+      v-if="btntype === 'smallimage'"
+      @click="dialogUploadVisible = true"
+      class="small-image-upload-btn"
+    >
       <i class="el-icon-plus"></i>
     </div>
     <!-- 图片类型 -->
-    <div v-else-if="btntype === 'image'" @click="dialogUploadVisible = true" class="image-upload-btn" :style="disabled?'pointerEvents: none':'pointerEvents: auto'">
+    <div
+      v-else-if="btntype === 'image'"
+      @click="dialogUploadVisible = true"
+      class="image-upload-btn"
+      :style="disabled ? 'pointerEvents: none' : 'pointerEvents: auto'"
+    >
       <i class="el-icon-plus"></i>
     </div>
     <!-- 宽图类型 -->
-    <div v-else-if="btntype === 'limage'" @click="dialogUploadVisible = true" class="image-upload-btn limage-upload-btn">
+    <div
+      v-else-if="btntype === 'limage'"
+      @click="dialogUploadVisible = true"
+      class="image-upload-btn limage-upload-btn"
+    >
       <i class="el-icon-plus"></i>
     </div>
     <!-- 图标类型 -->
-    <div v-else-if="btntype === 'icon'" >
-      <el-button icon="el-icon-paperclip" type="text" size="mini" @click="dialogUploadVisible = true" :disabled="status === '已结案' || status === '已失败' || disabled">附件上传</el-button>
+    <div v-else-if="btntype === 'icon'">
+      <el-button
+        icon="el-icon-paperclip"
+        type="text"
+        size="mini"
+        @click="dialogUploadVisible = true"
+        :disabled="status === '已结案' || status === '已失败' || disabled"
+        >附件上传</el-button
+      >
     </div>
     <!-- 按钮类型 -->
-    <el-button v-else :type="status === '已结案' || status === '已失败' || disabled?'':'primary'" size="small" @click="dialogUploadVisible = true" icon="el-icon-upload" :disabled="status === '已结案' || status === '已失败' || disabled">上 传</el-button>
-    <el-dialog title="文件上传" :visible.sync="dialogUploadVisible" width="500px" append-to-body :close-on-click-modal="false" :before-close="clearFiles">
-      <selectMedia v-if = "!hidemediastock" @onShow="onShow" :accept="accept" :bindData="bindData" @onBindSuccess="onBindSuccess"></selectMedia>
-<!--      <el-upload
+    <el-button
+      v-else
+      :type="
+        status === '已结案' || status === '已失败' || disabled ? '' : 'primary'
+      "
+      size="small"
+      @click="dialogUploadVisible = true"
+      icon="el-icon-upload"
+      :disabled="status === '已结案' || status === '已失败' || disabled"
+      >上 传</el-button
+    >
+    <el-dialog
+      title="文件上传"
+      :visible.sync="dialogUploadVisible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+      :before-close="clearFiles"
+    >
+      <selectMedia
+        v-if="!hidemediastock"
+        @onShow="onShow"
+        :accept="accept"
+        :bindData="bindData"
+        @onBindSuccess="onBindSuccess"
+      ></selectMedia>
+      <!--      <el-upload
           class="upload-demo"
           drag
           action="#"
@@ -30,7 +73,7 @@
         <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
       </el-upload>-->
       <el-upload
-        style="width:100%"
+        style="width: 100%"
         ref="my-upload"
         class="upload-demo"
         :accept="accept"
@@ -39,27 +82,65 @@
         :show-file-list="false"
         :on-change="handleChange"
         drag
-        multiple>
+        multiple
+      >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
       </el-upload>
       <div class="progress_panel" v-for="file in filelist" :key="file.uid">
-        <img v-if="file.type === 'DOC' || file.type === 'DOCX'" width="30" src="../../../assets/file_icons/word.png"
-          alt="">
-        <img v-else-if="file.type === 'PDF'" width="30" src="../../../assets/file_icons/PDF.png" alt="">
-        <img v-else-if="file.type === 'MP4' || file.type === 'AVI'" width="30" src="../../../assets/file_icons/video.png"
-          alt="">
-        <img v-else-if="file.type === 'XLS' || file.type === 'XLSX'" width="30" src="../../../assets/file_icons/excel.png"
-          alt="">
-        <img v-else-if="file.type === 'PNG' || file.type === 'JPG'|| file.type === 'JPEG'" width="30"
-          src="../../../assets/file_icons/image.png" alt="">
-        <img v-else-if="file.type === 'PPT' || file.type === 'PPTX'" width="30" src="../../../assets/file_icons/PPT.png"
-          alt="">
-        <img v-else width="30" src="../../../assets/file_icons/unknow.png" alt="">
+        <img
+          v-if="file.type === 'DOC' || file.type === 'DOCX'"
+          width="30"
+          src="../../../assets/file_icons/word.png"
+          alt=""
+        />
+        <img
+          v-else-if="file.type === 'PDF'"
+          width="30"
+          src="../../../assets/file_icons/PDF.png"
+          alt=""
+        />
+        <img
+          v-else-if="file.type === 'MP4' || file.type === 'AVI'"
+          width="30"
+          src="../../../assets/file_icons/video.png"
+          alt=""
+        />
+        <img
+          v-else-if="file.type === 'XLS' || file.type === 'XLSX'"
+          width="30"
+          src="../../../assets/file_icons/excel.png"
+          alt=""
+        />
+        <img
+          v-else-if="
+            file.type === 'PNG' || file.type === 'JPG' || file.type === 'JPEG'
+          "
+          width="30"
+          src="../../../assets/file_icons/image.png"
+          alt=""
+        />
+        <img
+          v-else-if="file.type === 'PPT' || file.type === 'PPTX'"
+          width="30"
+          src="../../../assets/file_icons/PPT.png"
+          alt=""
+        />
+        <img
+          v-else
+          width="30"
+          src="../../../assets/file_icons/unknow.png"
+          alt=""
+        />
         <div>
-          <p v-if="file.progress === 100" style="float:right"><span style="color:#67C23A">●</span>上传成功</p>
-          <p>{{file.raw?file.raw.name:'暂无上传文件'}}</p>
-          <el-progress :percentage="file.progress" :show-text="false"></el-progress>
+          <p v-if="file.progress === 100" style="float: right">
+            <span style="color: #67c23a">●</span>上传成功
+          </p>
+          <p>{{ file.raw ? file.raw.name : "暂无上传文件" }}</p>
+          <el-progress
+            :percentage="file.progress"
+            :show-text="false"
+          ></el-progress>
         </div>
       </div>
     </el-dialog>
@@ -67,7 +148,7 @@
 </template>
 
 <script>
-import selectMedia from '@/components/uploadBindMediaStock/index.vue'
+import selectMedia from "@/components/uploadBindMediaStock/index.vue";
 export default {
   /*
     folderid:文件夹id; 必填
@@ -76,108 +157,120 @@ export default {
     bindData:附件上传成功后对应需要绑定的数据信息,
     hidemediastock:是否隐藏媒体库选择
   */
-  props:['folderid','btntype','accept','bindData','hidemediastock','status','disabled'],
-  components:{
-    selectMedia
+  props: [
+    "folderid",
+    "btntype",
+    "accept",
+    "bindData",
+    "hidemediastock",
+    "status",
+    "disabled",
+  ],
+  components: {
+    selectMedia,
   },
-  data () {
+  data() {
     return {
       dialogUploadVisible: false,
       params: {
-        "classname": "system.attachment.huawei.OBS",
-        "method": "getFileName",
-        "content": {
-          "filename": '',
-          "filetype": '',
-          "parentid": ""//归属文件夹ID
-        }
+        classname: "system.attachment.huawei.OBS",
+        method: "getFileName",
+        content: {
+          filename: "",
+          filetype: "",
+          parentid: "", //归属文件夹ID
+        },
       },
       file: {},
       filelist: [],
-      count:0
-    }
+      count: 0,
+    };
   },
   methods: {
-    handleChange (file, filelist) {
-      console.log('22222拖拽')
-      this.filelist = filelist
+    handleChange(file, filelist) {
+      console.log("22222拖拽");
+      this.filelist = filelist;
       var index = file.raw.name.lastIndexOf(".");
       var ext = file.name.substr(index + 1);
-      this.params.content.filename = file.raw.name
-      this.params.content.filetype = ext
-      this.getUploadUrl(file, ext)
+      this.params.content.filename = file.raw.name;
+      this.params.content.filetype = ext;
+      this.getUploadUrl(file, ext);
     },
 
     // 获取华为云上传地址
-    async getUploadUrl (file, ext) {
-      this.params.content.parentid = this.folderid
-      const res = await this.$api.requested(this.params)
-      let url = res.data.uploadurl
-      let obsfilename = res.data.serialfilename
+    async getUploadUrl(file, ext) {
+      this.params.content.parentid = this.folderid;
+      const res = await this.$api.requested(this.params);
+      let url = res.data.uploadurl;
+      let obsfilename = res.data.serialfilename;
 
-      this.upoladFileToServer(url, file, ext, obsfilename)
+      this.upoladFileToServer(url, file, ext, obsfilename);
     },
 
     // 上传到华为云
-    async upoladFileToServer (url, file, ext, obsfilename) {
-      console.log(file)
-      let THIS = this
+    async upoladFileToServer(url, file, ext, obsfilename) {
+      console.log(file);
+      let THIS = this;
       let config = {
-        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : ext === 'svg'?{ 'Content-Type': 'image/svg+xml' } : { 'Content-Type': 'application/octet-stream' },
+        headers:
+          ext === "pdf"
+            ? { "Content-Type": "application/pdf" }
+            : ext === "svg"
+            ? { "Content-Type": "image/svg+xml" }
+            : { "Content-Type": "application/octet-stream" },
         onUploadProgress: function (progressEvent) {
-          let percent = progressEvent.loaded / progressEvent.total * 100
-          THIS.filelist.forEach(e => {
+          let percent = (progressEvent.loaded / progressEvent.total) * 100;
+          THIS.filelist.forEach((e) => {
             if (e.uid === file.uid) {
-              THIS.$set(e, 'type', ext.toUpperCase());
-              THIS.$set(e, 'progress', percent);
+              THIS.$set(e, "type", ext.toUpperCase());
+              THIS.$set(e, "progress", percent);
             }
-          })
+          });
         },
-      }
-      const res = await this.$upload.hw_upload(url, file.raw, config)
-      this.createFileRecord(obsfilename)
+      };
+      const res = await this.$upload.hw_upload(url, file.raw, config);
+      this.createFileRecord(obsfilename);
     },
 
     // 上传成功以后生成附件记录
-    async createFileRecord (obsfilename,attinfos) {
+    async createFileRecord(obsfilename, attinfos) {
       let obj = {
-         "serialfilename": obsfilename
-      }
-      obj = Object.assign({},obj,this.bindData)
+        serialfilename: obsfilename,
+      };
+      obj = Object.assign({}, obj, this.bindData);
       let param = {
-        "classname": "system.attachment.huawei.OBS",
-        "method": "uploadSuccess",
-        "content":obj
-      }
-      const res = await this.$api.requested(param)
-      this.count++
+        classname: "system.attachment.huawei.OBS",
+        method: "uploadSuccess",
+        content: obj,
+      };
+      const res = await this.$api.requested(param);
+      this.count++;
       console.log(this.count);
       if (this.count == this.filelist.length) {
-        this.$emit('onSuccess',res)
-        this.count = 0
-        console.log('触发');
+        this.$emit("onSuccess", res);
+        this.count = 0;
+        console.log("触发");
       }
       // if (res.code ===  1) {
       //   this.$emit('onSuccess',res)
       // }
     },
 
-    clearFiles () {
-      this.$refs['my-upload'].clearFiles()
-      this.filelist = []
-      this.dialogUploadVisible = false
+    clearFiles() {
+      this.$refs["my-upload"].clearFiles();
+      this.filelist = [];
+      this.dialogUploadVisible = false;
     },
 
     // 监听打开媒体库的时候关闭上传弹窗
-    onShow () {
-      this.dialogUploadVisible = false
+    onShow() {
+      this.dialogUploadVisible = false;
     },
-    onBindSuccess (res) {
-      this.$emit('onSuccess',res)
-    }
-  }
-}
-
+    onBindSuccess(res) {
+      this.$emit("onSuccess", res);
+    },
+  },
+};
 </script>
 <style>
 .upload-demo > div {
@@ -206,21 +299,21 @@ export default {
 .progress_panel > div > p {
   line-height: 30px;
 }
-.image-upload-btn{
+.image-upload-btn {
   display: flex;
   align-items: center;
   justify-content: space-around;
   width: 150px;
   height: 150px;
-  background: #FFFFFF;
+  background: #ffffff;
   border-radius: 4px 4px 4px 4px;
   opacity: 1;
-  border: 1px solid #CCCCCC;
-  color: #CCCCCC;
+  border: 1px solid #cccccc;
+  color: #cccccc;
   font-size: 4rem;
   cursor: pointer;
 }
-.small-image-upload-btn{
+.small-image-upload-btn {
   display: flex;
   align-items: center;
   justify-content: space-around;
@@ -228,13 +321,13 @@ export default {
   height: 40px;
   border-radius: 4px 4px 4px 4px;
   opacity: 1;
-  border: 1px solid #CCCCCC;
-  color: #CCCCCC;
+  border: 1px solid #cccccc;
+  color: #cccccc;
   font-size: 2rem;
   cursor: pointer;
-  margin:0 auto;
+  margin: 0 auto;
 }
-.limage-upload-btn{
+.limage-upload-btn {
   width: 384px !important;
 }
 </style>

+ 56 - 31
src/WebsiteManagement/consultManage/index.vue

@@ -1,21 +1,30 @@
 <template>
   <div>
     <basicLayout
-        style="padding-top:0 !important"
-        ref="basicLayout"
-        :oldFormPath="{add:'WebsiteManagement/consultManage/modules'}"
-        tableName="consultTable"
-        idName="sat_noticeid"
-        :apiId="{query:20240727135603,del:''}"
-        :isExport="false"
-        >
+      style="padding-top: 0 !important"
+      ref="basicLayout"
+      :oldFormPath="{ add: 'WebsiteManagement/consultManage/modules' }"
+      tableName="consultTable"
+      idName="sat_noticeid"
+      :apiId="{ query: 20240727135603, del: '' }"
+      :isExport="false"
+    >
       <template #titleRight>
-        <classManage v-if="tool.checkAuth($route.name,'classManage')"></classManage>
+        <classManage
+          v-if="tool.checkAuth($route.name, 'classManage')"
+        ></classManage>
       </template>
-      <template #custom >
+      <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>
+          <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>
@@ -24,16 +33,31 @@
       <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>
+            <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]]:'--'}}
+          {{
+            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>
+        <detailInfo
+          :sat_noticeid="scope.data.data.sat_noticeid"
+          @onSuccess="onSuccess"
+        ></detailInfo>
       </template>
     </basicLayout>
   </div>
@@ -41,27 +65,28 @@
 
 <script>
 import classManage from "./modules/classManage";
-import detailInfo from "./modules/detailInfo"
+import detailInfo from "./modules/detailInfo";
 export default {
   name: "index",
-  components:{classManage,detailInfo},
-  data(){
+  components: { classManage, detailInfo },
+  data() {
     return {
-      status:''
-    }
+      status: "",
+    };
   },
-  methods:{
-    selectChange(){
-      this.$refs.basicLayout.param.content.where.status = this.status
-      this.$refs.basicLayout.listData(this.$refs.basicLayout.param.content.pageNumber = 1)
+  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()
-    }
-  }
-}
+    onSuccess() {
+      this.$refs.basicLayout.listData();
+    },
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 218 - 160
src/WebsiteManagement/consultManage/modules/add.vue

@@ -1,30 +1,45 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="addBtn(dialogFormVisible = true)">新 建</el-button>
+    <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">
+      title="新增资讯"
+      :visible.sync="dialogFormVisible"
+      size="60%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      @close="onCancel"
+    >
       <div class="drawer__panel">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini">
+          <el-form :model="form" :rules="rules" ref="form" size="mini">
             <el-col :span="24">
               <el-form-item label="标题" prop="title">
-                <el-input v-model="form.title" placeholder="请输入标题"></el-input>
+                <el-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_notice_classid">
-                <el-select v-model="form.sat_notice_classid" clearable placeholder="请选择分类" style="width: 100%">
+                <el-select
+                  v-model="form.sat_notice_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_notice_classid"
-                      :label="item.classname"
-                      :value="item.sat_notice_classid">
+                    v-for="item in classData"
+                    :key="item.sat_notice_classid"
+                    :label="item.classname"
+                    :value="item.sat_notice_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -40,12 +55,13 @@
             <el-col :span="24">
               <el-form-item label="发布时间" prop="checkdate">
                 <el-date-picker
-                    style="width: 100%"
-                    v-model="form.checkdate"
-                    type="date"
-                    format="yyyy-MM-dd"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期">
+                  style="width: 100%"
+                  v-model="form.checkdate"
+                  type="date"
+                  format="yyyy-MM-dd"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </el-col>
@@ -53,206 +69,248 @@
         </el-row>
         <p style="font-size: 14px">资讯封面</p>
         <div style="margin-top: 10px">
-          <previewImage v-if="form.cover" style="width:256px" :image="image" :deletebtn="true"
-                        @onSuccess="clearCover"></previewImage>
-          <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png"
-                  :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"
-                  @onSuccess="onCoverSubmit"></upload>
-          <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png</p>
+          <previewImage
+            v-if="form.cover"
+            style="width: 256px"
+            :image="image"
+            :deletebtn="true"
+            @onSuccess="clearCover"
+          ></previewImage>
+          <upload
+            v-else
+            btntype="image"
+            :folderid="folderid"
+            accept=".JPG,.PNG,.jpg,.png"
+            :bindData="{
+              ownertable: 'sat_notice',
+              ownerid: form.sat_noticeid,
+              usetype: 'cover',
+            }"
+            @onSuccess="onCoverSubmit"
+          ></upload>
+          <p class="info">
+            注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png
+          </p>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">附件上传</p>
+        <p style="font-size: 14px; margin-top: 10px">附件上传</p>
         <div style="margin-top: 10px">
-          <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain" :onlyread="store.state.pageOnlyRead">
-            <upload slot="upload" :folderid="folderid"
-                    :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'default' }"
-                    @onSuccess="onUploadSuccess"></upload>
+          <attachmentList
+            :attinfos="attinfo_attachment"
+            @onSuccess="queryNoticeMain"
+            :onlyread="store.state.pageOnlyRead"
+          >
+            <upload
+              slot="upload"
+              :folderid="folderid"
+              :bindData="{
+                ownertable: 'sat_notice',
+                ownerid: form.sat_noticeid,
+                usetype: 'default',
+              }"
+              @onSuccess="onUploadSuccess"
+            ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
+        <p style="font-size: 14px; margin-top: 10px">资讯正文</p>
         <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
+          <myEditor
+            ref="editor"
+            :content="form.content"
+            :id="form.sat_noticeid"
+          ></myEditor>
         </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>
+        <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 attachmentList from '@/components/attachment_list/index.vue'
-import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
-import myEditor from '@/components/my-editor/Editor.vue'
-import store from '@/store'
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import attachmentList from "@/components/attachment_list/index.vue";
+import scopeOfauth from "@/components/scopeOfAuthority/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import store from "@/store";
 export default {
   name: "add",
-  components:{
+  components: {
     upload,
     previewImage,
     attachmentList,
     scopeOfauth,
-    myEditor
+    myEditor,
   },
-  data(){
+  data() {
     return {
       store,
-      dialogFormVisible:false,
-      form:{
-        "sat_noticeid":0,
-        "sat_notice_classid": '',
-        "title": "",
-        "summary": "",
-        "content": "",
-        "status":"新建",
-        "checkdate": ""
+      dialogFormVisible: false,
+      form: {
+        sat_noticeid: 0,
+        sat_notice_classid: "",
+        title: "",
+        summary: "",
+        content: "",
+        status: "新建",
+        checkdate: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
         sat_notice_classid: [
-          { required: true, message: '请选择分类', trigger: 'change' }
+          { required: true, message: "请选择分类", trigger: "change" },
         ],
       },
-      classData:[],
-      image:{},
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attinfo_attachment:[],
-      isSave:false
-    }
+      classData: [],
+      image: {},
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      attinfo_attachment: [],
+      isSave: false,
+    };
   },
-  methods:{
-    addBtn(){
-      this.isSave = false
-      this.classList()
-      this.createNull()
+  methods: {
+    addBtn() {
+      this.isSave = false;
+      this.classList();
+      this.createNull();
     },
     /*创建空资讯*/
-    async createNull(){
+    async createNull() {
       const res = await this.$api.requested({
-        "id": "20240727135503",
-        "content": this.form
-      })
-      this.form.sat_noticeid = res.data.sat_noticeid
+        id: "20240727135503",
+        content: this.form,
+      });
+      this.form.sat_noticeid = res.data.sat_noticeid;
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240727133503",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
+        id: "20240727133503",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
     },
-    onSubmit(){
-      this.$refs.form.validate(async(valid) =>{
-        if (!valid) return false
-        this.form.content = this.$refs.editor.html
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.content = this.$refs.editor.html;
         const res = await this.$api.requested({
-          "id": "20240727135503",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.isSave = true
-          this.dialogFormVisible = false
-          this.$refs.form.resetFields()
-          this.form.cover = ''
-          this.image = null
-          this.form.content = ''
-          this.attinfo_attachment = []
-          this.form.sat_noticeid = 0
-          this.$refs.editor.html = ''
-          this.$emit('onSuccess')
-        })
-      })
+          id: "20240727135503",
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.isSave = true;
+          this.dialogFormVisible = false;
+          this.$refs.form.resetFields();
+          this.form.cover = "";
+          this.image = null;
+          this.form.content = "";
+          this.attinfo_attachment = [];
+          this.form.sat_noticeid = 0;
+          this.$refs.editor.html = "";
+          this.$emit("onSuccess");
+        });
+      });
     },
-    async onCancel(){
-      if (!this.isSave){
+    async onCancel() {
+      if (!this.isSave) {
         const res = await this.$api.requested({
-          "id": "20240727135803",
-          "content": {
-            "sat_noticeids":[this.form.sat_noticeid]
-          }
-        })
-        this.dialogFormVisible = false
-        this.$refs.form.resetFields()
-        this.form.cover = ''
-        this.image = null
-        this.form.content = ''
-        this.attinfo_attachment = []
-        this.form.sat_noticeid = 0
-        this.$refs.editor.html = ''
-        this.$emit('onSuccess')
+          id: "20240727135803",
+          content: {
+            sat_noticeids: [this.form.sat_noticeid],
+          },
+        });
+        this.dialogFormVisible = false;
+        this.$refs.form.resetFields();
+        this.form.cover = "";
+        this.image = null;
+        this.form.content = "";
+        this.attinfo_attachment = [];
+        this.form.sat_noticeid = 0;
+        this.$refs.editor.html = "";
+        this.$emit("onSuccess");
       }
     },
     clearCover() {
-      this.form.cover = null
-      this.image = {}
+      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()
+        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]
     },
-    async queryNoticeMain(){
+    async queryNoticeMain() {
       const res = await this.$api.requested({
-        "id": "20240727135703",
-        "content": {
-          "sat_noticeid":this.form.sat_noticeid
-        }
-      })
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+        id: "20240727135703",
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
     async onUploadSuccess() {
       const res = await this.$api.requested({
-        "id": "20221101095003",
+        id: "20221101095003",
         // "method": "queryNoticeMain",
-        "content": {
-          "sat_noticeid": this.form.sat_noticeid
-        }
-      })
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
       console.log(res.data);
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
   },
-  mounted() {
-
-  },
-
-}
+  mounted() {},
+};
 </script>
 
 <style scoped>
-
 </style>

+ 195 - 148
src/WebsiteManagement/consultManage/modules/classManage.vue

@@ -1,49 +1,98 @@
 <template>
   <div>
-    <el-button  type="primary" size="small" @click="addBtn(drawer = true)">分类管理</el-button>
+    <el-button type="primary" size="small" @click="addBtn((drawer = true))"
+      >分类管理</el-button
+    >
     <el-drawer
-        title="分类管理"
-        :visible.sync="drawer"
-        direction="rtl"
-        size="60%"
-        append-to-body
-        :show-close="false"
-        @close="closeDrawer">
-      <div class="drawer__panel" style="margin-bottom: 0!important;">
-        <el-button style="margin-bottom: 10px" type="primary" size="small" @click="addClass">新增分类</el-button>
-        <tableNewLayout ref="tableRef" :checkbox="false" :custom="true" :data="list" :layout="tablecols"
-                        :opwidth="200" :width="true" height="calc(100vh - 210px)" @rowSort="rowSort" rowKey="sat_notice_classid">
+      title="分类管理"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="60%"
+      append-to-body
+      :show-close="false"
+      @close="closeDrawer"
+    >
+      <div class="drawer__panel" style="margin-bottom: 0 !important">
+        <el-button
+          style="margin-bottom: 10px"
+          type="primary"
+          size="small"
+          @click="addClass"
+          >新增分类</el-button
+        >
+        <tableNewLayout
+          ref="tableRef"
+          :checkbox="false"
+          :custom="true"
+          :data="list"
+          :layout="tablecols"
+          :opwidth="200"
+          :width="true"
+          height="calc(100vh - 210px)"
+          @rowSort="rowSort"
+          rowKey="sat_notice_classid"
+        >
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'classname'">
-              <el-input v-if="sat_notice === scope.column.data.sat_notice_classid" size="mini" v-model="scope.column.data.classname" placeholder="输入分类名称"></el-input>
+              <el-input
+                v-if="sat_notice === scope.column.data.sat_notice_classid"
+                size="mini"
+                v-model="scope.column.data.classname"
+                placeholder="输入分类名称"
+              ></el-input>
               <p v-else>{{ scope.column.data.classname }}</p>
             </div>
             <div v-else-if="scope.column.columnname === 'isused'">
               <el-switch
-                  v-model="scope.column.data.isused"
-                  :active-value="1"
-                  :inactive-value="0"
-                  @change="useChange(scope.column.data)">
+                v-model="scope.column.data.isused"
+                :active-value="1"
+                :inactive-value="0"
+                @change="useChange(scope.column.data)"
+              >
               </el-switch>
             </div>
-            <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+            <p v-else>{{ scope.column.data[scope.column.columnname] }}</p>
           </template>
           <template v-slot:opreation="scope">
-            <el-button v-if="sat_notice === scope.data.sat_notice_classid" size="mini" type="text" class="table-button"  @click="saveDate(scope.data)">保 存</el-button>
-            <el-button v-if="sat_notice !== scope.data.sat_notice_classid" size="mini" type="text" class="table-button"  @click="updateDate(scope.data)" :disabled="scope.data.isused == 1">编 辑</el-button>
-            <el-button v-if="sat_notice !== scope.data.sat_notice_classid" size="mini" type="text" class="table-button"  @click="delDate(scope.data)" :disabled="scope.data.isused == 1">删 除</el-button>
+            <el-button
+              v-if="sat_notice === scope.data.sat_notice_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="saveDate(scope.data)"
+              >保 存</el-button
+            >
+            <el-button
+              v-if="sat_notice !== scope.data.sat_notice_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="updateDate(scope.data)"
+              :disabled="scope.data.isused == 1"
+              >编 辑</el-button
+            >
+            <el-button
+              v-if="sat_notice !== scope.data.sat_notice_classid"
+              size="mini"
+              type="text"
+              class="table-button"
+              @click="delDate(scope.data)"
+              :disabled="scope.data.isused == 1"
+              >删 除</el-button
+            >
           </template>
         </tableNewLayout>
-        <div  class="container normal-panel" style="text-align:right">
+        <div class="container normal-panel" style="text-align: right">
           <el-pagination
-              background
-              @size-change="handleSizeChange"
-              @current-change="handleCurrentChange"
-              :current-page="currentPage"
-              :page-sizes="[50, 100, 150, 200]"
-              :page-size="50"
-              layout="total,sizes, prev, pager, next, jumper"
-              :total="total">
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[50, 100, 150, 200]"
+            :page-size="50"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total"
+          >
           </el-pagination>
         </div>
       </div>
@@ -52,155 +101,153 @@
 </template>
 
 <script>
-import tableNewLayout from '@/components/dynamic-newTable/index2'
-import {Message} from "element-ui";
+import tableNewLayout from "@/components/dynamic-newTable/index2";
+import { Message } from "element-ui";
 export default {
   name: "classManage",
-  components:{tableNewLayout},
-  data(){
+  components: { tableNewLayout },
+  data() {
     return {
-      drawer:false,
-      classData:[],
-      tablecols:[],
-      list:[],
-      sat_notice:0,
-      total:0,
-      currentPage:0,
-      param:{
-        "id": "20240727133503",
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 50,
-          "where":{
-            "condition":""
-          }
-        }
-      }
-    }
+      drawer: false,
+      classData: [],
+      tablecols: [],
+      list: [],
+      sat_notice: 0,
+      total: 0,
+      currentPage: 0,
+      param: {
+        id: "20240727133503",
+        content: {
+          pageNumber: 1,
+          pageSize: 50,
+          where: {
+            condition: "",
+          },
+        },
+      },
+    };
   },
-  methods:{
-    addBtn(){
-      this.listData(this.param.content.pageNumber = 1)
+  methods: {
+    addBtn() {
+      this.listData((this.param.content.pageNumber = 1));
     },
-    addClass(){
-      this.sat_notice = 0
+    addClass() {
+      this.sat_notice = 0;
       this.list.unshift({
-        "sat_notice_classid":0,     //sat_notice_classid<=0时 为新增
-        "classname": "",
-        "sequence":this.list.length + 1,
-        "isused":1
-      })
+        sat_notice_classid: 0, //sat_notice_classid<=0时 为新增
+        classname: "",
+        sequence: this.list.length + 1,
+        isused: 1,
+      });
     },
-    async saveDate(row){
+    async saveDate(row) {
       const res = await this.$api.requested({
-        "id": "20240727133403",
-        "content": row
-      })
-      this.tool.showMessage(res,()=>{
-        this.sat_notice = 0
-        this.listData()
-      })
+        id: "20240727133403",
+        content: row,
+      });
+      this.tool.showMessage(res, () => {
+        this.sat_notice = 0;
+        this.listData();
+      });
     },
-    async useChange(row){
+    async useChange(row) {
       const res = await this.$api.requested({
-        "id": "20240727133403",
-        "content": row
-      })
-      if (res.code == 0){
-        this.tool.showMessage(res,()=>{
-
-        })
+        id: "20240727133403",
+        content: row,
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
       }
-      this.listData()
-
+      this.listData();
     },
-    updateDate(row){
-      this.sat_notice = row.sat_notice_classid
+    updateDate(row) {
+      this.sat_notice = row.sat_notice_classid;
     },
-    delDate(row){
-      this.$confirm('确定删除当前分类吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async() => {
-        const res = await this.$api.requested({
-          "id": "20240727133603",
-          "content": {
-            "sat_notice_classids":[row.sat_notice_classid]
-          }
-        })
-        /*this.tool.showMessage(res,()=>{
+    delDate(row) {
+      this.$confirm("确定删除当前分类吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await this.$api.requested({
+            id: "20240727133603",
+            content: {
+              sat_notice_classids: [row.sat_notice_classid],
+            },
+          });
+          /*this.tool.showMessage(res,()=>{
           this.listData()
         })*/
-        if (res.code == 0){
-          Message({
-            message: res.data[0].errmsg,
-            type: 'error',
-            duration:3000,
-            showClose:true
-          });
-        }else {
-          Message({
-            message: '操作成功',
-            type: 'success',
-            duration:3000,
-            showClose:true
+          if (res.code == 0) {
+            Message({
+              message: res.data[0].errmsg,
+              type: "error",
+              duration: 3000,
+              showClose: true,
+            });
+          } else {
+            Message({
+              message: "操作成功",
+              type: "success",
+              duration: 3000,
+              showClose: true,
+            });
+          }
+          this.listData();
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
           });
-        }
-        this.listData()
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
         });
-      });
     },
-    async listData(){
-      const res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
+    async listData() {
+      const res = await this.$api.requested(this.param);
+      this.list = res.data;
+      this.total = res.total;
+      this.currentPage = res.pageNumber;
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.listData()
+      this.param.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.listData()
+      this.param.content.pageNumber = val;
+      this.listData();
     },
-    closeDrawer(){
-      this.drawer = false
+    closeDrawer() {
+      this.drawer = false;
     },
-    rowSort(data){
-      data.forEach((item,index)=>{
-        item.sequence = index
-      })
-      this.$nextTick(async()=>{
-        let sequencesorts = data.map(item=>{
+    rowSort(data) {
+      data.forEach((item, index) => {
+        item.sequence = index;
+      });
+      this.$nextTick(async () => {
+        let sequencesorts = data.map((item) => {
           return {
-            ownerid:item.sat_notice_classid,
-            sequence:item.sequence
-          }
-        })
+            ownerid: item.sat_notice_classid,
+            sequence: item.sequence,
+          };
+        });
         const res = await this.$api.requested({
-          id:20221201134901,
-          content:{
-            ownertable:'sat_notice_class',
-            sequencesorts:sequencesorts
-          }
-        })
-      })
-    }
+          id: 20221201134901,
+          content: {
+            ownertable: "sat_notice_class",
+            sequencesorts: sequencesorts,
+          },
+        });
+      });
+    },
   },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).classTable.tablecols
-  }
-}
+    this.tablecols = this.tool.tabelCol(this.$route.name).classTable.tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 266 - 193
src/WebsiteManagement/consultManage/modules/detailInfo.vue

@@ -1,47 +1,79 @@
 <template>
   <div>
-    <el-button size="small" type="text" @click="detailBtn(dialogFormVisible = true)">详情</el-button>
+    <el-button
+      size="small"
+      type="text"
+      @click="detailBtn((dialogFormVisible = true))"
+      >详情</el-button
+    >
     <el-drawer
-        title="资讯管理"
-        :visible.sync="dialogFormVisible"
-        size="60%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        :with-header="false"
-        @close="onClose">
-      <div style="display: flex;justify-content: space-between;padding: 10px">
+      title="资讯管理"
+      :visible.sync="dialogFormVisible"
+      size="60%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      :with-header="false"
+      @close="onClose"
+    >
+      <div style="display: flex; justify-content: space-between; padding: 10px">
+        <div>资讯管理</div>
         <div>
-          资讯管理
-        </div>
-        <div>
-          <edit v-if="tool.checkAuth($route.name,'update')" :sat_noticeid="sat_noticeid" @editSuccess="detailBtn" class="inline-16" :disabled="form.status == '发布'"></edit>
-          <el-button v-if="tool.checkAuth($route.name,'delete')" :type="form.status == '发布'?'':'primary'" size="small" @click="delBtn" :disabled="form.status == '发布'">删除</el-button>
+          <edit
+            v-if="tool.checkAuth($route.name, 'update')"
+            :sat_noticeid="sat_noticeid"
+            @editSuccess="detailBtn"
+            class="inline-16"
+            :disabled="form.status == '发布'"
+          ></edit>
+          <el-button
+            v-if="tool.checkAuth($route.name, 'delete')"
+            :type="form.status == '发布' ? '' : 'primary'"
+            size="small"
+            @click="delBtn"
+            :disabled="form.status == '发布'"
+            >删除</el-button
+          >
         </div>
       </div>
-      <div class="drawer__panel" style="margin-bottom: 0!important;">
+      <div class="drawer__panel" style="margin-bottom: 0 !important">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini">
+          <el-form :model="form" :rules="rules" ref="form" size="mini">
             <el-col :span="24">
               <el-form-item label="标题" prop="title">
-                <el-input v-model="form.title" placeholder="请输入标题" disabled></el-input>
+                <el-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                  disabled
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_notice_classid">
-                <el-select v-model="form.sat_notice_classid" clearable placeholder="请选择分类" style="width: 100%" disabled>
+                <el-select
+                  v-model="form.sat_notice_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                  disabled
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_notice_classid"
-                      :label="item.classname"
-                      :value="item.sat_notice_classid">
+                    v-for="item in classData"
+                    :key="item.sat_notice_classid"
+                    :label="item.classname"
+                    :value="item.sat_notice_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="状态" prop="status">
-                <el-radio-group v-model="form.status" style="width: 100%" disabled>
+                <el-radio-group
+                  v-model="form.status"
+                  style="width: 100%"
+                  disabled
+                >
                   <el-radio label="新建">新建</el-radio>
                   <el-radio label="发布">发布</el-radio>
                 </el-radio-group>
@@ -50,13 +82,14 @@
             <el-col :span="24">
               <el-form-item label="发布时间" prop="checkdate">
                 <el-date-picker
-                    disabled
-                    style="width: 100%"
-                    v-model="form.checkdate"
-                    type="date"
-                    format="yyyy-MM-dd"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期">
+                  disabled
+                  style="width: 100%"
+                  v-model="form.checkdate"
+                  type="date"
+                  format="yyyy-MM-dd"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </el-col>
@@ -64,24 +97,56 @@
         </el-row>
         <p style="font-size: 14px">资讯封面</p>
         <div style="margin-top: 10px">
-          <previewImage v-if="form.cover" style="width:256px" :image="image"
-                        @onSuccess="clearCover"></previewImage>
-          <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG" :disabled="true"
-                  :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"
-                  @onSuccess="onCoverSubmit"></upload>
-          <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG</p>
+          <previewImage
+            v-if="form.cover"
+            style="width: 256px"
+            :image="image"
+            @onSuccess="clearCover"
+          ></previewImage>
+          <upload
+            v-else
+            btntype="image"
+            :folderid="folderid"
+            accept=".JPG,.PNG"
+            :disabled="true"
+            :bindData="{
+              ownertable: 'sat_notice',
+              ownerid: form.sat_noticeid,
+              usetype: 'cover',
+            }"
+            @onSuccess="onCoverSubmit"
+          ></upload>
+          <p class="info">
+            注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG
+          </p>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">附件上传</p>
+        <p style="font-size: 14px; margin-top: 10px">附件上传</p>
         <div style="margin-top: 10px">
-          <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain" :onlyread="true">
-            <upload slot="upload" :folderid="folderid"
-                    :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'default' }"
-                    @onSuccess="onUploadSuccess"></upload>
+          <attachmentList
+            :attinfos="attinfo_attachment"
+            @onSuccess="queryNoticeMain"
+            :onlyread="true"
+          >
+            <upload
+              slot="upload"
+              :folderid="folderid"
+              :bindData="{
+                ownertable: 'sat_notice',
+                ownerid: form.sat_noticeid,
+                usetype: 'default',
+              }"
+              @onSuccess="onUploadSuccess"
+            ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
+        <p style="font-size: 14px; margin-top: 10px">资讯正文</p>
         <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid" :disabled="true"></myEditor>
+          <myEditor
+            ref="editor"
+            :content="form.content"
+            :id="form.sat_noticeid"
+            :disabled="true"
+          ></myEditor>
         </div>
       </div>
     </el-drawer>
@@ -89,205 +154,213 @@
 </template>
 
 <script>
-import upload from '@/components/upload/hw_obs_upload.vue'
-import previewImage from '@/components/previewImage/index.vue'
-import attachmentList from '@/components/attachment_list/index.vue'
-import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
-import myEditor from '@/components/my-editor/Editor.vue'
-import store from '@/store'
-import edit from  './edit'
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import attachmentList from "@/components/attachment_list/index.vue";
+import scopeOfauth from "@/components/scopeOfAuthority/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import store from "@/store";
+import edit from "./edit";
 export default {
   name: "detailInfo",
-  components:{
+  components: {
     upload,
     previewImage,
     attachmentList,
     scopeOfauth,
     myEditor,
-    edit
+    edit,
   },
-  props:["sat_noticeid"],
-  data(){
+  props: ["sat_noticeid"],
+  data() {
     return {
       store,
-      dialogFormVisible:false,
-      form:{
-        "sat_noticeid":0,
-        "sat_notice_classid": '',
-        "title": "",
-        "summary": "",
-        "content": "",
-        "status":"新建",
-        "checkdate": "",
-        "cover":""
+      dialogFormVisible: false,
+      form: {
+        sat_noticeid: 0,
+        sat_notice_classid: "",
+        title: "",
+        summary: "",
+        content: "",
+        status: "新建",
+        checkdate: "",
+        cover: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
         sat_notice_classid: [
-          { required: true, message: '请选择分类', trigger: 'change' }
+          { required: true, message: "请选择分类", trigger: "change" },
         ],
       },
-      classData:[],
-      image:{},
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attinfo_attachment:[]
-    }
+      classData: [],
+      image: {},
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      attinfo_attachment: [],
+    };
   },
-  methods:{
-    async detailBtn(){
-      console.log(this.sat_noticeid,'sat_noticeid')
+  methods: {
+    async detailBtn() {
+      console.log(this.sat_noticeid, "sat_noticeid");
       const res = await this.$api.requested({
-        "id": "20240727135703",
-        "content": {
-          "sat_noticeid":this.sat_noticeid
-        }
-      })
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+        id: "20240727135703",
+        content: {
+          sat_noticeid: this.sat_noticeid,
+        },
+      });
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
-      this.$refs.editor.html = res.data.content
-      this.form = Object.assign({},this.form,res.data)
-      this.image = res.data.attinfos[0]
-      console.log(this.form,'form')
-      this.classList()
-      this.queryFileLink()
+      });
+      this.$refs.editor.html = res.data.content;
+      this.form = Object.assign({}, this.form, res.data);
+      this.image = res.data.attinfos[0];
+      console.log(this.form, "form");
+      this.classList();
+      this.queryFileLink();
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240727133503",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
-      console.log(res.data,'分类')
+        id: "20240727133503",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
+      console.log(res.data, "分类");
     },
-    onSubmit(){
-      this.$refs.form.validate(async(valid) =>{
-        if (!valid) return false
-        this.form.content = this.$refs.editor.html
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.content = this.$refs.editor.html;
         const res = await this.$api.requested({
-          "id": "20240727135503",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$emit('onSuccess')
-        })
-      })
+          id: "20240727135503",
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.dialogFormVisible = false;
+          this.$emit("onSuccess");
+        });
+      });
     },
-    onClose(){
-      this.dialogEditVisible = false
-      this.$emit("onSuccess")
+    onClose() {
+      this.dialogEditVisible = false;
+      this.$emit("onSuccess");
     },
     clearCover() {
-      this.form.cover = null
-      this.image = {}
+      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 = JSON.parse(res.attinfos).data[0].url
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_notice",
+          ownerid: this.form.sat_noticeid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      console.log(res, "封面数据获取");
+      /*this.form.cover = JSON.parse(res.attinfos).data[0].url
        this.image = JSON.parse(res.attinfos).data[0]*/
-      this.form.cover = res.data[0].url
-      this.image = res.data[0]
+      this.form.cover = res.data[0].url;
+      this.image = res.data[0];
     },
     // 获取封面信息
     async queryFileLink() {
-      this.dialogEditVisible = true
+      this.dialogEditVisible = true;
       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("封面信息")
-      console.log(res)
-      this.image = res.data[0]
-      console.log("获取封面")
-      console.log(this.image)
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_notice",
+          ownerid: this.form.sat_noticeid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      console.log("封面信息");
+      console.log(res);
+      this.image = res.data[0];
+      console.log("获取封面");
+      console.log(this.image);
       /*res.data[0] ? this.image = res.data[0].url : this.image = { url: '' }*/
     },
-    async queryNoticeMain(){
+    async queryNoticeMain() {
       const res = await this.$api.requested({
-        "id": "20240727135703",
-        "content": {
-          "sat_noticeid":this.form.sat_noticeid
-        }
-      })
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+        id: "20240727135703",
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
     async onUploadSuccess() {
       const res = await this.$api.requested({
-        "id": "20221101095003",
+        id: "20221101095003",
         // "method": "queryNoticeMain",
-        "content": {
-          "sat_noticeid": this.form.sat_noticeid
-        }
-      })
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
       console.log(res.data);
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
-    delBtn(){
-      this.$confirm('确定删除当前资讯吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async() => {
-        const res = await this.$api.requested({
-          "id": "20240727135803",
-          "content": {
-            "sat_noticeids":[this.form.sat_noticeid]
-          }
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$emit('onSuccess')
+    delBtn() {
+      this.$confirm("确定删除当前资讯吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const res = await this.$api.requested({
+            id: "20240727135803",
+            content: {
+              sat_noticeids: [this.form.sat_noticeid],
+            },
+          });
+          this.tool.showMessage(res, () => {
+            this.dialogFormVisible = false;
+            this.$emit("onSuccess");
+          });
         })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
         });
-      });
-    }
-  },
-  mounted() {
-
+    },
   },
-
-}
+  mounted() {},
+};
 </script>
 
 <style scoped>
-
 </style>

+ 224 - 161
src/WebsiteManagement/consultManage/modules/edit.vue

@@ -1,30 +1,46 @@
 <template>
   <div>
-    <el-button size="small" :type="disabled?'':'primary'" @click="detailBtn(dialogFormVisible = true)" :disabled="disabled">编辑</el-button>
+    <el-button
+      size="small"
+      :type="disabled ? '' : 'primary'"
+      @click="detailBtn((dialogFormVisible = true))"
+      :disabled="disabled"
+      >编辑</el-button
+    >
     <el-drawer
-        title="编辑资讯"
-        :visible.sync="dialogFormVisible"
-        size="60%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onClose">
+      title="编辑资讯"
+      :visible.sync="dialogFormVisible"
+      size="60%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      @close="onClose"
+    >
       <div class="drawer__panel">
         <el-row :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini">
+          <el-form :model="form" :rules="rules" ref="form" size="mini">
             <el-col :span="24">
               <el-form-item label="标题" prop="title">
-                <el-input v-model="form.title" placeholder="请输入标题"></el-input>
+                <el-input
+                  v-model="form.title"
+                  placeholder="请输入标题"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="分类" prop="sat_notice_classid">
-                <el-select v-model="form.sat_notice_classid" clearable placeholder="请选择分类" style="width: 100%">
+                <el-select
+                  v-model="form.sat_notice_classid"
+                  clearable
+                  placeholder="请选择分类"
+                  style="width: 100%"
+                >
                   <el-option
-                      v-for="item in classData"
-                      :key="item.sat_notice_classid"
-                      :label="item.classname"
-                      :value="item.sat_notice_classid">
+                    v-for="item in classData"
+                    :key="item.sat_notice_classid"
+                    :label="item.classname"
+                    :value="item.sat_notice_classid"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -40,12 +56,13 @@
             <el-col :span="24">
               <el-form-item label="发布时间" prop="checkdate">
                 <el-date-picker
-                    style="width: 100%"
-                    v-model="form.checkdate"
-                    type="date"
-                    format="yyyy-MM-dd"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期">
+                  style="width: 100%"
+                  v-model="form.checkdate"
+                  type="date"
+                  format="yyyy-MM-dd"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </el-col>
@@ -53,206 +70,252 @@
         </el-row>
         <p style="font-size: 14px">资讯封面</p>
         <div style="margin-top: 10px">
-          <previewImage v-if="form.cover" style="width:256px" :image="image" :deletebtn="true"
-                        @onSuccess="clearCover"></previewImage>
-          <upload v-else btntype="image" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png"
-                  :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'cover' }"
-                  @onSuccess="onCoverSubmit"></upload>
-          <p class="info">注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png</p>
+          <previewImage
+            v-if="form.cover"
+            style="width: 256px"
+            :image="image"
+            :deletebtn="true"
+            @onSuccess="clearCover"
+          ></previewImage>
+          <upload
+            v-else
+            btntype="image"
+            :folderid="folderid"
+            accept=".JPG,.PNG,.jpg,.png"
+            :bindData="{
+              ownertable: 'sat_notice',
+              ownerid: form.sat_noticeid,
+              usetype: 'cover',
+            }"
+            @onSuccess="onCoverSubmit"
+          ></upload>
+          <p class="info">
+            注:建议上传图片大小130x80像素,大小不超过2M,格式为JPG/PNG/jpg/png
+          </p>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">附件上传</p>
+        <p style="font-size: 14px; margin-top: 10px">附件上传</p>
         <div style="margin-top: 10px">
-          <attachmentList :attinfos="attinfo_attachment" @onSuccess="queryNoticeMain" :onlyread="store.state.pageOnlyRead">
-            <upload slot="upload" :folderid="folderid"
-                    :bindData="{ ownertable: 'sat_notice', ownerid: form.sat_noticeid, usetype: 'default' }"
-                    @onSuccess="onUploadSuccess"></upload>
+          <attachmentList
+            :attinfos="attinfo_attachment"
+            @onSuccess="queryNoticeMain"
+            :onlyread="store.state.pageOnlyRead"
+          >
+            <upload
+              slot="upload"
+              :folderid="folderid"
+              :bindData="{
+                ownertable: 'sat_notice',
+                ownerid: form.sat_noticeid,
+                usetype: 'default',
+              }"
+              @onSuccess="onUploadSuccess"
+            ></upload>
           </attachmentList>
         </div>
-        <p style="font-size: 14px;margin-top: 10px">资讯正文</p>
+        <p style="font-size: 14px; margin-top: 10px">资讯正文</p>
         <div style="margin-top: 10px">
-          <myEditor ref="editor" :content="form.content" :id="form.sat_noticeid"></myEditor>
+          <myEditor
+            ref="editor"
+            :content="form.content"
+            :id="form.sat_noticeid"
+          ></myEditor>
         </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>
+        <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 attachmentList from '@/components/attachment_list/index.vue'
-import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
-import myEditor from '@/components/my-editor/Editor.vue'
-import store from '@/store'
+import upload from "@/components/upload/hw_obs_upload.vue";
+import previewImage from "@/components/previewImage/index.vue";
+import attachmentList from "@/components/attachment_list/index.vue";
+import scopeOfauth from "@/components/scopeOfAuthority/index.vue";
+import myEditor from "@/components/my-editor/Editor.vue";
+import store from "@/store";
 export default {
   name: "detailInfo",
-  components:{
+  components: {
     upload,
     previewImage,
     attachmentList,
     scopeOfauth,
-    myEditor
+    myEditor,
   },
-  props:["sat_noticeid","disabled"],
-  data(){
+  props: ["sat_noticeid", "disabled"],
+  data() {
     return {
       store,
-      dialogFormVisible:false,
-      form:{
-        "sat_noticeid":0,
-        "sat_notice_classid": '',
-        "title": "",
-        "summary": "",
-        "content": "",
-        "status":"新建",
-        "checkdate": "",
-        "cover":""
+      dialogFormVisible: false,
+      form: {
+        sat_noticeid: 0,
+        sat_notice_classid: "",
+        title: "",
+        summary: "",
+        content: "",
+        status: "新建",
+        checkdate: "",
+        cover: "",
       },
-      rules:{
-        title: [
-          { required: true, message: '请输入标题名称', trigger: 'blur' },
-        ],
+      rules: {
+        title: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
         sat_notice_classid: [
-          { required: true, message: '请选择分类', trigger: 'change' }
+          { required: true, message: "请选择分类", trigger: "change" },
         ],
       },
-      classData:[],
-      image:{},
-      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
-      attinfo_attachment:[]
-    }
+      classData: [],
+      image: {},
+      folderid: JSON.parse(sessionStorage.getItem("folderid")).appfolderid,
+      attinfo_attachment: [],
+    };
   },
-  methods:{
-    async detailBtn(){
-      console.log(this.sat_noticeid,'sat_noticeid')
+  methods: {
+    async detailBtn() {
+      console.log(this.sat_noticeid, "sat_noticeid");
       const res = await this.$api.requested({
-        "id": "20240727135703",
-        "content": {
-          "sat_noticeid":this.sat_noticeid
-        }
-      })
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+        id: "20240727135703",
+        content: {
+          sat_noticeid: this.sat_noticeid,
+        },
+      });
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
-      this.form = Object.assign({},this.form,res.data)
-      this.image = res.data.attinfos[0]
-      console.log(this.form,'form')
-      this.classList()
-      this.queryFileLink()
+      });
+      this.form = Object.assign({}, this.form, res.data);
+      this.image = res.data.attinfos[0];
+      console.log(this.form, "form");
+      this.classList();
+      this.queryFileLink();
     },
     /*获取分类*/
-    async classList(){
+    async classList() {
       let param = {
-        "id": "20240727133503",
-        "content": {
-          "where":{
-            "condition":""
-          }
-        }
-      }
-      const res = await this.$api.requested(param)
-      this.classData = res.data
-      console.log(res.data,'分类')
+        id: "20240727133503",
+        content: {
+          where: {
+            condition: "",
+          },
+        },
+      };
+      const res = await this.$api.requested(param);
+      this.classData = res.data;
+      console.log(res.data, "分类");
     },
-    onSubmit(){
-      this.$refs.form.validate(async(valid) =>{
-        if (!valid) return false
-        this.form.content = this.$refs.editor.html
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.content = this.$refs.editor.html;
         const res = await this.$api.requested({
-          "id": "20240727135503",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.dialogFormVisible = false
-          this.$emit('editSuccess')
-        })
-      })
+          id: "20240727135503",
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.dialogFormVisible = false;
+          this.$emit("editSuccess");
+        });
+      });
     },
-    onCancel(){},
-    onClose(){},
+    onCancel() {},
+    onClose() {},
     clearCover() {
-      this.form.cover = null
-      this.image = {}
+      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 = JSON.parse(res.attinfos).data[0].url
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_notice",
+          ownerid: this.form.sat_noticeid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      console.log(res, "封面数据获取");
+      /*this.form.cover = JSON.parse(res.attinfos).data[0].url
        this.image = JSON.parse(res.attinfos).data[0]*/
-      this.form.cover = res.data[0].url
-      this.image = res.data[0]
+      this.form.cover = res.data[0].url;
+      this.image = res.data[0];
     },
     // 获取封面信息
     async queryFileLink() {
-      this.dialogEditVisible = true
+      this.dialogEditVisible = true;
       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("封面信息")
-      console.log(res)
-      this.image = res.data[0]
-      console.log("获取封面")
-      console.log(this.image)
+        classname: "system.attachment.Attachment",
+        method: "queryFileLink",
+        content: {
+          ownertable: "sat_notice",
+          ownerid: this.form.sat_noticeid,
+          usetype: "cover", //传空返回有所
+        },
+      });
+      console.log("封面信息");
+      console.log(res);
+      this.image = res.data[0];
+      console.log("获取封面");
+      console.log(this.image);
       /*res.data[0] ? this.image = res.data[0].url : this.image = { url: '' }*/
     },
-    async queryNoticeMain(){
+    async queryNoticeMain() {
       const res = await this.$api.requested({
-        "id": "20240727135703",
-        "content": {
-          "sat_noticeid":this.form.sat_noticeid
-        }
-      })
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+        id: "20240727135703",
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
     async onUploadSuccess() {
       const res = await this.$api.requested({
-        "id": "20221101095003",
+        id: "20221101095003",
         // "method": "queryNoticeMain",
-        "content": {
-          "sat_noticeid": this.form.sat_noticeid
-        }
-      })
+        content: {
+          sat_noticeid: this.form.sat_noticeid,
+        },
+      });
       console.log(res.data);
-      this.attinfo_attachment = res.data.attinfos.filter(e => {
-        if (e.postfix !== 'mp4' && e.postfix !== 'ogg' && e.postfix !== 'webm') {
-          return e
+      this.attinfo_attachment = res.data.attinfos.filter((e) => {
+        if (
+          e.postfix !== "mp4" &&
+          e.postfix !== "ogg" &&
+          e.postfix !== "webm"
+        ) {
+          return e;
         }
-      })
+      });
     },
   },
-  mounted() {
-
-  },
-
-}
+  mounted() {},
+};
 </script>
 
 <style scoped>
-
 </style>

+ 45 - 0
src/WebsiteManagement/marketproductMag/compents/productTemplate.vue

@@ -0,0 +1,45 @@
+<template>
+  <div>
+    <tableTemplate :tablecols="tablecols" :param="param" height="500px">
+      <template v-slot:detail="scope">
+        <el-button type="text" @click="select(scope.data)">选择</el-button>
+      </template>
+    </tableTemplate>
+  </div>
+</template>
+
+<script>
+import tableTemplate from "@/WebsiteManagement/serviceAppointMag/compents/tableTemplate";
+export default {
+  name: "productTemplate",
+  props:["sa_fadid"],
+  components:{tableTemplate},
+  data(){
+    return {
+      tablecols:[],
+      param:{
+        "id": "20240920101803",
+        "content": {
+          "siteid":JSON.parse(sessionStorage.getItem("active_account")).siteid,
+          "sa_fadid":this.sa_fadid,
+          "where":{
+            "condition":""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    select(data){
+      this.$emit('selectPro',data)
+    },
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).productTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 87 - 0
src/WebsiteManagement/marketproductMag/index.vue

@@ -0,0 +1,87 @@
+<template>
+  <basicLayout
+      style="padding-top: 0 !important"
+      ref="basicLayout"
+      :oldFormPath="{ add: 'WebsiteManagement/marketproductMag/modules' }"
+      tableName="marketproductMagTable"
+      idName="sa_fadid"
+      :apiId="{ query: 20240920101703, del: '' }"
+      :isExport="false"
+      :autoQuery="false"
+  >
+    <template #custom>
+      <div class="mt-10">
+        <label class="search__label">状态:</label>
+        <el-select
+            class="inline-24"
+            v-model="whereSelect.isonsale"
+            placeholder="请选择类型"
+            @change="selectChange"
+            size="small"
+            clearable
+        >
+          <el-option label="新建" value="0"></el-option>
+          <el-option label="发布" value="1"></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: #3874f6"
+            >{{ scope.data.column.data[scope.data.column.columnname] }}</span
+            >
+          <span v-else style="color: #52c41a">{{
+              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>
+  </basicLayout>
+</template>
+
+<script>
+export default {
+  name: "index",
+  data(){
+    return {
+      siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+      date: [],
+      whereSelect: {
+        "condition":"",
+        "isonsale":"",
+        "class":""
+      },
+    }
+  },
+  methods:{
+    listData(){
+      this.$refs.basicLayout.param.content.siteid = this.siteid
+      this.$refs.basicLayout.listData(this.$refs.basicLayout.param.content.pageNumber = 1)
+    },
+    selectChange() {
+      this.$refs.basicLayout.param.content.siteid = this.siteid
+      this.$refs.basicLayout.param.content.where = this.whereSelect;
+      this.listData();
+    },
+  },
+  mounted() {
+    this.listData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 187 - 0
src/WebsiteManagement/marketproductMag/modules/add.vue

@@ -0,0 +1,187 @@
+<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="onClose"
+    >
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" size="mini">
+            <el-col :span="24">
+              <el-form-item label="商品" prop="itemname">
+                <el-popover
+                    placement="bottom-start"
+                    width="700"
+                    trigger="click"
+                    v-model="dialogPopover"
+                   >
+                  <productTemplate :sa_fadid="form.sa_fadid" @selectPro="selectPro"></productTemplate>
+                  <el-input slot="reference" v-model="form.itemname" placeholder="选择商品"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item >
+                <p style="font-size: 14px; margin-top: 10px">技术参数</p>
+                <div style="margin-top: 10px;min-height: 200px !important;">
+                  <myEditor
+                      ref="technicalparam"
+                      height="200px"
+                      :content="form.technicalparam"
+                      :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item >
+                <p style="font-size: 14px; margin-top: 10px">材质说明</p>
+                <div style="margin-top: 10px;min-height: 200px !important;">
+                  <myEditor
+                      ref="materialdescription"
+                      height="200px"
+                      :content="form.materialdescription"
+                      :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item >
+                <p style="font-size: 14px; margin-top: 10px">产品概述</p>
+                <div style="margin-top: 10px;min-height: 200px !important;">
+                  <myEditor
+                      ref="contentstr"
+                      height="200px"
+                      :content="form.contentstr"
+                      :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="分类" prop="class">
+                <el-select
+                    v-model="form.class"
+                    clearable
+                    placeholder="请选择分类"
+                    @focus="queryClass"
+                    style="width: 100%"
+                >
+                  <el-option
+                      v-for="item in classData"
+                      :key="item.value"
+                      :label="item.remarks"
+                      :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="状态" prop="status" >
+                <el-radio-group v-model="form.isonsale" style="width: 100%">
+                  <el-radio label="0">新建</el-radio>
+                  <el-radio label="1">发布</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button
+            size="small"
+            type="primary"
+            @click="onClose"
+            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 productTemplate from "@/WebsiteManagement/marketproductMag/compents/productTemplate";
+import myEditor from "@/components/my-editor/Editor.vue";
+export default {
+  name: "add",
+  components:{productTemplate,myEditor},
+  data(){
+    return {
+      dialogFormVisible:false,
+      dialogPopover:false,
+      classData:[],
+      form:{
+        "siteid":JSON.parse(sessionStorage.getItem("active_account")).siteid,
+        "sa_fadid":0,     //sa_brandid<=0时 为新增
+        "itemid":"",
+        "itemname":"",
+        "itemno":"",
+        "class":"",
+        "materialdescription":"",
+        "technicalparam":"",
+        "contentstr":"",
+        "isonsale":"0"
+      },
+      rules: {
+        itemname: [{ required: true, message: "请选择商品", trigger: "change" }],
+        class: [{ required: true, message: "请选择分类", trigger: "change" }],
+      },
+    }
+  },
+  methods:{
+    addBtn(){
+    },
+    onSubmit(){
+      this.$refs.form.validate(async (valid)=>{
+        if (!valid) return false
+        this.form.technicalparam = this.$refs.technicalparam.html
+        this.form.materialdescription = this.$refs.materialdescription.html
+        this.form.contentstr = this.$refs.contentstr.html
+        const res = await this.$api.requested({
+          "id": "20240920101303",
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogFormVisible = false
+          this.$emit('onSuccess')
+        })
+      })
+    },
+    selectPro(data){
+      this.dialogPopover = false
+      this.form.itemname = data.itemname
+      this.form.itemid = data.itemid
+      this.form.itemno = data.itemno
+    },
+    async queryClass(){
+      console.log(this.classData,'33333')
+      if (this.classData.length == 0){
+        const res = await this.$store.dispatch('optiontypeselect','marketproductclass')
+        this.classData = res.data
+      }
+    },
+    onClose(){}
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 0
src/WebsiteManagement/marketproductMag/modules/edit.vue

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

+ 33 - 24
src/WebsiteManagement/serviceAppointMag/compents/dialogTemplate.vue

@@ -1,19 +1,29 @@
 <template>
   <div>
     <el-dialog
-        :visible.sync="dialogVisible"
-        center
-        append-to-body
-        :width="width"
-        @close="onClose"
-        >
+      :visible.sync="dialogVisible"
+      center
+      append-to-body
+      :width="width"
+      @close="onClose"
+    >
       <template slot="title">
-        <div style="float: left">{{title}}</div>
+        <div style="float: left">{{ title }}</div>
       </template>
       <slot name="content"></slot>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="onClose" class="normal-btn-width" size="mini">取 消</el-button>
-        <el-button type="primary" @click="onSubmit" class="normal-btn-width" size="mini" :disabled="disabled && title == '拒绝服务'" :loading="loading">确 定</el-button>
+        <el-button @click="onClose" class="normal-btn-width" size="mini"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          size="mini"
+          :disabled="disabled && title == '拒绝服务'"
+          :loading="loading"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
   </div>
@@ -22,25 +32,24 @@
 <script>
 export default {
   name: "dialogTemplate",
-  props:["title","disabled","width"],
-  data(){
+  props: ["title", "disabled", "width"],
+  data() {
     return {
-      dialogVisible:false,
-      loading:false
-    }
+      dialogVisible: false,
+      loading: false,
+    };
   },
-  methods:{
-    onClose(){
-      this.dialogVisible = false
-      this.$emit('onClose')
+  methods: {
+    onClose() {
+      this.dialogVisible = false;
+      this.$emit("onClose");
     },
-    onSubmit(){
-      this.$emit('onSubmit')
-    }
-  }
-}
+    onSubmit() {
+      this.$emit("onSubmit");
+    },
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 68 - 35
src/WebsiteManagement/serviceAppointMag/compents/tableTemplate.vue

@@ -1,25 +1,60 @@
 <template>
   <div>
-    <el-input v-if="!hideSearch" style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+    <el-input
+      v-if="!hideSearch"
+      style="width: 200px"
+      placeholder="搜索"
+      :suffix-icon="
+        param.content.where.condition
+          ? param.content.where.condition.length > 0
+            ? ''
+            : ''
+          : 'el-icon-search'
+      "
+      v-model="param.content.where.condition"
+      @keyup.native.enter="listData((param.content.pageNumber = 1))"
+      @clear="listData((param.content.pageNumber = 1))"
+      size="small"
+      class="input-with-select inline-16 layout_search__panel"
+      clearable
+    >
     </el-input>
-    <tableDetailLayout style="margin-top: 10px" :layout="tablecols" :data="list" :opwidth="200" :width="true" :custom="true" :fixedName="'operation'" :height="height">
+    <tableDetailLayout
+      style="margin-top: 10px"
+      :layout="tablecols"
+      :data="list"
+      :opwidth="200"
+      :width="true"
+      :custom="true"
+      :fixedName="'operation'"
+      :height="height"
+    >
       <template v-slot:customcol="scope">
-        {{ scope.column.data[[scope.column.columnname]] ? scope.column.data[[scope.column.columnname]] : '--' }}
+        {{
+          scope.column.data[[scope.column.columnname]]
+            ? scope.column.data[[scope.column.columnname]]
+            : "--"
+        }}
       </template>
       <template v-slot:opreation="scope">
-        <slot name="detail"></slot>
+        <slot name="detail" :data="scope.data"></slot>
       </template>
     </tableDetailLayout>
-    <div v-if="!hidePagination" class="container normal-panel" style="text-align:right">
+    <div
+      v-if="!hidePagination"
+      class="container normal-panel"
+      style="text-align: right"
+    >
       <el-pagination
-          background
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-sizes="[20, 50, 100, 200]"
-          :page-size="20"
-          layout="total,sizes, prev, pager, next, jumper"
-          :total="total">
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[20, 50, 100, 200]"
+        :page-size="20"
+        layout="total,sizes, prev, pager, next, jumper"
+        :total="total"
+      >
       </el-pagination>
     </div>
   </div>
@@ -28,41 +63,39 @@
 <script>
 export default {
   name: "CNCode",
-  props:['param','hideSearch','hidePagination','height','tablecols'],
-  data(){
+  props: ["param", "hideSearch", "hidePagination", "height", "tablecols"],
+  data() {
     return {
-      list:[],
-      total:0,
-      currentPage:0
-    }
+      list: [],
+      total: 0,
+      currentPage: 0,
+    };
   },
-  methods:{
-    async listData(){
-      const res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.currentPage = res.pageNumber
-      this.total = res.total
-      this.$emit('listData',this.list)
+  methods: {
+    async listData() {
+      const res = await this.$api.requested(this.param);
+      this.list = res.data;
+      this.currentPage = res.pageNumber;
+      this.total = res.total;
+      this.$emit("listData", this.list);
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
-      this.param.content.pageSize = val
-      this.listData()
+      this.param.content.pageSize = val;
+      this.listData();
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
-      this.param.content.pageNumber = val
-      this.listData()
+      this.param.content.pageNumber = val;
+      this.listData();
     },
   },
   mounted() {
-    this.listData()
+    this.listData();
   },
-  created () {
-  },
-}
+  created() {},
+};
 </script>
 
 <style scoped>
-
 </style>

+ 162 - 111
src/WebsiteManagement/serviceAppointMag/detail/index.vue

@@ -1,29 +1,67 @@
 <template>
   <div>
     <basicDetails
-        ref="details"
-        :mainAreaData="mainAreaData"
-        :turnPageId="20240902102903"
-        idname="sa_endcustserviceorderid"
-        :editData="mainData"
-        :titleText="mainData.billno"
-        :tabs="isShowSn?['服务商品','工单']:['工单']"
-        @pageChange="pageChange">
+      ref="details"
+      :mainAreaData="mainAreaData"
+      :turnPageId="20240902102903"
+      idname="sa_endcustserviceorderid"
+      :editData="mainData"
+      :titleText="mainData.billno"
+      :tabs="isShowSn ? ['服务商品', '工单'] : ['工单']"
+      @pageChange="pageChange"
+    >
       <div slot="customOperation">
-        <transferService v-if="tool.checkAuth($route.name,'transferService') && mainData.status == '待处理'" btnTitle="转服务申请单" class="inline-16" message="确定将预约单转服务申请单吗" @onSuccess="queryMainData($route.query.id)" :data="mainData"></transferService>
+        <transferService
+          v-if="
+            tool.checkAuth($route.name, 'transferService') &&
+            mainData.status == '待处理'
+          "
+          btnTitle="转服务申请单"
+          class="inline-16"
+          message="确定将预约单转服务申请单吗"
+          @onSuccess="queryMainData($route.query.id)"
+          :data="mainData"
+        ></transferService>
       </div>
-      <div slot="slot0" >
-        <tableTemplate v-if="isShowSn" :param="SNParam" height="calc(100vh - 380px)" :tablecols="SNTablecols" @listData="listData"></tableTemplate>
-        <tableTemplate v-if="!isShowSn" :param="workParam" height="calc(100vh - 380px)" :tablecols="workTablecols">
+      <div slot="slot0">
+        <tableTemplate
+          v-if="isShowSn"
+          :param="SNParam"
+          height="calc(100vh - 380px)"
+          :tablecols="SNTablecols"
+          @listData="listData"
+        ></tableTemplate>
+        <tableTemplate
+          v-if="!isShowSn"
+          :param="workParam"
+          height="calc(100vh - 380px)"
+          :tablecols="workTablecols"
+        >
           <template v-slot:detail="scope">
-            <el-button type="text" size="mini" class="inline-16" @click="goDetail(scope.data)">详 情</el-button>
+            <el-button
+              type="text"
+              size="mini"
+              class="inline-16"
+              @click="goDetail(scope.data)"
+              >详 情</el-button
+            >
           </template>
         </tableTemplate>
       </div>
-      <div slot="slot1" >
-        <tableTemplate  :param="workParam" height="calc(100vh - 380px)" :tablecols="workTablecols">
+      <div slot="slot1">
+        <tableTemplate
+          :param="workParam"
+          height="calc(100vh - 380px)"
+          :tablecols="workTablecols"
+        >
           <template v-slot:detail="scope">
-            <el-button type="text" size="mini" class="inline-16" @click="goDetail(scope.data)">详 情</el-button>
+            <el-button
+              type="text"
+              size="mini"
+              class="inline-16"
+              @click="goDetail(scope.data)"
+              >详 情</el-button
+            >
           </template>
         </tableTemplate>
       </div>
@@ -36,148 +74,161 @@ import tableTemplate from "@/WebsiteManagement/serviceAppointMag/compents/tableT
 import transferService from "../modules/transferService";
 export default {
   name: "index",
-  components:{tableTemplate,transferService},
-  data(){
+  components: { tableTemplate, transferService },
+  data() {
     return {
-      mainAreaData:{},
-      mainData:{},
-      isShowSn:true,
-      SNParam:{
-        "id": "20240902134203",
-        "content": {
-          "siteid":JSON.parse(sessionStorage.getItem('active_account')).siteid,
-          "sa_endcustserviceorderid":this.$route.query.id,
-          "pageNumber":1,
-          "pageSize":50,
-          "where":{
-            "condition":""
-          }
-        }
+      mainAreaData: {},
+      mainData: {},
+      isShowSn: true,
+      SNParam: {
+        id: "20240902134203",
+        content: {
+          siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+          sa_endcustserviceorderid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 50,
+          where: {
+            condition: "",
+          },
+        },
       },
-      SNTablecols:this.tool.tabelCol(this.$route.name)['SNCodeTable'].tablecols,
-      workParam:{
-        "id": "20240902102803",
-        "content": {
-          "siteid":JSON.parse(sessionStorage.getItem('active_account')).siteid,
-          "sa_endcustserviceorderid":this.$route.query.id,
-          "pageNumber":1,
-          "pageSize":50,
-          "where":{
-            "condition":""
-          }
-        }
+      SNTablecols: this.tool.tabelCol(this.$route.name)["SNCodeTable"]
+        .tablecols,
+      workParam: {
+        id: "20240902102803",
+        content: {
+          siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+          sa_endcustserviceorderid: this.$route.query.id,
+          pageNumber: 1,
+          pageSize: 50,
+          where: {
+            condition: "",
+          },
+        },
       },
-      workTablecols:this.tool.tabelCol(this.$route.name)['WorkBillTable'].tablecols,
-    }
+      workTablecols: this.tool.tabelCol(this.$route.name)["WorkBillTable"]
+        .tablecols,
+    };
   },
-  methods:{
-    async queryMainData(id){
+  methods: {
+    async queryMainData(id) {
       const res = await this.$api.requested({
-        "id": "20240902102703",
-        "content": {
-          "siteid":"HY",
-          "sa_endcustserviceorderid":id
-        }
-      })
-      this.mainData = Object.assign({},this.mainData,res.data)
-      this.changeDataStructure()
+        id: "20240902102703",
+        content: {
+          siteid: "HY",
+          sa_endcustserviceorderid: id,
+        },
+      });
+      this.mainData = Object.assign({}, this.mainData, res.data);
+      this.changeDataStructure();
     },
-    changeDataStructure () {
-      let that = this
+    changeDataStructure() {
+      let that = this;
       this.mainAreaData = [
         {
-          label:'企业名称',
-          value: this.mainData.enterprisename
+          label: "企业名称",
+          value: this.mainData.enterprisename,
         },
         {
-          label:'联系人',
-          value: this.mainData.name
+          label: "联系人",
+          value: this.mainData.name,
         },
         {
-          label:'联系电话',
-          value: this.mainData.phonenumber
+          label: "联系电话",
+          value: this.mainData.phonenumber,
         },
         {
-          label:'省市县',
-          value: this.mainData.province + '-' + this.mainData.county + '-' + this.mainData.city
+          label: "省市县",
+          value:
+            this.mainData.province +
+            "-" +
+            this.mainData.county +
+            "-" +
+            this.mainData.city,
         },
         {
-          label:'详细地址',
-          value: this.mainData.address
+          label: "详细地址",
+          value: this.mainData.address,
         },
         {
-          label:'提交人手机号',
-          value: this.mainData.scenecontactphonenumber
+          label: "提交人手机号",
+          value: this.mainData.scenecontactphonenumber,
         },
         {
-          label:'状态',
+          label: "状态",
           value: this.mainData.status,
-          style:function () {
-            let style = {}
+          style: function () {
+            let style = {};
             switch (that.mainData.status) {
-              case '待处理':
-                style = {color:'#d90a0a'}
+              case "待处理":
+                style = { color: "#d90a0a" };
                 break;
-              case '已确认':
-                style = {color:'#79da56'}
+              case "已确认":
+                style = { color: "#79da56" };
                 break;
-              case '服务中':
-                style = {color:'#1376e7'}
+              case "服务中":
+                style = { color: "#1376e7" };
                 break;
               default:
-                style = {color:'#151515'}
+                style = { color: "#151515" };
                 break;
             }
-            return style
-
-          }
+            return style;
+          },
         },
         {
-          label:'服务类型',
-          value: this.mainData.servicetype
+          label: "服务类型",
+          value: this.mainData.servicetype,
         },
         {
-          label:'应用系统',
-          value: this.mainData.class1
+          label: "应用系统",
+          value: this.mainData.class1,
         },
         {
-          label:'客诉大类',
-          value: this.mainData.class2
+          label: "客诉大类",
+          value: this.mainData.class2,
         },
         {
-          label:'问题描述',
-          value: this.mainData.remarks
-        }
-      ]
+          label: "问题描述",
+          value: this.mainData.remarks,
+        },
+      ];
     },
     // 监听切换数据,上一页,下一页
-    pageChange (id,rowindex) {
-      this.flag = 0
-      this.$router.replace({path:'/serviceAppointMagDetail',query:{id:id,rowindex:rowindex,portrait:''}})
-      this.queryMainData(id)
+    pageChange(id, rowindex) {
+      this.flag = 0;
+      this.$router.replace({
+        path: "/serviceAppointMagDetail",
+        query: { id: id, rowindex: rowindex, portrait: "" },
+      });
+      this.queryMainData(id);
     },
     /*工单跳转*/
-    goDetail (scope) {
-      let route = this.$route
-      if (route.path !== '/workorderDetail') {
-        this.oldRoute = {path:route.path,query:route.query}
-        this.$store.dispatch('setHistoryRouter',this.oldRoute)
+    goDetail(scope) {
+      let route = this.$route;
+      if (route.path !== "/workorderDetail") {
+        this.oldRoute = { path: route.path, query: route.query };
+        this.$store.dispatch("setHistoryRouter", this.oldRoute);
       }
-      this.$router.replace({path:'/workorderDetail',query:{id:scope.data.sa_workorderid,rowindex:scope.data.rowindex}})
+      this.$router.replace({
+        path: "/workorderDetail",
+        query: { id: scope.data.sa_workorderid, rowindex: scope.data.rowindex },
+      });
+    },
+    listData(data) {
+      data.length > 0 ? (this.isShowSn = true) : (this.isShowSn = false);
     },
-    listData(data){
-      data.length > 0?this.isShowSn = true:this.isShowSn = false
-    }
   },
   mounted() {
-    this.queryMainData(this.$route.query.id)
+    this.queryMainData(this.$route.query.id);
   },
   created() {
-    this.SNTablecols = this.tool.tabelCol(this.$route.name)['accountMoneyDetailTable'].tablecols
-  }
-}
+    this.SNTablecols = this.tool.tabelCol(this.$route.name)[
+      "accountMoneyDetailTable"
+    ].tablecols;
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 87 - 60
src/WebsiteManagement/serviceAppointMag/index.vue

@@ -1,17 +1,25 @@
 <template>
   <basicLayout
-      style="padding-top:0 !important"
-      ref="basicLayout"
-      tableName="servicAppointTable"
-      idName="sa_endcustserviceorderid"
-      :apiId="{query:20240902102903,del:''}"
-      :detailPath="{path:'/serviceAppointMagDetail'}"
-      :isExport="false"
-      :autoQuery="false">
-    <template #custom >
+    style="padding-top: 0 !important"
+    ref="basicLayout"
+    tableName="servicAppointTable"
+    idName="sa_endcustserviceorderid"
+    :apiId="{ query: 20240902102903, del: '' }"
+    :detailPath="{ path: '/serviceAppointMagDetail' }"
+    :isExport="false"
+    :autoQuery="false"
+  >
+    <template #custom>
       <div class="mt-10">
-        <label  class="search__label">状态:</label>
-        <el-select class="inline-24" v-model="whereSelect.status" placeholder="请选择类型" @change="selectChange" size="small" clearable>
+        <label class="search__label">状态:</label>
+        <el-select
+          class="inline-24"
+          v-model="whereSelect.status"
+          placeholder="请选择类型"
+          @change="selectChange"
+          size="small"
+          clearable
+        >
           <el-option label="待处理" value="待处理"></el-option>
           <el-option label="已确认" value="已确认"></el-option>
           <el-option label="服务中" value="服务中"></el-option>
@@ -22,28 +30,46 @@
       <div class="mt-10">
         <label class="search__label">提交日期:</label>
         <el-date-picker
-            v-model="date"
-            style="margin-right: 24px !important;"
-            size="small"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            :default-time="['00:00:00', '23:59:59']"
-            @change="selectChange">
+          v-model="date"
+          style="margin-right: 24px !important"
+          size="small"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :default-time="['00:00:00', '23:59:59']"
+          @change="selectChange"
+        >
         </el-date-picker>
       </div>
     </template>
     <template v-slot:tbList="scope">
-      <div v-if="scope.data.column.columnname == 'status'" :style="styleSet(scope.data.column.data[[scope.data.column.columnname]])">
-        {{scope.data.column.data[[scope.data.column.columnname]]}}
+      <div
+        v-if="scope.data.column.columnname == 'status'"
+        :style="
+          styleSet(scope.data.column.data[[scope.data.column.columnname]])
+        "
+      >
+        {{ scope.data.column.data[[scope.data.column.columnname]] }}
       </div>
       <div v-else-if="scope.data.column.columnname == 'province'">
-        {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]] + '-' + scope.data.column.data.county + '-' + scope.data.column.data.city :'--'}}
+        {{
+          scope.data.column.data[[scope.data.column.columnname]]
+            ? scope.data.column.data[[scope.data.column.columnname]] +
+              "-" +
+              scope.data.column.data.county +
+              "-" +
+              scope.data.column.data.city
+            : "--"
+        }}
       </div>
       <div v-else>
-        {{scope.data.column.data[[scope.data.column.columnname]]?scope.data.column.data[[scope.data.column.columnname]]:'--'}}
+        {{
+          scope.data.column.data[[scope.data.column.columnname]]
+            ? scope.data.column.data[[scope.data.column.columnname]]
+            : "--"
+        }}
       </div>
     </template>
   </basicLayout>
@@ -52,51 +78,52 @@
 <script>
 export default {
   name: "index",
-  data(){
+  data() {
     return {
-      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
-      date:[],
-      whereSelect:{
-        status:'',
-        begindate:'',
-        enddate:''
+      siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+      date: [],
+      whereSelect: {
+        status: "",
+        begindate: "",
+        enddate: "",
       },
-    }
+    };
   },
   mounted() {
-    this.listData()
+    this.listData();
   },
-  methods:{
-    listData(){
-      this.$refs.basicLayout.param.content.siteid = this.siteid
-      this.$refs.basicLayout.listData(this.$refs.basicLayout.param.content.pageNumner = 1)
+  methods: {
+    listData() {
+      this.$refs.basicLayout.param.content.siteid = this.siteid;
+      this.$refs.basicLayout.listData(
+        (this.$refs.basicLayout.param.content.pageNumner = 1)
+      );
     },
-    selectChange(){
-      this.$refs.basicLayout.param.content.where = this.whereSelect
-      if (this.date){
-        this.whereSelect.begindate = this.date[0]
-        this.whereSelect.enddate = this.date[1]
-      }else {
-        this.whereSelect.begindate = ''
-        this.whereSelect.enddate = ''
+    selectChange() {
+      this.$refs.basicLayout.param.content.where = this.whereSelect;
+      if (this.date) {
+        this.whereSelect.begindate = this.date[0];
+        this.whereSelect.enddate = this.date[1];
+      } else {
+        this.whereSelect.begindate = "";
+        this.whereSelect.enddate = "";
       }
-      this.listData()
+      this.listData();
     },
-    styleSet(val){
-      let style
+    styleSet(val) {
+      let style;
       style = {
-        "待处理":{color:'#d90a0a'},
-        "已确认":{color:'#79da56'},
-        "服务中":{color:'#1376e7'},
-        "已结束":{color:'#151515'},
-        "已拒绝":{color:'#151515'},
-      }[val]
-      return style
-    }
-  }
-}
+        待处理: { color: "#d90a0a" },
+        已确认: { color: "#79da56" },
+        服务中: { color: "#1376e7" },
+        已结束: { color: "#151515" },
+        已拒绝: { color: "#151515" },
+      }[val];
+      return style;
+    },
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 315 - 201
src/WebsiteManagement/serviceAppointMag/modules/transferService.vue

@@ -1,121 +1,233 @@
 <template>
   <div>
-    <el-button type="primary" size="small" @click="open">{{btnTitle}}</el-button>
-    <dialogTemplate ref="dialogRef" :title="title" @onClose="onClose" @onSubmit="onSubmit" :disabled="backreason.length == 0" width="800px">
+    <el-button type="primary" size="small" @click="open">{{
+      btnTitle
+    }}</el-button>
+    <dialogTemplate
+      ref="dialogRef"
+      :title="title"
+      @onClose="onClose"
+      @onSubmit="onSubmit"
+      :disabled="backreason.length == 0"
+      width="800px"
+    >
       <template slot="content">
         <div v-if="title == '转服务申请单'">
           <el-row :gutter="20">
-            <el-form :model="form" :rules="rules" ref="form" label-width="140px" label-position="right" size="mini">
+            <el-form
+              :model="form"
+              :rules="rules"
+              ref="form"
+              label-width="140px"
+              label-position="right"
+              size="mini"
+            >
               <el-col :span="12">
-                <el-form-item label="企业名称:" prop="enterprisename" >
-                  <selectAgent :customParam="agentParam" ref="agent" @selectRow="agentChange" qiyi="企业名称">
-                    <el-input readonly type="text" slot="input" size="mini" @focus="$refs.agent.visible=true" v-model="form.enterprisename"></el-input>
+                <el-form-item label="企业名称:" prop="enterprisename">
+                  <selectAgent
+                    :customParam="agentParam"
+                    ref="agent"
+                    @selectRow="agentChange"
+                    qiyi="企业名称"
+                  >
+                    <el-input
+                      readonly
+                      type="text"
+                      slot="input"
+                      size="mini"
+                      @focus="$refs.agent.visible = true"
+                      v-model="form.enterprisename"
+                    ></el-input>
                   </selectAgent>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="服务类型" prop="servicetype">
-                  <el-select class="inline-24" v-model="form.servicetype" @change="classChange"  placeholder="请选择状态" size="mini" clearable>
-                    <el-option v-for="(item,index) in serveClassList" :key="index" :label="item.value" :value="item.value"></el-option>
+                  <el-select
+                    class="inline-24"
+                    v-model="form.servicetype"
+                    @change="classChange"
+                    placeholder="请选择状态"
+                    size="mini"
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in serveClassList"
+                      :key="index"
+                      :label="item.value"
+                      :value="item.value"
+                    ></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="12" v-if="form.servicetype == '售中' || form.servicetype == '售后'">
+              <el-col
+                :span="12"
+                v-if="form.servicetype == '售中' || form.servicetype == '售后'"
+              >
                 <el-form-item label="订单号:" prop="sonum">
-                  <selectOrder :id="form.sys_enterpriseid" ref="order" @selectRow="orderChange">
-                    <el-input readonly :disabled="!form.sys_enterpriseid" type="text" slot="input" size="mini" @focus="$refs.order.listData(),$refs.order.visible=true" v-model="form.sonum"></el-input>
+                  <selectOrder
+                    :id="form.sys_enterpriseid"
+                    ref="order"
+                    @selectRow="orderChange"
+                  >
+                    <el-input
+                      readonly
+                      :disabled="!form.sys_enterpriseid"
+                      type="text"
+                      slot="input"
+                      size="mini"
+                      @focus="
+                        $refs.order.listData(), ($refs.order.visible = true)
+                      "
+                      v-model="form.sonum"
+                    ></el-input>
                   </selectOrder>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="单据日期" prop="billdate">
                   <el-date-picker
-                      v-model="form.billdate"
-                      type="date"
-                      value-format="yyyy-MM-dd"
-                      placeholder="选择日期">
+                    v-model="form.billdate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="省市县" prop="province">
                   <el-cascader
-                      size="mini"
-                      v-model="form.province"
-                      :options="basicData.data().areaData"
-                      ref="cascader">
+                    size="mini"
+                    v-model="form.province"
+                    :options="basicData.data().areaData"
+                    ref="cascader"
+                  >
                   </el-cascader>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="地址" prop="address">
-                  <el-input v-model="form.address" placeholder="请输入地址"></el-input>
+                  <el-input
+                    v-model="form.address"
+                    placeholder="请输入地址"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="服务联系人" prop="scenecontact">
-                  <el-input v-model="form.scenecontact" placeholder="请输入服务联系人"></el-input>
+                  <el-input
+                    v-model="form.scenecontact"
+                    placeholder="请输入服务联系人"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="联系人角色" prop="scenecontactrole">
-                  <el-input v-model="form.scenecontactrole" placeholder="请输入联系人角色"></el-input>
+                  <el-input
+                    v-model="form.scenecontactrole"
+                    placeholder="请输入联系人角色"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="服务联系电话" prop="scenecontactphonenumber">
-                  <el-input v-model="form.scenecontactphonenumber" placeholder="请输入服务联系电话"></el-input>
+                <el-form-item
+                  label="服务联系电话"
+                  prop="scenecontactphonenumber"
+                >
+                  <el-input
+                    v-model="form.scenecontactphonenumber"
+                    placeholder="请输入服务联系电话"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="应用系统" prop="class1">
-                  <el-select class="inline-24" v-model="form.class1" @change="classChange" placeholder="请选择应用系统" size="mini" clearable>
-                    <el-option v-for="(item,index) in systemapp" :key="index" :label="item.value" :value="item.value"></el-option>
+                  <el-select
+                    class="inline-24"
+                    v-model="form.class1"
+                    @change="classChange"
+                    placeholder="请选择应用系统"
+                    size="mini"
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in systemapp"
+                      :key="index"
+                      :label="item.value"
+                      :value="item.value"
+                    ></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="客诉大类" prop="class2">
-                  <el-select class="inline-24" v-model="form.class2" @change="classChange" placeholder="请选择客诉大类" size="mini" clearable>
-                    <el-option v-for="(item,index) in customerclass" :key="index" :label="item.value" :value="item.value"></el-option>
+                  <el-select
+                    class="inline-24"
+                    v-model="form.class2"
+                    @change="classChange"
+                    placeholder="请选择客诉大类"
+                    size="mini"
+                    clearable
+                  >
+                    <el-option
+                      v-for="(item, index) in customerclass"
+                      :key="index"
+                      :label="item.value"
+                      :value="item.value"
+                    ></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="申请原因" prop="reason">
-                  <el-input v-model="form.reason" placeholder="请输入申请原因"></el-input>
+                  <el-input
+                    v-model="form.reason"
+                    placeholder="请输入申请原因"
+                  ></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="需求服务开始日期" prop="begdate">
                   <el-date-picker
-                      v-model="form.begdate"
-                      type="date"
-                      value-format="yyyy-MM-dd"
-                      placeholder="选择日期">
+                    v-model="form.begdate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="需求服务结束日期" prop="enddate">
                   <el-date-picker
-                      v-model="form.enddate"
-                      type="date"
-                      value-format="yyyy-MM-dd"
-                      placeholder="选择日期">
+                    v-model="form.enddate"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                  >
                   </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="备注" prop="remarks">
-                  <el-input type="textarea" v-model="form.remarks" placeholder="请输入备注"></el-input>
+                  <el-input
+                    type="textarea"
+                    v-model="form.remarks"
+                    placeholder="请输入备注"
+                  ></el-input>
                 </el-form-item>
               </el-col>
             </el-form>
           </el-row>
         </div>
         <div v-else>
-          <el-input style="margin-top: 10px" type="textarea" v-model="backreason" placeholder="填写拒绝原因" ></el-input>
+          <el-input
+            style="margin-top: 10px"
+            type="textarea"
+            v-model="backreason"
+            placeholder="填写拒绝原因"
+          ></el-input>
         </div>
       </template>
     </dialogTemplate>
@@ -124,208 +236,210 @@
 
 <script>
 import dialogTemplate from "@/WebsiteManagement/serviceAppointMag/compents/dialogTemplate";
-import selectAgent from '@/template/selectAgent/index'
-import selectOrder from '@/HDrpManagement/serveBillMag/components/selectOrder'
+import selectAgent from "@/template/selectAgent/index";
+import selectOrder from "@/HDrpManagement/serveBillMag/components/selectOrder";
 export default {
   name: "transferService",
-  props:['btnTitle','message','data'],
-  components:{dialogTemplate,selectAgent,selectOrder},
-  data(){
+  props: ["btnTitle", "message", "data"],
+  components: { dialogTemplate, selectAgent, selectOrder },
+  data() {
     return {
-      dialogVisible:false,
-      title:'',
-      form:{
-        "sa_serviceorderid":0,     //sa_brandid<=0时 为新增
-        "servicetype":"",
-        "sa_orderid":0,
-        "sonum":"",
-        "sys_enterpriseid":'',
-        "enterprisename":'',
-        "remarks":"",
-        "class1":"",
-        "class2":"",
-        "reason":"",
-        "province":"",
-        "city":"",
-        "county":"",
-        "address":"",
-        "scenecontact":"",
-        "scenecontactrole":"",
-        "scenecontactphonenumber":"",
-        "billdate":`${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`,
-        "begdate":"",
-        "enddate":""
+      dialogVisible: false,
+      title: "",
+      form: {
+        sa_serviceorderid: 0, //sa_brandid<=0时 为新增
+        servicetype: "",
+        sa_orderid: 0,
+        sonum: "",
+        sys_enterpriseid: "",
+        enterprisename: "",
+        remarks: "",
+        class1: "",
+        class2: "",
+        reason: "",
+        province: "",
+        city: "",
+        county: "",
+        address: "",
+        scenecontact: "",
+        scenecontactrole: "",
+        scenecontactphonenumber: "",
+        billdate: `${new Date().getFullYear()}-${
+          new Date().getMonth() + 1
+        }-${new Date().getDate()}`,
+        begdate: "",
+        enddate: "",
       },
-      rules:{
-        servicetype:[
-          { required: true, message: '请选择服务类型', trigger: 'change'},
+      rules: {
+        servicetype: [
+          { required: true, message: "请选择服务类型", trigger: "change" },
         ],
-        enterprisename:[
-          { required: true, message: '请选择经销商', trigger: 'change'}
-        ],
-        sonum:[
-          { required: true, message: '请选择订单', trigger: 'change'},
+        enterprisename: [
+          { required: true, message: "请选择经销商", trigger: "change" },
         ],
+        sonum: [{ required: true, message: "请选择订单", trigger: "change" }],
         scenecontactphonenumber: [
-          { required: true, message: '请填写手机号码', trigger: 'blur'},
-          { pattern:/^1[3-9][0-9]\d{8}$/, message: '请输入正确手机号码',trigger: 'blur' }
-        ],
-        province:[
-          { required: true, message: '请选择省市县', trigger: 'change'},
-        ],
-        address:[
-          { required: true, message: '请填写地址', trigger: 'blur'},
+          { required: true, message: "请填写手机号码", trigger: "blur" },
+          {
+            pattern: /^1[3-9][0-9]\d{8}$/,
+            message: "请输入正确手机号码",
+            trigger: "blur",
+          },
         ],
-        scenecontact:[
-          { required: true, message: '服务联系人', trigger: 'blur'},
+        province: [
+          { required: true, message: "请选择省市县", trigger: "change" },
         ],
-        scenecontactrole:[
-          { required: true, message: '联系人角色', trigger: 'blur'},
+        address: [{ required: true, message: "请填写地址", trigger: "blur" }],
+        scenecontact: [
+          { required: true, message: "服务联系人", trigger: "blur" },
         ],
-        class1:[
-          { required: true, message: '应用系统', trigger: 'change'},
+        scenecontactrole: [
+          { required: true, message: "联系人角色", trigger: "blur" },
         ],
-        class2:[
-          { required: true, message: '客诉大类', trigger: 'change'},
+        class1: [{ required: true, message: "应用系统", trigger: "change" }],
+        class2: [{ required: true, message: "客诉大类", trigger: "change" }],
+        reason: [{ required: true, message: "申请原因", trigger: "blur" }],
+        begdate: [
+          { required: true, message: "需求服务开始日期", trigger: "change" },
         ],
-        reason:[
-          { required: true, message: '申请原因', trigger: 'blur'},
-        ],
-        begdate:[
-          { required: true, message: '需求服务开始日期', trigger: 'change'},
-        ],
-        enddate:[
-          { required: true, message: '需求服务结束日期', trigger: 'change'},
+        enddate: [
+          { required: true, message: "需求服务结束日期", trigger: "change" },
         ],
       },
       agentParam: {
-        "id":20220920083901,
-        "content": {
-          "pageNumber":1,
-          "pageSize":20,
-          "where": {
-            condition:'',
-            type:''
-          }
-        }
+        id: 20220920083901,
+        content: {
+          pageNumber: 1,
+          pageSize: 20,
+          where: {
+            condition: "",
+            type: "",
+          },
+        },
       },
-      backreason:'',
-      disabled:false,
-      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
-      serveClassList:[],
-      customerclass:[],
-      systemapp:[],
-    }
+      backreason: "",
+      disabled: false,
+      siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+      serveClassList: [],
+      customerclass: [],
+      systemapp: [],
+    };
   },
-  methods:{
+  methods: {
     open() {
-      this.$confirm(this.message + '?', '确认信息', {
+      this.$confirm(this.message + "?", "确认信息", {
         distinguishCancelAndClose: true,
-        confirmButtonText: '确认',
-        cancelButtonText: '拒绝'
+        confirmButtonText: "确认",
+        cancelButtonText: "拒绝",
       })
-          .then(async() => {
-            this.title = '转服务申请单'
-            console.log(this.data,'data====')
-            this.form = Object.assign({},this.form,this.data)
-            console.log(this.form,'form')
-            this.$refs.dialogRef.dialogVisible = true
-            this.getServeClass()
-            const res = await this.$store.dispatch('optiontypeselect','customerclass')
-            this.customerclass = res.data
-            const res1 = await this.$store.dispatch('optiontypeselect','systemapp')
-            this.systemapp = res1.data
-          })
-          .catch(action => {
-            if (action === 'cancel'){
-              this.title = '拒绝服务'
-              this.disabled = true
-              this.$refs.dialogRef.dialogVisible = true
-            }
-          });
+        .then(async () => {
+          this.title = "转服务申请单";
+          console.log(this.data, "data====");
+          this.form = Object.assign({}, this.form, this.data);
+          console.log(this.form, "form");
+          this.$refs.dialogRef.dialogVisible = true;
+          this.getServeClass();
+          const res = await this.$store.dispatch(
+            "optiontypeselect",
+            "customerclass"
+          );
+          this.customerclass = res.data;
+          const res1 = await this.$store.dispatch(
+            "optiontypeselect",
+            "systemapp"
+          );
+          this.systemapp = res1.data;
+        })
+        .catch((action) => {
+          if (action === "cancel") {
+            this.title = "拒绝服务";
+            this.disabled = true;
+            this.$refs.dialogRef.dialogVisible = true;
+          }
+        });
     },
-    onSubmit(){
-      if (this.title == '拒绝服务') {
-        this.onRefuse()
-      }else {
-        this.$refs.form.validate(async (valid)=>{
-          if (!valid) return false
-          this.$refs.dialogRef.loading = true
+    onSubmit() {
+      if (this.title == "拒绝服务") {
+        this.onRefuse();
+      } else {
+        this.$refs.form.validate(async (valid) => {
+          if (!valid) return false;
+          this.$refs.dialogRef.loading = true;
           const res = await this.$api.requested({
-            "id": "20240903093303",
-            "content": {
-              "siteid":this.siteid,
-              "sa_endcustserviceorderid":this.$route.query.id,
-              "sys_enterpriseid":this.form.sys_enterpriseid //服务预约单中sys_enterpriseid为0时,此时sys_enterpriseid必传
-            }
-          })
-          this.tool.showMessage(res,()=>{
-            this.$refs.dialogRef.loading = false
-            this.$refs.dialogRef.dialogVisible = false
-            this.$emit('onSuccess')
-          })
-        })
+            id: "20240903093303",
+            content: {
+              siteid: this.siteid,
+              sa_endcustserviceorderid: this.$route.query.id,
+              sys_enterpriseid: this.form.sys_enterpriseid, //服务预约单中sys_enterpriseid为0时,此时sys_enterpriseid必传
+            },
+          });
+          this.tool.showMessage(res, () => {
+            this.$refs.dialogRef.loading = false;
+            this.$refs.dialogRef.dialogVisible = false;
+            this.$emit("onSuccess");
+          });
+        });
       }
     },
-    async onRefuse(){
-      this.$refs.dialogRef.loading = true
+    async onRefuse() {
+      this.$refs.dialogRef.loading = true;
       const res = await this.$api.requested({
-        "id": "20240903093203",
-        "content": {
-          "siteid":this.siteid,
-          "sa_endcustserviceorderid":this.$route.query.id,
-          "backreason":this.backreason
-        }
-      })
-      this.tool.showMessage(res,()=>{
-        this.$refs.dialogRef.loading = false
-        this.$refs.dialogRef.dialogVisible = false
-        this.$emit('onSuccess')
-      })
+        id: "20240903093203",
+        content: {
+          siteid: this.siteid,
+          sa_endcustserviceorderid: this.$route.query.id,
+          backreason: this.backreason,
+        },
+      });
+      this.tool.showMessage(res, () => {
+        this.$refs.dialogRef.loading = false;
+        this.$refs.dialogRef.dialogVisible = false;
+        this.$emit("onSuccess");
+      });
     },
-    inputChange(){
-      console.log(this.backreason)
-      this.backreason.length > 0 ? this.disabled = false:this.disabled = true
+    inputChange() {
+      console.log(this.backreason);
+      this.backreason.length > 0
+        ? (this.disabled = false)
+        : (this.disabled = true);
     },
-    onClose(){
-      this.backreason = ''
+    onClose() {
+      this.backreason = "";
     },
-    agentChange (data) {
+    agentChange(data) {
       console.log(data);
-      this.form.sys_enterpriseid = data.sys_enterpriseid
-      this.form.enterprisename = data.enterprisename
-      this.$refs.agent.visible = false
+      this.form.sys_enterpriseid = data.sys_enterpriseid;
+      this.form.enterprisename = data.enterprisename;
+      this.$refs.agent.visible = false;
 
-      this.form.sa_orderid = 0
-      this.form.sonum = ''
+      this.form.sa_orderid = 0;
+      this.form.sonum = "";
     },
-    async getServeClass () {
+    async getServeClass() {
       let res = await this.$api.requested({
-        "id":20230206112003,
-        "content": {
-        }
-      })
-      this.serveClassList = res.data
+        id: 20230206112003,
+        content: {},
+      });
+      this.serveClassList = res.data;
       console.log(this.serveClassList);
     },
-    orderChange (data) {
+    orderChange(data) {
       console.log(data);
 
-      this.form.sa_orderid = data.sa_orderid
-      this.form.sonum = data.sonum
-      this.$refs.order.visible = false
+      this.form.sa_orderid = data.sa_orderid;
+      this.form.sonum = data.sonum;
+      this.$refs.order.visible = false;
       console.log(this.form.sonum);
-
     },
-    classChange () {
-      if (this.form.servicetype == '售中' || this.form.servicetype == '售后') {
-        this.$refs.agent.param.content.sys_enterpriseid = this.form.sys_enterpriseid
+    classChange() {
+      if (this.form.servicetype == "售中" || this.form.servicetype == "售后") {
+        this.$refs.agent.param.content.sys_enterpriseid =
+          this.form.sys_enterpriseid;
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style scoped>
-
 </style>

+ 9 - 7
src/components/my-editor/Editor.vue

@@ -7,7 +7,7 @@
         :mode="mode"
     />
     <Editor
-        style="height: 500px; overflow-y: hidden;"
+        :style="[{'height': height?height:'500px'},{'overflow-y': 'hidden'}]"
         v-model="html"
         :defaultConfig="editorConfig"
         :mode="mode"
@@ -25,8 +25,10 @@ export default Vue.extend({
         return {
           editor: null,
           html: '',
-          toolbarConfig: { },
-          editorConfig: { 
+          toolbarConfig: {
+            isFullScreen:false
+          },
+          editorConfig: {
             placeholder: '请输入内容...',
             MENU_CONF:{
               uploadImage: {
@@ -35,12 +37,12 @@ export default Vue.extend({
               uploadVideo: {
                 customUpload:this.update
               }
-            } 
+            }
           },
           mode: 'default', // or 'simple'
         }
     },
-    props: ['id','content','disabled'],
+    props: ['id','content','disabled','height'],
     watch: {
       disabled (val) {
         val ? this.editor.disable() : this.editor.enable()
@@ -108,7 +110,7 @@ export default Vue.extend({
                   })
                 })
               }
-              
+
             })
           })
         }
@@ -127,4 +129,4 @@ export default Vue.extend({
     }
 })
 </script>
-<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style src="@wangeditor/editor/dist/css/style.css"></style>

+ 10 - 0
src/router/WebsiteManagement.js

@@ -40,5 +40,15 @@ const WebsiteManagement = [
             },
         ]
     },
+    {
+        path: '/marketproductMag',
+        name: 'marketproductMag',
+        meta: {
+            title: '营销产品管理',
+            ast_nav: true,
+            keeproute: true,
+        },
+        component: () => import('@/WebsiteManagement/marketproductMag/index')
+    },
 ];
 export default WebsiteManagement;