Prechádzať zdrojové kódy

场所详情页面以及录入界面修改功能完善

guoqing 2 rokov pred
rodič
commit
0e1c2f78b8

+ 6 - 0
src/api/placeRegister/placeRegister.js

@@ -47,6 +47,12 @@ export default class placeRegister {
             `/religioussites/siteinfo/religiousSitesInfo/list`,
             params
         )
+    };
+    //获取互联网专区
+    queryInternetBySiteId(id) {
+        return request.get(
+            `/religioussites/siteinfo/religiousSitesInfo/queryInternetBySiteId`, { id: id }
+        )
     }
 
 }

+ 157 - 130
src/views/placeManage/placeRegister/placeRegister.vue

@@ -413,20 +413,23 @@
                   type="primary"
                   size="mini"
                   style="margin-left: 10px; vertical-align: middle"
-                  @click="liveBroadcastAdd()"
+                  @click="addForm('直播间')"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in liveBroadcast" :key="index">
+              <div v-for="(item) in internetForm.zbjForm" :key="item.key">
                 <van-cell-group>
                   <van-field
-                    v-model="item.typeChild"
+                    v-model="item.typeName"
                     center
                     clearable
+                    readonly
                     label-width="7em"
                     label="所属平台:"
                     input-align="right"
-                    placeholder="请填入所属平台"
+                    right-icon="arrow-down"
+                    placeholder="请选择所属平台"
+                    @click="showNew(item.key)"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -463,7 +466,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="liveBroadcastDel(index)"
+                  @click="removeForm(item,'直播间')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -476,12 +479,12 @@
                 公众号<van-button
                   type="primary"
                   size="mini"
-                  @click="publicAccountAdd()"
+                  @click="addForm('公众号')"
                   style="margin-left: 10px; vertical-align: middle"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in publicAccount" :key="index">
+              <div v-for="(item) in internetForm.gzhForm" :key="item.key">
                 <van-cell-group>
                   <van-field
                     v-model="item.account"
@@ -516,7 +519,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="publicAccountDel(index)"
+                  @click="removeForm(item,'公众号')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -530,11 +533,11 @@
                   type="primary"
                   size="mini"
                   style="margin-left: 10px; vertical-align: middle"
-                  @click="wechatAdd()"
+                  @click="addForm('微信群')"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in wechat" :key="index">
+              <div v-for="(item) in internetForm.wxqForm" :key="item.key">
                 <van-cell-group>
                   <van-field
                     v-model="item.account"
@@ -569,7 +572,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="wechatDel(index)"
+                  @click="removeForm(item,'微信群')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -670,6 +673,15 @@
         :placeAddress="placeAddress"
       ></manage-list-2>
     </van-dialog>
+    <!-- 直播类型 -->
+    <van-popup v-model:show="showzbj" round position="bottom">
+      <van-picker
+        title="直播类型"
+        :columns="zbj"
+        @cancel="showzbj = false"
+        @confirm="getzbj"
+      />
+    </van-popup>
   </div>
 </template>
 
@@ -677,7 +689,7 @@
 import ManageList from "../ManageList.vue";
 import ManageList2 from "../ManageList2.vue";
 import { useRouter } from "vue-router";
-import { ref } from "vue";
+import {onMounted, ref } from "vue";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 export default {
@@ -728,6 +740,10 @@ export default {
       protectionLevel: "",
       dynamicFormJson: "",
     });
