Bladeren bron

场所管理添加时间组件以及bug修改

guoqing 2 jaren geleden
bovenliggende
commit
6e475045d1

+ 480 - 384
src/views/placeManage/placeRegister/placeRegister.vue

@@ -289,319 +289,327 @@
         </div>
       </van-tab>
       <!-- 备案信息 -->
-        <van-tab>
-          <template #title> <van-icon name="bulb-o" />备案信息 </template>
-          <div style="padding: 0 10px; height: 470px; overflow: auto">
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.filingNo"
-                center
-                clearable
-                label="场所备案号:"
-                input-align="right"
-                placeholder="请输入场所备案号"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.approvedEstablishmentTime"
-                center
-                required
-                clearable
-                label-width="8em"
-                label="批准设立时间:"
-                input-align="right"
-                placeholder="请选择批准设立时间"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.registrationAuthority"
-                center
-                required
-                clearable
-                label="登记机关:"
-                input-align="right"
-                placeholder="请输入登记机关"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.registrationDate"
-                center
-                required
-                clearable
-                label="登记日期:"
-                input-align="right"
-                placeholder="请选择登记日期"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.teachingStaff"
-                center
-                required
-                clearable
-                label-width="7em"
-                label="主要教职人员:"
-                input-align="right"
-                placeholder="请输入主要教职人员"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="inputForm.approveOffice"
-                center
-                clearable
-                label-width="7em"
-                label="批准设立机关:"
-                input-align="right"
-                placeholder="请输入批准设立机关"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="religiousDeptManaUserName"
-                center
-                label="宗教管理人员"
-                placeholder="请填写宗教管理人员"
-                input-align="right"
-                right-icon="arrow-down"
-                @click="showPerson = true"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                v-model="securityDeptManaUserName"
-                center
-                label="公安管理人员"
-                placeholder="请填写公安管理人员"
-                input-align="right"
-                right-icon="arrow-down"
-                @click="showReport = true"
-              />
-            </van-cell-group>
-            <van-cell-group>
-              <van-field
-                name="uploader"
-                label-align="top"
-                label-width="10em"
-                label="场所建设审批手续:"
-              >
-                <template #input>
-                  <van-uploader
-                    v-model="fileList3"
-                    :after-read="afterRead3"
-                    :max-count="6"
-                    capture="camera"
-                    accept=""
-                    :before-delete="fjdelete3"
-                  >
-                  </van-uploader>
-                </template>
-              </van-field>
-            </van-cell-group>
-          </div>
-        </van-tab>
-        <!-- 互联网专区 -->
-        <van-tab>
-          <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;font-size: 14px;">
-                直播间<van-button
-                  type="primary"
-                  size="mini"
-                  style="margin-left: 10px; vertical-align: middle"
-                  @click="addForm('直播间')"
-                  >新增</van-button
-                >
-              </p>
-              <div v-for="(item) in internetForm.zbjForm" :key="item.key">
-                <van-cell-group>
-                  <van-field
-                    v-model="item.typeName"
-                    center
-                    clearable
-                    readonly
-                    label-width="7em"
-                    label="所属平台:"
-                    input-align="right"
-                    right-icon="arrow-down"
-                    placeholder="请选择所属平台"
-                    @click="showNew(item.key)"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.account"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="直播账号:"
-                    input-align="right"
-                    placeholder="请输入直播账号"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.manager"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="管理员:"
-                    input-align="right"
-                    placeholder="请填写管理员"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.contact"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="联系方式:"
-                    input-align="right"
-                    placeholder="请输入联系方式"
-                  />
-                </van-cell-group>
-                <van-button
-                  @click="removeForm(item,'直播间')"
-                  type="danger"
-                  size="mini"
-                  color="#e6a23c"
-                  >删除</van-button
+      <van-tab>
+        <template #title> <van-icon name="bulb-o" />备案信息 </template>
+        <div style="padding: 0 10px; height: 470px; overflow: auto">
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.filingNo"
+              center
+              clearable
+              label="场所备案号:"
+              input-align="right"
+              placeholder="请输入场所备案号"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.approvedEstablishmentTime"
+              center
+              required
+              clearable
+              readonly
+              label-width="8em"
+              label="批准设立时间:"
+              input-align="right"
+              right-icon="arrow-down"
+              placeholder="请选择批准设立时间"
+              @click="hs_SetupTime = true"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.registrationAuthority"
+              center
+              required
+              clearable
+              label="登记机关:"
+              input-align="right"
+              placeholder="请输入登记机关"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.registrationDate"
+              center
+              required
+              readonly
+              clearable
+              label="登记日期:"
+              right-icon="arrow-down"
+              input-align="right"
+              placeholder="请选择登记日期"
+              @click="hs_SignTime = true"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.teachingStaff"
+              center
+              required
+              clearable
+              label-width="7em"
+              label="主要教职人员:"
+              input-align="right"
+              placeholder="请输入主要教职人员"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="inputForm.approveOffice"
+              center
+              clearable
+              label-width="7em"
+              label="批准设立机关:"
+              input-align="right"
+              placeholder="请输入批准设立机关"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="religiousDeptManaUserName"
+              center
+              readonly
+              label="宗教管理人员"
+              placeholder="请填写宗教管理人员"
+              input-align="right"
+              right-icon="arrow-down"
+              @click="showPerson = true"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              v-model="securityDeptManaUserName"
+              center
+              readonly
+              label="公安管理人员"
+              placeholder="请填写公安管理人员"
+              input-align="right"
+              right-icon="arrow-down"
+              @click="showReport = true"
+            />
+          </van-cell-group>
+          <van-cell-group>
+            <van-field
+              name="uploader"
+              label-align="top"
+              label-width="10em"
+              label="场所建设审批手续:"
+            >
+              <template #input>
+                <van-uploader
+                  v-model="fileList3"
+                  :after-read="afterRead3"
+                  :max-count="6"
+                  capture="camera"
+                  accept=""
+                  :before-delete="fjdelete3"
                 >
