Przeglądaj źródła

Merge branch 'test' of sckj/mz-cloud into master

NanMing 2 lat temu
rodzic
commit
cdb55cefdf

+ 1 - 1
ruoyi-web/src/components/FileUpload/index.vue

@@ -69,7 +69,7 @@ const { proxy } = getCurrentInstance();
 const emit = defineEmits();
 const number = ref(0);
 const uploadList = ref([]);
-const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/file/upload"); // 上传的图片服务器地址
+const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/portal/jlDept/uploadFile"); // 上传的图片服务器地址
 const headers = ref({ Authorization: "Bearer " + getToken() });
 const fileList = ref([]);
 const showTip = computed(

+ 1 - 1
ruoyi-web/src/views/rzyljgsq/index.vue

@@ -74,7 +74,7 @@
         </el-tabs>
       </div>
     </div>
-    <el-dialog v-model="showSearch" title="查询结果" @close="resetDialog" append-to-body :lock-scroll="false">
+    <el-dialog v-model="showSearch" title="查询结果" width="900px" @close="resetDialog" append-to-body :lock-scroll="false">
       <el-form class="searchForm" ref="formRef" :model="form" :rules="rules" size="large" :inline="true">
         <el-form-item label="姓名" label-width="80px" prop="xm">
           <el-input v-model="form.xm" placeholder="请输入姓名" clearable></el-input>

+ 11 - 9
ruoyi-web/src/views/rzyljgsq/sqzltx/index.vue

@@ -24,9 +24,8 @@
           <el-input v-model="form.yyLrRzyddh" placeholder="请输入手机号码" clearable></el-input>
         </el-form-item>
         <el-form-item label="养老机构选择" prop="yyLrYljg">
-          <el-input v-model="form.yyLrYljg" placeholder="请选择养老机构" clearable></el-input>
-          <!-- <el-button type="danger">选 择</el-button> -->
-          <!-- <el-cascader placeholder="请选择养老机构" clearable></el-cascader> -->
+          <el-input class="yljg-ipt" v-model="form.yyLrYljg" placeholder="请选择养老机构" disabled clearable></el-input>
+          <el-button type="danger" @click="showOrg = true">选 择</el-button>
         </el-form-item>
         <el-form-item label="老人居住地址所在行政区划" prop="lrjzdzxzqh">
           <el-input v-model="form.lrjzdzxzqh" placeholder="请选择老人居住地址所在行政区划" clearable></el-input>
@@ -43,7 +42,9 @@
     </div>
   </div>
   <!-- 选择养老机构弹出框 -->
-  <!-- <el-dialog v-model="showOrg" append-to-body></el-dialog> -->
+  <el-dialog title="养老机构选择" width="900px" v-model="showOrg" append-to-body>
+
+  </el-dialog>
 </template>
   
   
@@ -53,6 +54,7 @@ import { useRouter } from 'vue-router'
 import { orderOrg } from '@/api/home'
 
 const showForm = ref(true)
+const showOrg = ref(false)
 const loading = ref(false)
 const formRef = ref()
 let router = useRouter()
@@ -160,17 +162,17 @@ onBeforeUnmount(() => {
   background-size: 100%;
 
   .applyForm {
-    width: 43%;
+    width: 45%;
     margin: 0 auto;
 
     :deep(.el-cascader--large) {
       width: 100%;
     }
 
-    // .yljg-ipt {
-    //   width: 72%;
-    //   margin-right: 6%;
-    // }
+    .yljg-ipt {
+      width: 71%;
+      margin-right: 6%;
+    }
 
     .submitBtn {
       width: 100%;

+ 1 - 1
ruoyi-web/src/views/slhgzsq/index.vue

@@ -38,7 +38,7 @@
         <img class="sqlc" src="@/assets/images/slhsqgz/liucheng_6.a34e44d3.png" alt="" />
       </div>
     </div>
-    <el-dialog v-model="showSearch" title="查询结果" append-to-body :lock-scroll="false">
+    <el-dialog v-model="showSearch" title="查询结果" width="900px" append-to-body :lock-scroll="false">
       <el-form class="searchForm" ref="formRef" :model="form" :rules="rules" size="large" :inline="true">
         <el-form-item label="填报人姓名" label-width="100px" prop="tbrXm">
           <el-input v-model="form.tbrXm" placeholder="请输入填报人姓名" clearable></el-input>

+ 58 - 18
ruoyi-web/src/views/slhgzsq/sqzltx/index.vue

@@ -29,7 +29,8 @@
           <!-- <number placeholder="其中财政补助资金" v-model="form.czbtzjQt" :min="0" :max="10000000000" :precision="2" /> -->
         </el-form-item>
         <el-form-item label="改造住房地址" prop="zfdz">
-          <el-input v-model="form.zfdz" placeholder="请输入改造住房地址" clearable></el-input>
+          <!-- <el-input v-model="form.zfdz" placeholder="请输入改造住房地址" clearable></el-input> -->
+          <el-cascader v-model="form.zfdz" :props="props" placeholder="请输入改造住房地址" clearable></el-cascader>
           <!-- <RegionCascaderSelect v-model="form.zfdz" style="width: 100%"></RegionCascaderSelect> -->
         </el-form-item>
         <el-form-item label="详细地址" prop="xxdz">
@@ -84,30 +85,30 @@
 <script setup>
 import { getCurrentInstance, reactive, ref } from 'vue'
 import { useRouter } from 'vue-router'
-import { retrofitApply } from '@/api/home'
+import { retrofitApply, CountryDeptList } from '@/api/home'
 
 let router = useRouter()
 let timer
 const { proxy } = getCurrentInstance()
 const { CZ035, CH048, CH049 } = proxy.useDict('CZ035', 'CH048', 'CH049')
+
+/* --------表单相关start---------- */
 const loading = ref(false)
 const formRef = ref()
 const showForm = ref(true)
-// 表单数据
 const form = reactive({
-  // xm: '夏洛',
-  // lxdh: '15512341234',
-  // isTsknlr: '1',
-  // gzzj: '10000',
-  // czbtzjQt: '5000',
-  // zfdz: '220102001001',
-  // xxdz: '详细地址',
+  xm: '夏洛',
+  lxdh: '15512341234',
+  isTsknlr: '1',
+  gzzj: '10000',
+  czbtzjQt: '5000',
+  zfdz: '',
+  xxdz: '详细地址',
   // sfdm:'01',
   // gznr:'03',
-  // tbrXm: '填报人',
-  // tbrSjhm: '15512341234',
+  tbrXm: '填报人',
+  tbrSjhm: '15512341234',
 })
-// 表单校验
 const rules = reactive({
   xm: [
     { required: true, message: '改造对象姓名不能为空', trigger: 'blur' },
@@ -159,22 +160,32 @@ function changeQT(value, value2, value3) {
     this.form[value3] = "";
   }
 }
-
 function ifQTS(value, value2) {
   if (value && value.indexOf(value2) !== -1) {
     return true
   }
   return false
 }
-
 async function onSubmit(formEl) {
   if (!formEl) return
   await formEl.validate((valid, fields) => {
     loading.value = true
     if (valid) {
-      form.gznr = form.gznr.join(',')
-      retrofitApply(form).then((res) => {
-        console.log(res);
+      let szxzqh = ''
+      if (Array.isArray(form.zfdz)) {
+        szxzqh = form.zfdz[form.zfdz.length - 1]
+      } else {
+        let data = JSON.parse(form.zfdz)
+        szxzqh = data[data.length - 1]
+      }
+      let postData = {
+        ...form,
+        gznr: form.gznr.join(','),
+        zfdz: szxzqh
+      }
+      console.log('postData', postData);
+      retrofitApply(postData).then((res) => {
+        console.log('res', res);
         showForm.value = false
         timer = setTimeout(() => router.push('/slhgzsq'), 2000)
       }).finally(() => {
@@ -185,7 +196,36 @@ async function onSubmit(formEl) {
     }
   })
 }
+/* --------表单相关end---------- */
 
+/* --------改造住房地址级联框start---------- */
+const props = {
+  lazy: true,
+  checkStrictly: true,
+  lazyLoad: async (node, resolve) => {
+    const { level } = node
+    let params = level === 0 ? "" : { parentId: node.data.nodeData.id }
+    let response = await CountryDeptList(params)
+    let code = response.code
+    let data = response.data || response.rows
+    if (code !== 200) {
+      this.$message.error("获取行政区划数据失败!")
+      resolve([])
+      return
+    }
+    let res = data.map(item => {
+      let value = String(item["code"])
+      return {
+        label: item.name,
+        value,
+        leaf: level >= 4,
+        nodeData: item
+      }
+    })
+    resolve(res)
+  }
+}
+/* --------改造住房地址级联框end---------- */
 </script>