+    onMounted(() => {
+      dynamicFormDataClear();
+      dynamicFormDataProceed();
+    });
     const active = ref(0);
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
@@ -954,130 +970,143 @@ export default {
     const internetForm = ref({
       zbjForm: [],
       gzhForm: [],
-      wxForm: [],
-      dynamicFrom: [],
+      wxqForm: [],
+      dynamicForm: [],
     });
-    // 直播间
-    const liveB = {
-      typeChild: "",
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const liveBroadcast = ref([
-      {
-        typeChild: "",
-        account: "",
-      manager: "",
-      contact: "",
-      },
-    ]);
-    //公众号
-    const publicA = {
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const publicAccount = ref([
-      {
-        account: "",
-      manager: "",
-      contact: "",
-      },
-    ]);
-    // 微信群
-    const wx = {
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const wechat = ref([
-      {
-        account: "",
-      manager: "",
-      contact: "",
-      },
-    ]);
-    // 直播间
-    const liveBroadcastAdd = () => {
-      liveBroadcast.value.push(liveB);
-    };
-    const liveBroadcastDel = (index) => {
-      liveBroadcast.value.splice(index, 1);
-    };
-    // 公众号
-    const publicAccountAdd = () => {
-      publicAccount.value.push(publicA);
-    };
-    const publicAccountDel = (index) => {
-      publicAccount.value.splice(index, 1);
-    };
-    // 微信群
-    const wechatAdd = () => {
-      wechat.value.push(wx);
+    const addForm = (type)=>{
+      let data_add = [];
+      if (type == '直播间') { data_add = internetForm.value.zbjForm }
+      else if (type == '公众号') { data_add = internetForm.value.gzhForm }
+      else { data_add = internetForm.value.wxqForm }
+      data_add.push(
+        {key: randomString(12), siteId: inputForm.value.id, type: type, typeChild: '', account: '', manager: '', contact: ''}
+      );
+    }
+    const randomString = (len)=>{
+      len = len || 32;
+      var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
+      var maxPos = $chars.length;
+      var pwd = '';
+      for (let i = 0; i < len; i++) {
+        pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
+      }
+      return pwd;
+    }
+    const removeForm = (item,type)=>{
+      let data_add = [];
+      if (type == '直播间') { data_add = internetForm.value.zbjForm }
+      else if (type == '公众号') { data_add = internetForm.value.gzhForm }
+      else { data_add = internetForm.value.wxqForm }
+
+      let index = data_add.indexOf(item)
+
+      if (index !== -1) {
+        data_add.splice(index, 1)
+      }
+    }
+    const hlwToSubmit = ()=>{
+      internetForm.value.dynamicForm = [];
+      internetForm.value.zbjForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+      internetForm.value.gzhForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+      internetForm.value.wxqForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+    }
+    const dynamicFormDataProceed = (initial_form)=>{
+      if (!initial_form || initial_form.length == 0) {
+        initial_form = [
+          {key: randomString(12), siteId: inputForm.value.id, type: '直播间', typeChild: '', account: '', manager: '', contact: ''},
+          {key: randomString(12), siteId: inputForm.value.id, type: '公众号', typeChild: '', account: '', manager: '', contact: ''},
+          {key: randomString(12), siteId: inputForm.value.id, type: '微信群', typeChild: '', account: '', manager: '', contact: ''}
+        ];
+      }
+
+      initial_form.forEach(ele=>{
+        if (ele.id) {
+          ele.key = ele.id;
+        }
+
+        if (ele.type == '直播间') { internetForm.value.zbjForm.push(ele) }
+        else if (ele.type == '公众号') { internetForm.value.gzhForm.push(ele) }
+        else { internetForm.value.wxqForm.push(ele) }
+      })
+    }
+    const dynamicFormDataClear = ()=>{
+      internetForm.value.zbjForm = [];
+      internetForm.value.gzhForm = [];
+      internetForm.value.wxqForm = [];
+      internetForm.value.dynamicForm = [];
+    }
+    // 直播间类型
+    const zbj = [
+      { text: "斗鱼", value: "0" },
+      { text: "小红书", value: "1" },
+      { text: "抖音", value: "2" },
+      { text: "哔哩哔哩", value: "3" },
+      { text: "虎牙", value: "4" },
+      { text: "快手", value: "5" },
+      { text: "YY直播", value: "6" },
+      { text: "淘宝直播", value: "7" },
+      { text: "京东直播", value: "8" },
+    ];
+    const getzbjType = (type) => {
+      const typeObject = {
+         "斗鱼" :0,
+         "小红书" :1,
+         "抖音" :2,
+         "哔哩哔哩":3,
+         "虎牙":4,
+         "快手":5,
+         "YY直播" :6,
+         "淘宝直播" :7,
+         "京东直播" :8
+      };
+      return typeObject[type];
     };
-    const wechatDel = (index) => {
-      wechat.value.splice(index, 1);
+    const nowIndex = ref('');
+    const showNew = (key) => {
+      showzbj.value = true;
+      nowIndex.value = key;
+    }
+    let showzbj = ref(false);
+    const getzbj = ({ selectedOptions }) => {
+      showzbj.value = false;
+      internetForm.value.zbjForm.forEach(item=>{
+        if(item.key == nowIndex.value){
+          item.typeName = selectedOptions[0].text
+          item.typeChild = selectedOptions[0].value
+        }
+      })
     };
-    // 直播间类型
-    // const zbjTypeName = ref("");
-    // const zbj = [
-    //   { text: "斗鱼", value: "0" },
-    //   { text: "小红书", value: "1" },
-    //   { text: "抖音", value: "2" },
-    //   { text: "哔哩哔哩", value: "3" },
-    //   { text: "虎牙", value: "4" },
-    //   { text: "快手", value: "5" },
-    //   { text: "YY直播", value: "6" },
-    //   { text: "淘宝直播", value: "7" },
-    //   { text: "京东直播", value: "8" },
-    // ];
-    // const getzbjType = (type) => {
-    //   const typeObject = {
-    //     0: "斗鱼",
-    //     1: "小红书",
-    //     2: "抖音",
-    //     3: "哔哩哔哩",
-    //     4: "虎牙",
-    //     5: "快手",
-    //     6: "YY直播",
-    //     7: "淘宝直播",
-    //     8: "京东直播"
-    //   };
-    //   return typeObject[type];
-    // };
-    // let showzbj = ref(false);
-    // const getzbj = ({ selectedOptions }) => {
-    //   showzbj.value = false;
-    //   // const json = Object.assign(dataitem.value, {
-    //   //   constructionStage: selectedOptions[0].value,
-    //   // });
-    //   // dataitem.value = json;
-    //   zbjTypeName.value = selectedOptions[0].text;
-    // };
     //返回
     const onClickLeft = () => {
       history.back();
     };
     // 数据提交
     const submit = () => {
-      // const json = Object.assign(internetForm.value, {
-      //   zbjForm: liveBroadcast.value,
-      //   gzhForm: publicAccount,
-      //   wxForm: wechat,
-      // });
-      // internetForm.value = json
-      // const dy = JSON.stringify(internetForm.value);
-      // const dyData = Object.assign(inputForm.value,{dynamicFormJson:dy})
-      // inputForm.value = dyData;
+      hlwToSubmit();
+      let dynami = JSON.stringify(internetForm.value.dynamicForm);
+      const json = Object.assign(inputForm.value,{dynamicFormJson:dynami})
+      inputForm.value = json
       new placeRegister().sava(inputForm.value).then((res) => {
         if (res.status == 200) {
           xm.showToast({
-            message: "修改成功",
+            message: "添加成功",
           });
+          router.push("/placeRegisterList");
         }else{
           xm.showToast({
-            message: "修改失败",
+            message: "添加失败",
           });
         }
       });
@@ -1136,15 +1165,13 @@ export default {
       religiousDeptManaUserName,
       securityDeptManaUserName,
       // 互联网专区
-      liveBroadcast,
-      publicAccount,
-      wechat,
-      liveBroadcastAdd,
-      liveBroadcastDel,
-      publicAccountAdd,
-      publicAccountDel,
-      wechatAdd,
-      wechatDel,
+     internetForm,
+     addForm,
+     removeForm,
+     zbj,
+     showzbj,
+     getzbj,
+     showNew,
       //数据提交
       submit,
     };

+ 155 - 140
src/views/placeManage/placeRegister/placeRegisterInfo.vue

@@ -412,25 +412,28 @@
           <template #title> <van-icon name="desktop-o" />互联网专区 </template>
           <div style="padding: 0 10px; height: 470px; overflow: auto">
             <div style="overflow: hidden">
-              <p style="font-weight: 700">
+              <p style="font-weight: 700;font-size: 14px;">
                 直播间<van-button
                   type="primary"
                   size="mini"
                   style="margin-left: 10px; vertical-align: middle"
-                  @click="liveBroadcastAdd()"
+                  @click="addForm('直播间')"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in liveBroadcast" :key="index">
+              <div v-for="(item) in internetForm.zbjForm" :key="item.key">
                 <van-cell-group>
                   <van-field
-                    v-model="item.typeChild"
+                    v-model="item.typeName"
                     center
                     clearable
+                    readonly
                     label-width="7em"
                     label="所属平台:"
                     input-align="right"
-                    placeholder="请填入所属平台"
+                    right-icon="arrow-down"
+                    placeholder="请选择所属平台"
+                    @click="showNew(item.key)"
                   />
                 </van-cell-group>
                 <van-cell-group>
@@ -467,7 +470,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="liveBroadcastDel(index)"
+                  @click="removeForm(item,'直播间')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -476,16 +479,16 @@
               </div>
             </div>
             <div style="overflow: hidden">
-              <p style="font-weight: 700">
+              <p style="font-weight: 700;font-size: 14px;">
                 公众号<van-button
                   type="primary"
                   size="mini"
-                  @click="publicAccountAdd()"
+                  @click="addForm('公众号')"
                   style="margin-left: 10px; vertical-align: middle"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in publicAccount" :key="index">
+              <div v-for="(item) in internetForm.gzhForm" :key="item.key">
                 <van-cell-group>
                   <van-field
                     v-model="item.account"
@@ -520,7 +523,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="publicAccountDel(index)"
+                  @click="removeForm(item,'公众号')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -529,16 +532,16 @@
               </div>
             </div>
             <div style="overflow: hidden">
-              <p style="font-weight: 700">
+              <p style="font-weight: 700;font-size: 14px;">
                 微信群<van-button
                   type="primary"
                   size="mini"
                   style="margin-left: 10px; vertical-align: middle"
-                  @click="wechatAdd()"
+                  @click="addForm('微信群')"
                   >新增</van-button
                 >
               </p>
-              <div v-for="(item, index) in wechat" :key="index">
+              <div v-for="(item) in internetForm.wxqForm" :key="item.key">
                 <van-cell-group>
                   <van-field
                     v-model="item.account"
@@ -573,7 +576,7 @@
                   />
                 </van-cell-group>
                 <van-button
-                  @click="wechatDel(index)"
+                  @click="removeForm(item,'微信群')"
                   type="danger"
                   size="mini"
                   color="#e6a23c"
@@ -676,14 +679,14 @@
       ></manage-list-2>
     </van-dialog>
     <!-- 直播类型 -->
-    <!-- <van-popup v-model:show="showzbj" round position="bottom">
+    <van-popup v-model:show="showzbj" round position="bottom">
       <van-picker
-        title="场所建设阶段"
+        title="直播类型"
         :columns="zbj"
         @cancel="showzbj = false"
         @confirm="getzbj"
       />
-    </van-popup> -->
+    </van-popup>
   </div>
 </template>
 
@@ -707,9 +710,7 @@ export default {
     onMounted(() => {
       var id = JSON.parse(router.currentRoute.value.query.id);
       new placeRegister().queryById(id).then((res) => {
-        // console.log(res);
         dataitem.value = res;
-
         const rN = Object.assign(dataitem.value, {
           religiousName: getreligiousT(dataitem.value.religiousType),
           placeSelectLastId: dataitem.value.placeSelectId.split("/")[2],
@@ -725,6 +726,10 @@ export default {
         if (dataitem.value.scenesImage) {
           fileList.value = dataitem.value.scenesImage.split("/");
         }
+        new placeRegister().queryInternetBySiteId(dataitem.value.id).then(({data})=>{
+          dynamicFormDataClear();
+          dynamicFormDataProceed(data);
+        })
       });
     });
     //详细地址定位
@@ -733,6 +738,7 @@ export default {
         placeActivity.placeData.place = data.POIName;
       });
     };
+    
     // 地区选择
     let placeAddress = ref("");
     const customFieldName = {
@@ -979,122 +985,138 @@ export default {
     const internetForm = ref({
       zbjForm: [],
       gzhForm: [],
-      wxForm: [],
-      dynamicFrom: [],
+      wxqForm: [],
+      dynamicForm: [],
     });
-    // 直播间
-    const liveB = {
-      typeChild: "",
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const liveBroadcast = ref([
-      {
-        typeChild: "",
-        account: "",
-        manager: "",
-        contact: "",
-      },
-    ]);
-    //公众号
-    const publicA = {
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const publicAccount = ref([
-      {
-        account: "",
-        manager: "",
-        contact: "",
-      },
-    ]);
-    // 微信群
-    const wx = {
-      account: "",
-      manager: "",
-      contact: "",
-    };
-    const wechat = ref([
-      {
-        account: "",
-        manager: "",
-        contact: "",
-      },
-    ]);
-    // 直播间
-    const liveBroadcastAdd = () => {
-      liveBroadcast.value.push(liveB);
-    };
-    const liveBroadcastDel = (index) => {
-      liveBroadcast.value.splice(index, 1);
-    };
-    // 公众号
-    const publicAccountAdd = () => {
-      publicAccount.value.push(publicA);
-    };
-    const publicAccountDel = (index) => {
-      publicAccount.value.splice(index, 1);
-    };
-    // 微信群
-    const wechatAdd = () => {
-      wechat.value.push(wx);
-    };
-    const wechatDel = (index) => {
-      wechat.value.splice(index, 1);
-    };
+    const addForm = (type)=>{
+      let data_add = [];
+      if (type == '直播间') { data_add = internetForm.value.zbjForm }
+      else if (type == '公众号') { data_add = internetForm.value.gzhForm }
+      else { data_add = internetForm.value.wxqForm }
+      data_add.push(
+        {key: randomString(12), siteId: dataitem.value.id, type: type, typeChild: '', account: '', manager: '', contact: ''}
+      );
+    }
+    const randomString = (len)=>{
+      len = len || 32;
+      var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
+      var maxPos = $chars.length;
+      var pwd = '';
+      for (let i = 0; i < len; i++) {
+        pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
+      }
+      return pwd;
+    }
+    const removeForm = (item,type)=>{
+      let data_add = [];
+      if (type == '直播间') { data_add = internetForm.value.zbjForm }
+      else if (type == '公众号') { data_add = internetForm.value.gzhForm }
+      else { data_add = internetForm.value.wxqForm }
+
+      let index = data_add.indexOf(item)
+
+      if (index !== -1) {
+        data_add.splice(index, 1)
+      }
+    }
+    const hlwToSubmit = ()=>{
+      internetForm.value.dynamicForm = [];
+      internetForm.value.zbjForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+      internetForm.value.gzhForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+      internetForm.value.wxqForm.forEach(ele=>{
+        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+          internetForm.value.dynamicForm.push(ele);
+        }
+      })
+    }
+    const dynamicFormDataProceed = (initial_form)=>{
+      if (!initial_form || initial_form.length == 0) {
+        initial_form = [
+          {key: randomString(12), siteId: dataitem.value.id, type: '直播间', typeChild: '', account: '', manager: '', contact: ''},
+          {key: randomString(12), siteId: dataitem.value.id, type: '公众号', typeChild: '', account: '', manager: '', contact: ''},
+          {key: randomString(12), siteId: dataitem.value.id, type: '微信群', typeChild: '', account: '', manager: '', contact: ''}
+        ];
+      }
+
+      initial_form.forEach(ele=>{
+        if (ele.id) {
+          ele.key = ele.id;
+        }
+        if (ele.type == '直播间') {
+          ele.typeName = getzbjType2(ele.typeChild)
+          internetForm.value.zbjForm.push(ele) 
+        }else if (ele.type == '公众号') { 
+          internetForm.value.gzhForm.push(ele) 
+        }
+        else { internetForm.value.wxqForm.push(ele) }
+      })
+    }
+    const dynamicFormDataClear = ()=>{
+      internetForm.value.zbjForm = [];
+      internetForm.value.gzhForm = [];
+      internetForm.value.wxqForm = [];
+      internetForm.value.dynamicForm = [];
+    }
     // 直播间类型
     // const zbjTypeName = ref("");
-    // const zbj = [
-    //   { text: "斗鱼", value: "0" },
-    //   { text: "小红书", value: "1" },
-    //   { text: "抖音", value: "2" },
-    //   { text: "哔哩哔哩", value: "3" },
-    //   { text: "虎牙", value: "4" },
-    //   { text: "快手", value: "5" },
-    //   { text: "YY直播", value: "6" },
-    //   { text: "淘宝直播", value: "7" },
-    //   { text: "京东直播", value: "8" },
-    // ];
-    // const getzbjType = (type) => {
-    //   const typeObject = {
-    //     0: "斗鱼",
-    //     1: "小红书",
-    //     2: "抖音",
-    //     3: "哔哩哔哩",
-    //     4: "虎牙",
-    //     5: "快手",
-    //     6: "YY直播",
-    //     7: "淘宝直播",
-    //     8: "京东直播"
-    //   };
-    //   return typeObject[type];
-    // };
-    // let showzbj = ref(false);
-    // const getzbj = ({ selectedOptions }) => {
-    //   showzbj.value = false;
-    //   // const json = Object.assign(dataitem.value, {
-    //   //   constructionStage: selectedOptions[0].value,
-    //   // });
-    //   // dataitem.value = json;
-    //   zbjTypeName.value = selectedOptions[0].text;
-    // };
+    const zbj = [
+      { text: "斗鱼", value: "0" },
+      { text: "小红书", value: "1" },
+      { text: "抖音", value: "2" },
+      { text: "哔哩哔哩", value: "3" },
+      { text: "虎牙", value: "4" },
+      { text: "快手", value: "5" },
+      { text: "YY直播", value: "6" },
+      { text: "淘宝直播", value: "7" },
+      { text: "京东直播", value: "8" },
+    ];
+    const getzbjType2 = (type) => {
+      const typeObject = {
+        0: "斗鱼",
+        1: "小红书",
+        2: "抖音",
+        3: "哔哩哔哩",
+        4: "虎牙",
+        5: "快手",
+        6: "YY直播",
+        7: "淘宝直播",
+        8: "京东直播"
+      };
+      return typeObject[type];
+    };
+    const nowIndex = ref('');
+    const showNew = (key) => {
+      showzbj.value = true;
+      nowIndex.value = key;
+    }
+    let showzbj = ref(false);
+    const getzbj = ({ selectedOptions }) => {
+      showzbj.value = false;
+      internetForm.value.zbjForm.forEach(item=>{
+        if(item.key == nowIndex.value){
+          item.typeName = selectedOptions[0].text
+          item.typeChild = selectedOptions[0].value
+        }
+      })
+    };
     //返回
     const onClickLeft = () => {
       history.back();
     };
     // 数据提交
     const submit = () => {
-      // const json = Object.assign(internetForm.value, {
-      //   zbjForm: liveBroadcast.value,
-      //   gzhForm: publicAccount.value,
-      //   wxForm: wechat.value,
-      // });
-      // internetForm.value = json
-      // const dy = JSON.stringify(internetForm.value);
-      // const dyData = Object.assign(dataitem.value,{dynamicFormJson:dy})
-      // dataitem.value = dyData;
+      hlwToSubmit();
+      let dynami = JSON.stringify(internetForm.value.dynamicForm);
+      const json = Object.assign(dataitem.value,{dynamicFormJson:dynami})
+      dataitem.value = json
       new placeRegister().sava(dataitem.value).then((res) => {
         if (res.status == 200) {
           xm.showToast({
@@ -1160,20 +1182,13 @@ export default {
       religiousDeptManaUserName,
       securityDeptManaUserName,
       // 互联网专区
-      liveBroadcast,
-      publicAccount,
-      wechat,
-      liveBroadcastAdd,
-      liveBroadcastDel,
-      publicAccountAdd,
-      publicAccountDel,
-      wechatAdd,
-      wechatDel,
-      // 直播间类型选择
-      // zbjTypeName,
-      // zbj,
-      // showzbj,
-      // getzbj,
+     internetForm,
+     addForm,
+     removeForm,
+     zbj,
+     showzbj,
+     getzbj,
+     showNew,
       //数据提交
       submit,
     };

+ 3 - 0
src/views/placeManage/placeTablet/placeTabletInfo.vue

@@ -163,6 +163,7 @@
               v-model="dataitem.relationship"
               center
               readonly
+              label-width = '8em'
               clearable
               label="与供奉牌位关系:"
               input-align="right"
@@ -178,6 +179,7 @@
               center
               readonly
               clearable
+              label-width = '8em'
               label="供奉费用(元/年):"
               input-align="right"
             />
@@ -192,6 +194,7 @@
               center
               readonly
               clearable
+              label-width = '8em'
               label="被供奉者信息:"
               input-align="right"
             />