-              </div>
+                </van-uploader>
+              </template>
+            </van-field>
+          </van-cell-group>
+        </div>
+      </van-tab>
+      <!-- 互联网专区 -->
+      <van-tab>
+        <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; font-size: 14px">
+              直播间<van-button
+                type="primary"
+                size="mini"
+                style="margin-left: 10px; vertical-align: middle"
+                @click="addForm('直播间')"
+                >新增</van-button
+              >
+            </p>
+            <div v-for="item in internetForm.zbjForm" :key="item.key">
+              <van-cell-group>
+                <van-field
+                  v-model="item.typeName"
+                  center
+                  clearable
+                  readonly
+                  label-width="7em"
+                  label="所属平台:"
+                  input-align="right"
+                  right-icon="arrow-down"
+                  placeholder="请选择所属平台"
+                  @click="showNew(item.key)"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.account"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="直播账号:"
+                  input-align="right"
+                  placeholder="请输入直播账号"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.manager"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="管理员:"
+                  input-align="right"
+                  placeholder="请填写管理员"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.contact"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="联系方式:"
+                  input-align="right"
+                  placeholder="请输入联系方式"
+                />
+              </van-cell-group>
+              <van-button
+                @click="removeForm(item, '直播间')"
+                type="danger"
+                size="mini"
+                color="#e6a23c"
+                >删除</van-button
+              >
             </div>
