WXL
2024-02-04 cf9259c2ebee0e82c32864a1ee91d96c403b9099
src/views/patient/propaganda/particty.vue
@@ -14,6 +14,7 @@
            title="宣教对象"
            description="在本部选择宣教病人"
          ></el-step>
          <el-step icon="el-icon-user" title="模版确认"></el-step>
        </el-steps>
      </div>
    </div>
@@ -37,25 +38,39 @@
              <el-form ref="form" :model="form" label-width="105px">
                <el-form-item label="模版名称:">
                  <el-input
                    :disabled="true"
                    style="width: 220px"
                    v-model="form.bt"
                    v-model="form.preachname"
                    placeholder="请在下方选择"
                  />
                </el-form-item>
                <el-form-item label="发送时间:" v-if="currenttype != 2">
                <el-form-item label="发送设置:" v-if="currenttype != 2">
                  <el-radio-group v-model="radio">
                    <el-radio :label="1">时间段发送</el-radio>
                    <el-radio :label="2">时间点发送</el-radio>
                    <el-radio :label="3">即刻发送</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item
                  label="发送时间点:"
                  v-if="currenttype != 2 && radio == 2"
                >
                  <el-date-picker
                    v-model="form.name"
                    type="date"
                    placeholder="选择日期"
                    v-model="form.sendTime"
                    type="datetime"
                    placeholder="选择日期时间"
                    default-time="13:00:00"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="发送时间段:" v-if="currenttype != 2">
                <el-form-item
                  label="发送时间段:"
                  v-if="currenttype != 2 && radio == 1"
                >
                  <el-checkbox-group v-model="checkList">
                    <el-checkbox label="上午(8:30-11:30)"></el-checkbox>
                    <el-checkbox label="下午(14:30-16:30)"></el-checkbox>
                    <el-checkbox label="夜间(18:30-20:30)"></el-checkbox>
                    <el-checkbox label="不定时"></el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
                <el-form-item label="服务形式">
@@ -67,18 +82,18 @@
                    ></el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
                <el-form-item label="组织形式">
                <!-- <el-form-item label="组织形式">
                  <el-radio-group v-model="form.radio">
                    <el-radio :label="3">单人宣教</el-radio>
                    <el-radio :label="6">多人集中宣教</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="语音模版" prop="region">
                </el-form-item> -->
                <!-- <el-form-item label="语音模版" prop="region">
                  <el-select v-model="form.region" placeholder="请选择模版">
                    <el-option label="一号模版" value="shanghai"></el-option>
                    <el-option label="二号模版" value="beijing"></el-option>
                  </el-select>
                </el-form-item>
                </el-form-item> -->
              </el-form>
            </div>
          </div>
@@ -252,6 +267,7 @@
                    :tableLabel="tableLabel"
                    :controlsc="false"
                    :multiplechoice="false"
                    :typeinfo="1"
                  />
                  <pagination
                    v-show="total > 0"
