|  | @@ -31,6 +31,7 @@
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  |          <van-popup v-model:show="showPlace" round position="bottom">
 | 
	
		
			
				|  |  |            <van-picker
 | 
	
		
			
				|  |  | +            title="活动场所"
 | 
	
		
			
				|  |  |              :columns="places"
 | 
	
		
			
				|  |  |              @cancel="showPlace = false"
 | 
	
		
			
				|  |  |              @confirm="getPlace"
 | 
	
	
		
			
				|  | @@ -41,6 +42,7 @@
 | 
	
		
			
				|  |  |          <van-field
 | 
	
		
			
				|  |  |            v-model="placeActivity.activityTime"
 | 
	
		
			
				|  |  |            center
 | 
	
		
			
				|  |  | +          readonly
 | 
	
		
			
				|  |  |            label="活动时间:"
 | 
	
		
			
				|  |  |            placeholder="请选择时间"
 | 
	
		
			
				|  |  |            input-align="right"
 | 
	
	
		
			
				|  | @@ -79,7 +81,16 @@
 | 
	
		
			
				|  |  |            placeholder="请选择参会已知名单"
 | 
	
		
			
				|  |  |            input-align="right"
 | 
	
		
			
				|  |  |            right-icon="arrow-down"
 | 
	
		
			
				|  |  | +          @click="showPerson = true"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  | +        <van-dialog
 | 
	
		
			
				|  |  | +          v-model:show="showPerson"
 | 
	
		
			
				|  |  | +          title="选择人员名单"
 | 
	
		
			
				|  |  | +          show-cancel-button
 | 
	
		
			
				|  |  | +          @confirm="reselected"
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <person-list @selected="selected"></person-list>
 | 
	
		
			
				|  |  | +        </van-dialog>
 | 
	
		
			
				|  |  |        </van-cell-group>
 | 
	
		
			
				|  |  |        <van-cell-group>
 | 
	
		
			
				|  |  |          <van-field
 | 
	
	
		
			
				|  | @@ -104,10 +115,22 @@
 | 
	
		
			
				|  |  |          <van-field
 | 
	
		
			
				|  |  |            v-model="placeActivity.activityPlace"
 | 
	
		
			
				|  |  |            center
 | 
	
		
			
				|  |  | +          readonly
 | 
	
		
			
				|  |  |            label="活动地点:"
 | 
	
		
			
				|  |  |            placeholder="请填写参加地点"
 | 
	
		
			
				|  |  |            input-align="right"
 | 
	
		
			
				|  |  | +          right-icon="arrow-down"
 | 
	
		
			
				|  |  | +          @click="showArea = true"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  | +        <van-popup v-model:show="showArea" round position="bottom">
 | 
	
		
			
				|  |  | +          <van-cascader
 | 
	
		
			
				|  |  | +            v-model="cascaderValue"
 | 
	
		
			
				|  |  | +            title="请选择所在地区"
 | 
	
		
			
				|  |  | +            :options="options"
 | 
	
		
			
				|  |  | +            @close="showArea = false"
 | 
	
		
			
				|  |  | +            @finish="onFinish"
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </van-popup>
 | 
	
		
			
				|  |  |        </van-cell-group>
 | 
	
		
			
				|  |  |        <van-cell-group>
 | 
	
		
			
				|  |  |          <van-field
 | 
	
	
		
			
				|  | @@ -136,12 +159,21 @@
 | 
	
		
			
				|  |  |            placeholder="请选择活动负责人"
 | 
	
		
			
				|  |  |            input-align="right"
 | 
	
		
			
				|  |  |            right-icon="arrow-down"
 | 
	
		
			
				|  |  | +          @click="showReport = true"
 | 
	
		
			
				|  |  |          />
 | 
	
		
			
				|  |  | +        <van-dialog
 | 
	
		
			
				|  |  | +          v-model:show="showReport"
 | 
	
		
			
				|  |  | +          title="选择活动负责人"
 | 
	
		
			
				|  |  | +          show-cancel-button
 | 
	
		
			
				|  |  | +        >
 | 
	
		
			
				|  |  | +          <person-list></person-list>
 | 
	
		
			
				|  |  | +        </van-dialog>
 | 
	
		
			
				|  |  |        </van-cell-group>
 | 
	
		
			
				|  |  |        <van-cell-group>
 | 
	
		
			
				|  |  |          <van-field
 | 
	
		
			
				|  |  |            v-model="placeActivity.tel"
 | 
	
		
			
				|  |  |            center
 | 
	
		
			
				|  |  | +          type="tel"
 | 
	
		
			
				|  |  |            label="联系方式:"
 | 
	
		
			
				|  |  |            placeholder="请填写联系方式"
 | 
	
		
			
				|  |  |            input-align="right"
 | 
	
	
		
			
				|  | @@ -177,20 +209,22 @@
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  <script>
 | 
	
		
			
				|  |  | -import { ref } from "vue";
 | 
	
		
			
				|  |  | +import { reactive, ref } from "vue";
 | 
	
		
			
				|  |  | +import personList from "../personList.vue";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  | +  components: { personList },
 | 
	
		
			
				|  |  |    setup() {
 | 
	
		
			
				|  |  |      // 返回
 | 
	
		
			
				|  |  |      const onClickLeft = () => {
 | 
	
		
			
				|  |  |        history.back();
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      // 活动信息
 | 
	
		
			
				|  |  | -    const placeActivity = {
 | 
	
		
			
				|  |  | +    const placeActivity = reactive({
 | 
	
		
			
				|  |  |        activity: "",
 | 
	
		
			
				|  |  |        place: "",
 | 
	
		
			
				|  |  |        activityTime: "",
 | 
	
		
			
				|  |  |        countPerson: "",
 | 
	
		
			
				|  |  | -      list: '',
 | 
	
		
			
				|  |  | +      list: "",
 | 
	
		
			
				|  |  |        portname: "",
 | 
	
		
			
				|  |  |        area: "",
 | 
	
		
			
				|  |  |        activityPlace: "",
 | 
	
	
		
			
				|  | @@ -200,7 +234,7 @@ export default {
 | 
	
		
			
				|  |  |        tel: "",
 | 
	
		
			
				|  |  |        file: "",
 | 
	
		
			
				|  |  |        into: "",
 | 
	
		
			
				|  |  | -    };
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |      // 场所名称
 | 
	
		
			
				|  |  |      const places = [
 | 
	
		
			
				|  |  |        { text: "杭州", value: "Hangzhou" },
 | 
	
	
		
			
				|  | @@ -209,32 +243,82 @@ export default {
 | 
	
		
			
				|  |  |        { text: "绍兴", value: "Shaoxing" },
 | 
	
		
			
				|  |  |        { text: "湖州", value: "Huzhou" },
 | 
	
		
			
				|  |  |      ];
 | 
	
		
			
				|  |  | -    const showPlace = ref(false);
 | 
	
		
			
				|  |  | +    let showPlace = ref(false);
 | 
	
		
			
				|  |  |      const getPlace = ({ selectedOptions }) => {
 | 
	
		
			
				|  |  |        showPlace.value = false;
 | 
	
		
			
				|  |  |        placeActivity.place = selectedOptions[0].text;
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      // 获取活动时间
 | 
	
		
			
				|  |  | -    const showAct = ref(false);
 | 
	
		
			
				|  |  | -    const currentDate = ref(["2022", "06", "01"]);
 | 
	
		
			
				|  |  | -    const currentTime = ref(["12", "00"]);
 | 
	
		
			
				|  |  | +    let showAct = ref(false);
 | 
	
		
			
				|  |  | +    let currentDate = ref(["" + new Date().getFullYear(), "01", "01"]);
 | 
	
		
			
				|  |  | +    let currentTime = ref(["00", "00"]);
 | 
	
		
			
				|  |  |      const getTime = () => {
 | 
	
		
			
				|  |  |        showAct.value = false;
 | 
	
		
			
				|  |  |        placeActivity.activityTime = `${currentDate.value.join(
 | 
	
		
			
				|  |  |          "-"
 | 
	
		
			
				|  |  |        )} ${currentTime.value.join(":")}`;
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +    // 已知名单
 | 
	
		
			
				|  |  | +    let showPerson = ref(false);
 | 
	
		
			
				|  |  | +    // 活动负责人
 | 
	
		
			
				|  |  | +    let showReport = ref(false);
 | 
	
		
			
				|  |  | +    const show = () => {
 | 
	
		
			
				|  |  | +      showPerson = true;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    let list = "";
 | 
	
		
			
				|  |  | +    const selected = (val) => {
 | 
	
		
			
				|  |  | +      
 | 
	
		
			
				|  |  | +      list = val;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    const reselected = () => {
 | 
	
		
			
				|  |  | +      placeActivity.list = list;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    // 地区选择
 | 
	
		
			
				|  |  | +    let showArea = ref(false);
 | 
	
		
			
				|  |  | +    const cascaderValue = ref("");
 | 
	
		
			
				|  |  | +    // 选项列表,children 代表子选项,支持多级嵌套
 | 
	
		
			
				|  |  | +    const options = [
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +        text: "浙江省",
 | 
	
		
			
				|  |  | +        value: "330000",
 | 
	
		
			
				|  |  | +        children: [{ text: "杭州市", value: "330100" }],
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      {
 | 
	
		
			
				|  |  | +        text: "江苏省",
 | 
	
		
			
				|  |  | +        value: "320000",
 | 
	
		
			
				|  |  | +        children: [{ text: "南京市", value: "320100" }],
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +    ];
 | 
	
		
			
				|  |  | +    // 全部选项选择完毕后,会触发 finish 事件
 | 
	
		
			
				|  |  | +    const onFinish = ({ selectedOptions }) => {
 | 
	
		
			
				|  |  | +      showArea.value = false;
 | 
	
		
			
				|  |  | +      placeActivity.activityPlace = selectedOptions
 | 
	
		
			
				|  |  | +        .map((option) => option.text)
 | 
	
		
			
				|  |  | +        .join("/");
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  |        placeActivity,
 | 
	
		
			
				|  |  | +      // 活动场所
 | 
	
		
			
				|  |  |        showPlace,
 | 
	
		
			
				|  |  |        places,
 | 
	
		
			
				|  |  |        getPlace,
 | 
	
		
			
				|  |  | +      // 活动时间
 | 
	
		
			
				|  |  |        showAct,
 | 
	
		
			
				|  |  |        currentDate,
 | 
	
		
			
				|  |  |        currentTime,
 | 
	
		
			
				|  |  |        getTime,
 | 
	
		
			
				|  |  | +      // 返回
 | 
	
		
			
				|  |  |        onClickLeft,
 | 
	
		
			
				|  |  | +      // 人员选择
 | 
	
		
			
				|  |  | +      showPerson,
 | 
	
		
			
				|  |  | +      showReport,
 | 
	
		
			
				|  |  | +      selected,
 | 
	
		
			
				|  |  | +      reselected,
 | 
	
		
			
				|  |  | +      // 地区选择
 | 
	
		
			
				|  |  | +      showArea,
 | 
	
		
			
				|  |  | +      options,
 | 
	
		
			
				|  |  | +      onFinish,
 | 
	
		
			
				|  |  | +      cascaderValue,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |  };
 | 
	
	
		
			
				|  | @@ -268,8 +352,8 @@ export default {
 | 
	
		
			
				|  |  |  .formArea .van-cell-group .van-cell {
 | 
	
		
			
				|  |  |    line-height: 40px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -.formArea .van-field__right-icon {
 | 
	
		
			
				|  |  | -    color: #36a7f3;
 | 
	
		
			
				|  |  | +.van-cell__value .van-field__right-icon .van-icon-location {
 | 
	
		
			
				|  |  | +  color: #36a7f3!important;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  .rowTextArea::v-deep .van-field__value {
 | 
	
		
			
				|  |  |    width: 98%;
 | 
	
	
		
			
				|  | @@ -292,4 +376,8 @@ export default {
 | 
	
		
			
				|  |  |    color: #36a7f3;
 | 
	
		
			
				|  |  |    top: -4px;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | +.van-dialog {
 | 
	
		
			
				|  |  | +  width: 80%;
 | 
	
		
			
				|  |  | +  top: 50%;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  </style>
 |