-            <div style="overflow: hidden">
-              <p style="font-weight: 700;font-size: 14px;">
-                公众号<van-button
-                  type="primary"
-                  size="mini"
-                  @click="addForm('公众号')"
-                  style="margin-left: 10px; vertical-align: middle"
-                  >新增</van-button
-                >
-              </p>
-              <div v-for="(item) in internetForm.gzhForm" :key="item.key">
-                <van-cell-group>
-                  <van-field
-                    v-model="item.account"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="公众号账号:"
-                    input-align="right"
-                    placeholder="请输入直播账号"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.manager"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="管理员:"
-                    input-align="right"
-                    placeholder="请填写管理员"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.contact"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="联系方式:"
-                    input-align="right"
-                    placeholder="请输入联系方式"
-                  />
-                </van-cell-group>
-                <van-button
-                  @click="removeForm(item,'公众号')"
-                  type="danger"
-                  size="mini"
-                  color="#e6a23c"
-                  >删除</van-button
-                >
-              </div>
+          </div>
+          <div style="overflow: hidden">
+            <p style="font-weight: 700; font-size: 14px">
+              公众号<van-button
+                type="primary"
+                size="mini"
+                @click="addForm('公众号')"
+                style="margin-left: 10px; vertical-align: middle"
+                >新增</van-button
+              >
+            </p>
+            <div v-for="item in internetForm.gzhForm" :key="item.key">
+              <van-cell-group>
+                <van-field
+                  v-model="item.account"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="公众号账号:"
+                  input-align="right"
+                  placeholder="请输入直播账号"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.manager"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="管理员:"
+                  input-align="right"
+                  placeholder="请填写管理员"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.contact"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="联系方式:"
+                  input-align="right"
+                  placeholder="请输入联系方式"
+                />
+              </van-cell-group>
+              <van-button
+                @click="removeForm(item, '公众号')"
+                type="danger"
+                size="mini"
+                color="#e6a23c"
+                >删除</van-button
+              >
             </div>
-            <div style="overflow: hidden">
-              <p style="font-weight: 700;font-size: 14px;">
-                微信群<van-button
-                  type="primary"
-                  size="mini"
-                  style="margin-left: 10px; vertical-align: middle"
-                  @click="addForm('微信群')"
-                  >新增</van-button
-                >
-              </p>
-              <div v-for="(item) in internetForm.wxqForm" :key="item.key">
-                <van-cell-group>
-                  <van-field
-                    v-model="item.account"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="微信群账号:"
-                    input-align="right"
-                    placeholder="请输入直播账号"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.manager"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="管理员:"
-                    input-align="right"
-                    placeholder="请填写管理员"
-                  />
-                </van-cell-group>
-                <van-cell-group>
-                  <van-field
-                    v-model="item.contact"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="联系方式:"
-                    input-align="right"
-                    placeholder="请输入联系方式"
-                  />
-                </van-cell-group>
-                <van-button
-                  @click="removeForm(item,'微信群')"
-                  type="danger"
-                  size="mini"
-                  color="#e6a23c"
-                  >删除</van-button
-                >
-              </div>
+          </div>
+          <div style="overflow: hidden">
+            <p style="font-weight: 700; font-size: 14px">
+              微信群<van-button
+                type="primary"
+                size="mini"
+                style="margin-left: 10px; vertical-align: middle"
+                @click="addForm('微信群')"
+                >新增</van-button
+              >
+            </p>
+            <div v-for="item in internetForm.wxqForm" :key="item.key">
+              <van-cell-group>
+                <van-field
+                  v-model="item.account"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="微信群账号:"
+                  input-align="right"
+                  placeholder="请输入直播账号"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.manager"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="管理员:"
+                  input-align="right"
+                  placeholder="请填写管理员"
+                />
+              </van-cell-group>
+              <van-cell-group>
+                <van-field
+                  v-model="item.contact"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="联系方式:"
+                  input-align="right"
+                  placeholder="请输入联系方式"
+                />
+              </van-cell-group>
+              <van-button
+                @click="removeForm(item, '微信群')"
+                type="danger"
+                size="mini"
+                color="#e6a23c"
+                >删除</van-button
+              >
             </div>
-            <div style="overflow: hidden">
-              <p style="font-weight: 700">网站</p>
-              <div>
-                <van-cell-group>
-                  <van-field
-                    v-model="inputForm.website"
-                    center
-                    clearable
-                    label-width="7em"
-                    label="网站地址:"
-                    input-align="right"
-                    placeholder="请输入网站地址"
-                  />
-                </van-cell-group>
-              </div>
+          </div>
+          <div style="overflow: hidden">
+            <p style="font-weight: 700">网站</p>
+            <div>
+              <van-cell-group>
+                <van-field
+                  v-model="inputForm.website"
+                  center
+                  clearable
+                  label-width="7em"
+                  label="网站地址:"
+                  input-align="right"
+                  placeholder="请输入网站地址"
+                />
+              </van-cell-group>
             </div>
           </div>