@@ -265,7 +281,7 @@
            </div>
          </div>
        </div>
        <el-button type="success" @click="submitForm('ruleForm')">{{
        <el-button type="success" @click="nextstep('ruleForm')">{{
          quote ? "立即创建" : "任务详情设置"
        }}</el-button>
        <el-button @click="resetForm('ruleForm')">重置</el-button>
@@ -416,7 +432,7 @@
                  <el-row :gutter="10" class="mb8">
                    <el-col :span="1.5">
                      <el-select
                        v-model="tasktopic"
                        v-model="patientqueryParams.allhosp"
                        placeholder="请选择新增类型"
                      >
                        <el-option
@@ -434,7 +450,7 @@
                        plain
                        icon="el-icon-plus"
                        size="medium"
                        :disabled="!tasktopic"
                        :disabled="!patientqueryParams.allhosp"
                        @click="handleAddpatient"
                        >新增</el-button
                      >
@@ -461,6 +477,7 @@
                    :currentList="sonuserList"
                    :tableLabel="tableLabelhz"
                    :controlxz="false"
                    :typeinfo="2"
                  />
                  <pagination
                    v-show="total > 0"
@@ -568,7 +585,9 @@
              @handleSelectionChange="handleSelectionChange"
              :currentList="patientuserList"
              :tableLabel="tableLabelhz"
              :serialnumber="false"
              :controlsc="false"
              :typeinfo="3"
            />
          </el-row>
          <pagination
@@ -592,6 +611,7 @@
<script>
import { messagelistpatient } from "@/api/patient/homepage";
import store from "@/store";
import {
  getTaskpatient,
  getlibrarylist,
@@ -601,6 +621,7 @@
  addhetask,
  gethetaskinfo,
  delhetaskinfo,
  Editsingletask,
} from "@/api/AiCentre/index";
import SFtable from "@/components/SFtable"; //表格组件
@@ -615,10 +636,12 @@
      loading: false, // 遮罩层
      patientloading: false, // 遮罩层
      dialogVisiblepatient: false, //添加患者弹框
      radio: 1,
      checkboxlist: [],
      tableLabel: [],
      // 患者表单
      tableLabelhz: [
        { label: "序号", width: "", prop: "patid" },
        { label: "患者名称", width: "", prop: "name" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
@@ -747,13 +770,41 @@
  created() {
    this.id = this.$route.query.id;
    this.form.type = this.$route.query.type;
    this.Addsubtask();
    this.Getsubtask();
    this.Acquisitiontype();
  },
  methods: {
    // {
    //   姓名: { "${name}": "龙傲天" },
    //   地址: { "${dzz}": "龙宫" },
    //   电话: { "${dhh}": "八个八" },
    // }
    // 对象转数组
    convertFormat1ToFormat2(data) {
      let result = [];
      for (let key in data) {
        let innerKey = Object.keys(data[key])[0];
        result.push({
          name: key,
          value: innerKey,
          fill: data[key][innerKey],
        });
      }
      return result;
    },
    // 数组转对象
    convertFormat2ToFormat1(data) {
      let result = {};
      data.forEach((item) => {
        let innerObj = {};
        innerObj[item.value] = item.fill;
        result[item.name] = innerObj;
      });
      return result;
    },
    // 获取当前类型
    Acquisitiontype() {
      let queryParams = {
@@ -761,11 +812,8 @@
        pageSize: 10,
        isavailable: "",
      };
      getTaskpatient({ allhosp: 1 }).then((res) => {
        console.log(res);
      });
      this.currenttype = this.$route.query.type;
      console.log(this.currenttype);
      console.log(this.currenttype, "1");
      if (this.currenttype == 1) {
        this.title = "宣教内容列表";
        this.tableLabel = this.tableLabelxj;
@@ -836,11 +884,18 @@
        });
      }
    },
    // 下一步
    submitForm(formName) {
    nextstep() {
      if (this.Editprogress <= 3) {
        return this.Editprogress++;
      }
    },
    // 下一步
    submitForm(formName) {
      Editsingletask(this.form).then((response) => {
        if (res.code == 200) {
          this.$router.go(-1);
        }
      });
      // 提交
      // this.$refs[formName].validate((valid, object) => {
      //   if (valid) {
@@ -853,8 +908,7 @@
    },
    // 子任务二级弹框
    handleAddpatient(row) {
      console.log(row, "子组件数据");
      messagelistpatient(this.patientqueryParams).then((response) => {
      getTaskpatient(this.patientqueryParams).then((response) => {
        console.log(response);
        this.patientuserList = response.rows;
        this.patienttotal = response.total;
@@ -913,11 +967,11 @@
    // 查询子任务列表
    Getsubtask() {
      this.topqueryParams.pguid = 2;
      console.log(this.topqueryParams);
      console.log(this.topqueryParams, "aa");
      messagelistpatient(this.topqueryParams).then((res) => {
        this.userList = res.rows;
        this.total = res.total;
        console.log(this.userList);
        console.log(this.userList, "ss");
      });
    },
    // 变量---------------