-        </van-tab>
+        </div>
+      </van-tab>
     </van-tabs>
     <div class="btn">
-        <van-button type="primary" @click="submit">场所添加</van-button>
-      </div>
+      <van-button type="primary" @click="submit">场所添加</van-button>
+    </div>
     <!-- 宗教类型 -->
     <van-popup v-model:show="hs_religious" round position="bottom">
       <van-picker
@@ -656,10 +664,7 @@
       @confirm="reselected"
       width="100%"
     >
-      <manage-list
-        @selected="selected"
-        :type="0"
-      ></manage-list>
+      <manage-list @selected="selected" :type="0"></manage-list>
     </van-dialog>
     <!-- 公安部门人员 -->
     <van-dialog
@@ -669,9 +674,7 @@
       @confirm="reselected2"
       width="100%"
     >
-      <manage-list-2
-        @selected2="selected2"
-      ></manage-list-2>
+      <manage-list-2 @selected2="selected2"></manage-list-2>
     </van-dialog>
     <!-- 直播类型 -->
     <van-popup v-model:show="showzbj" round position="bottom">
@@ -682,6 +685,28 @@
         @confirm="getzbj"
       />
     </van-popup>
+    <!-- 批准设立时间 -->
+    <van-popup v-model:show="hs_SetupTime" round position="bottom">
+      <van-date-picker
+        v-model="currentDate"
+        title="选择日期"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @cancel="hs_SetupTime = false"
+        @confirm="getSetupTime"
+      />
+    </van-popup>
+    <!-- 登记日期 -->
+    <van-popup v-model:show="hs_SignTime" round position="bottom">
+      <van-date-picker
+        v-model="currentDate"
+        title="选择日期"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @cancel="hs_SignTime = false"
+        @confirm="getSignTime"
+      />
+    </van-popup>
   </div>
 </template>
 
@@ -689,7 +714,7 @@
 import ManageList from "../ManageList.vue";
 import ManageList2 from "../ManageList2.vue";
 import { useRouter } from "vue-router";
-import {onMounted, ref } from "vue";
+import { onMounted, ref } from "vue";
 import placeRegister from "@/api/placeRegister/placeRegister";
 import tools from "@/api/sys/tools";
 export default {
@@ -710,7 +735,7 @@ export default {
       placeSelectType4: "",
       placeSelectType5: "",
       placeSelectType6: "",
-      placeSelectLastId:"",
+      placeSelectLastId: "",
       place: "",
       longitude: "",
       latitude: "",
@@ -792,7 +817,7 @@ export default {
         placeSelectType3: selectedOptions[0].id,
         placeSelectType4: selectedOptions[1].id,
         placeSelectType5: selectedOptions[2].id,
-        placeSelectLastId:selectedOptions[2].id,
+        placeSelectLastId: selectedOptions[2].id,
       });
       inputForm.value = json;
     };
@@ -810,7 +835,7 @@ export default {
       hs_religious.value = false;
       const json = Object.assign(inputForm.value, {
         religiousType: selectedOptions[0].value,
-        religiousName: selectedOptions[0].text
+        religiousName: selectedOptions[0].text,
       });
       inputForm.value = json;
       religiousType.value = selectedOptions[0].text;
@@ -966,6 +991,28 @@ export default {
       inputForm.value = json;
       securityDeptManaUserName.value = list2.value.name;
     };
+    //批准设立时间
+    let hs_SetupTime = ref(false);
+    const getSetupTime = ({ selectedOptions }) => {
+      hs_SetupTime.value = false;
+      const json = Object.assign(inputForm.value,{approvedEstablishmentTime:selectedOptions[0].text +
+        "-" +
+        selectedOptions[1].text +
+        "-" +
+        selectedOptions[2].text})
+        inputForm.value = json
+    };
+    //批准设立时间
+    let hs_SignTime = ref(false);
+    const getSignTime = ({ selectedOptions }) => {
+      hs_SignTime.value = false;
+      const json = Object.assign(inputForm.value,{registrationDate:selectedOptions[0].text +
+        "-" +
+        selectedOptions[1].text +
+        "-" +
+        selectedOptions[2].text})
+        inputForm.value = json
+    };
     // 互联网专区
     const internetForm = ref({
       zbjForm: [],
@@ -973,80 +1020,123 @@ export default {
       wxqForm: [],
       dynamicForm: [],
     });
-    const addForm = (type)=>{
+    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)=>{
+      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 $chars =
+        "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678"; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
       var maxPos = $chars.length;
-      var pwd = '';
+      var pwd = "";
       for (let i = 0; i < len; i++) {
         pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
       }
       return pwd;
-    }
-    const removeForm = (item,type)=>{
+    };
+    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 }
+      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)
+      let index = data_add.indexOf(item);
 
       if (index !== -1) {
-        data_add.splice(index, 1)
+        data_add.splice(index, 1);
       }
-    }
-    const hlwToSubmit = ()=>{
+    };
+    const hlwToSubmit = () => {
       internetForm.value.dynamicForm = [];
-      internetForm.value.zbjForm.forEach(ele=>{
-        if (ele.account != '' || ele.manager != '' || ele.contact != '') {
+      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.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.wxqForm.forEach((ele) => {
+        if (ele.account != "" || ele.manager != "" || ele.contact != "") {
           internetForm.value.dynamicForm.push(ele);
         }
-      })
-    }
-    const dynamicFormDataProceed = (initial_form)=>{
+      });
+    };
+    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: ''}
+          {
+            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=>{
+      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 = ()=>{
+        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" },
@@ -1061,32 +1151,32 @@ export default {
     ];
     const getzbjType = (type) => {
       const typeObject = {
-         "斗鱼" :0,
-         "小红书" :1,
-         "抖音" :2,
-         "哔哩哔哩":3,
-         "虎牙":4,
-         "快手":5,
-         "YY直播" :6,
-         "淘宝直播" :7,
-         "京东直播" :8
+        斗鱼: 0,
+        小红书: 1,
+        抖音: 2,
+        哔哩哔哩: 3,
+        虎牙: 4,
+        快手: 5,
+        YY直播: 6,
+        淘宝直播: 7,
+        京东直播: 8,
       };
       return typeObject[type];
     };
-    const nowIndex = ref('');
+    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
+      internetForm.value.zbjForm.forEach((item) => {
+        if (item.key == nowIndex.value) {
+          item.typeName = selectedOptions[0].text;
+          item.typeChild = selectedOptions[0].value;
         }
-      })
+      });
     };
     //返回
     const onClickLeft = () => {
@@ -1096,15 +1186,15 @@ export default {
     const submit = () => {
       hlwToSubmit();
       let dynami = JSON.stringify(internetForm.value.dynamicForm);
-      const json = Object.assign(inputForm.value,{dynamicFormJson:dynami})
-      inputForm.value = json
+      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: "添加成功",
           });
           router.push("/placeRegisterList");
-        }else{
+        } else {
           xm.showToast({
             message: "添加失败",
           });
@@ -1164,14 +1254,20 @@ export default {
       reselected2,
       religiousDeptManaUserName,
       securityDeptManaUserName,
+      // 批准设立时间
+      hs_SetupTime,
+      getSetupTime,
+      // 批准设立时间
+      hs_SignTime,
+      getSignTime,
       // 互联网专区
-     internetForm,
-     addForm,
-     removeForm,
-     zbj,
-     showzbj,
-     getzbj,
-     showNew,
+      internetForm,
+      addForm,
+      removeForm,
+      zbj,
+      showzbj,
+      getzbj,
+      showNew,
       //数据提交
       submit,
     };

+ 73 - 17
src/views/placeManage/placeRegister/placeRegisterInfo.vue

@@ -308,15 +308,18 @@
             </van-cell-group>
             <van-cell-group>
               <van-field
-                v-model="dataitem.approvedEstablishmentTime"
-                center
-                required
-                clearable
-                label-width="8em"
-                label="批准设立时间:"
-                input-align="right"
-                placeholder="请选择批准设立时间"
-              />
+              v-model="dataitem.approvedEstablishmentTime"
+              center
+              required
+              clearable
+              readonly
+              label-width="8em"
+              label="批准设立时间:"
+              input-align="right"
+              right-icon="arrow-down"
+              placeholder="请选择批准设立时间"
+              @click="hs_SetupTime = true"
+            />
             </van-cell-group>
             <van-cell-group>
               <van-field
@@ -331,14 +334,17 @@
             </van-cell-group>
             <van-cell-group>
               <van-field
-                v-model="dataitem.registrationDate"
-                center
-                required
-                clearable
-                label="登记日期:"
-                input-align="right"
-                placeholder="请选择登记日期"
-              />
+              v-model="dataitem.registrationDate"
+              center
+              required
+              readonly
+              clearable
+              label="登记日期:"
+              right-icon="arrow-down"
+              input-align="right"
+              placeholder="请选择登记日期"
+              @click="hs_SignTime = true"
+            />
             </van-cell-group>
             <van-cell-group>
               <van-field
@@ -687,6 +693,28 @@
         @confirm="getzbj"
       />
     </van-popup>
+    <!-- 批准设立时间 -->
+    <van-popup v-model:show="hs_SetupTime" round position="bottom">
+      <van-date-picker
+        v-model="currentDate"
+        title="选择日期"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @cancel="hs_SetupTime = false"
+        @confirm="getSetupTime"
+      />
+    </van-popup>
+    <!-- 登记日期 -->
+    <van-popup v-model:show="hs_SignTime" round position="bottom">
+      <van-date-picker
+        v-model="currentDate"
+        title="选择日期"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @cancel="hs_SignTime = false"
+        @confirm="getSignTime"
+      />
+    </van-popup>
   </div>
 </template>
 
@@ -981,6 +1009,28 @@ export default {
       dataitem.value = json;
       securityDeptManaUserName.value = list2.value.name;
     };
+    //批准设立时间
+    let hs_SetupTime = ref(false);
+    const getSetupTime = ({ selectedOptions }) => {
+      hs_SetupTime.value = false;
+      const json = Object.assign(inputForm.value,{approvedEstablishmentTime:selectedOptions[0].text +
+        "-" +
+        selectedOptions[1].text +
+        "-" +
+        selectedOptions[2].text})
+        inputForm.value = json
+    };
+    //批准设立时间
+    let hs_SignTime = ref(false);
+    const getSignTime = ({ selectedOptions }) => {
+      hs_SignTime.value = false;
+      const json = Object.assign(inputForm.value,{registrationDate:selectedOptions[0].text +
+        "-" +
+        selectedOptions[1].text +
+        "-" +
+        selectedOptions[2].text})
+        inputForm.value = json
+    };
     // 互联网专区
     const internetForm = ref({
       zbjForm: [],
@@ -1181,6 +1231,12 @@ export default {
       reselected2,
       religiousDeptManaUserName,
       securityDeptManaUserName,
+      // 批准设立时间
+      hs_SetupTime,
+      getSetupTime,
+      // 批准设立时间
+      hs_SignTime,
+      getSignTime,
       // 互联网专区
      internetForm,
      addForm,

+ 6 - 0
src/views/placeManage/placeRegister/placeRegisterList.vue

@@ -230,8 +230,14 @@ export default {
       let user = localStorage.getItem("MZ_USER");
       new tools().treeData().then((res) => {
         addressList.push(res[0]);
+        console.log(res);
         res[0].children.forEach((item) => {
           addressList.push(item);
+          if(item.children){
+            item.children.forEach(item2 =>{
+              addressList.push(item2)
+            })
+          }
         });
       });
       let userArea = "";