From 0bed59a7c83975e466e31aa2fa14d8ee15473813 Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期四, 16 一月 2025 11:20:35 +0800 Subject: [PATCH] 修改了对应的bug --- ruoyi-ui/src/views/marry/index.vue | 1924 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 1,120 insertions(+), 804 deletions(-) diff --git a/ruoyi-ui/src/views/marry/index.vue b/ruoyi-ui/src/views/marry/index.vue index 46b997a..023a33c 100644 --- a/ruoyi-ui/src/views/marry/index.vue +++ b/ruoyi-ui/src/views/marry/index.vue @@ -1,830 +1,1146 @@ <template> - <div class="app-container"> - <!-- 鍥炲埌椤堕儴--> - <el-backtop :bottom="150" :right="30"> - <el-button type="primary" circle - class="el-icon-top" - ></el-button> - </el-backtop> - <h1 style="font-size:21px;padding-top:30px">濠氬Щ鐘跺喌鐧昏琛�</h1> - <el-divider /> - <!-- 鍩烘湰淇℃伅--> - <h2 style="font-size:16px">鍩烘湰鎯呭喌</h2> - <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="濮撳悕" prop="name" label-width="40px"> - <el-input v-model="marryList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday" label-width="70px"> - <el-input v-model="marryList.birthday" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="韬唤璇佸彿鐮�" prop="id" label-width="85px"> - <el-input v-model="marryList.id" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="濠氬Щ鐘跺喌" prop="marryStatus" label-width="70px"> - <el-input v-model="marryList.marryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb" > - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鎴风睄鍦板潃" prop="address" label-width="70px"> - <el-input v-model="marryList.address" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + <div class="app-container" id="printable-content"> + <!-- 鍥炲埌椤堕儴--> + <el-backtop :bottom="150" :right="30"> + <el-button type="primary" circle + class="el-icon-top" + ></el-button> + </el-backtop> + <h2 style="font-size:30px;padding-top:0px">濠氬Щ鐘跺喌鐧昏琛�</h2> + + <el-divider /> + + <!-- 鍩烘湰淇℃伅--> + <!-- <h2 style="font-size:21px">鍩烘湰鎯呭喌</h2> + <el-container> + <div style="padding-left:0px;width: 28%;" > + <el-container > + <el-col > + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" + v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" > + <el-row :span="16"> + <el-form-item label="濮撳悕" prop="name" label-width="50px"> + <el-input v-model="marryList.name " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday" label-width="75px"> + + <el-date-picker v-model="marryList.birthday" + type="date" + placeholder="璇烽�夋嫨鏃ユ湡" + :editable="false" + :clearable="false" + :style="{width: '100%'}" + :disabled="dsb" value-format="yyyy-MM-dd"></el-date-picker> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="韬唤璇佸彿鐮�" prop="id" label-width="95px"> + <el-input v-model="marryList.id" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="濠氬Щ鐘跺喌" prop="marryStatus" label-width="80px" > + <template v-if="!isEditing"> + <el-input v-if="marryList.marryStatus===0" placeholder="鏈" style="" :disabled="dsb"></el-input> + <el-input v-if="marryList.marryStatus===1" placeholder="鍒濆" :disabled="dsb"></el-input> + <el-input v-if="marryList.marryStatus===2" placeholder="绂诲" :disabled="dsb"></el-input> + <el-input v-if="marryList.marryStatus===3" placeholder="鍐嶅" :disabled="dsb"></el-input> + + </template> + <template v-else> + <el-select v-model="mrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}" @change="handleMarryStatusChange"> + <el-option label="鏈" value='0'></el-option> + <el-option label="鍒濆" value='1'></el-option> + <el-option label="绂诲" value='2'></el-option> + <el-option label="鍐嶅" value='3'></el-option> + + </el-select> + </template> + + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鎴风睄鍦板潃" prop="address" label-width="70px"> + <el-input v-model="marryList.address" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> - </el-form> + </el-form> + </el-col> + </el-container> + </div> + <div style="width: 35%;padding-left: 100px;"> + <el-container> + <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> + <el-row :span="16"> + + <el-form-item label="鎬у埆" prop="sex" label-width="40px"> + <template v-if="!isEditing"> + <el-input v-model="marryList.sex === '鐢�' ? sinds='鐢�':sinds='濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> + </template> + <template v-else> + <el-select v-model="sinds" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> + <el-option label="鐢�" value='鐢�'></el-option> + <el-option label="濂�" value='濂�'></el-option> + </el-select> + </template> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="姘戞棌" prop="nation" label-width="40px"> + <el-input v-model="marryList.nation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鑱旂郴鐢佃瘽" prop="phone" label-width="70px"> + <el-input v-model="marryList.phone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="缁撳鏃堕棿" prop="marryTime" label-width="70px"> + <el-date-picker v-model="marryList.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + </el-row> + </el-form> + </el-col> + </el-container> + </div> + + + + + </el-container> --> + <h2 style="font-size:16px " >閰嶅伓鎯呭喌</h2> + <el-container> + <div style="padding-top:15px;width: 28%;" > + <el-container > + <el-col > + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" + :data="marryList" @selection-change="handleSelectionChange" > + <el-row :span="16"> + <el-form-item label="濮撳悕" prop="spouseName" label-width="40px"> + <el-input v-model="marryList.spouseName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鍑虹敓鏃ユ湡" prop="spouseBirthday" label-width="70px"> + <el-date-picker v-model="marryList.spouseBirthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="韬唤璇佸彿鐮�" prop="spouseIdNo" label-width="85px"> + <el-input v-model="marryList.spouseIdNo" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="濠氬Щ鐘跺喌" prop="spouseMarryStatus" label-width="70px" > + <template v-if="!isEditing"> + <el-input v-if="marryList.spouseMarryStatus===0" placeholder="鏈" :disabled="dsb"></el-input> + <el-input v-if="marryList.spouseMarryStatus===1" placeholder="鍒濆" :disabled="dsb"></el-input> + <el-input v-if="marryList.spouseMarryStatus===2" placeholder="绂诲" :disabled="dsb"></el-input> + <el-input v-if="marryList.spouseMarryStatus===3" placeholder="鍐嶅" :disabled="dsb"></el-input> + + </template> + <template v-else> + <el-select v-model="smrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}"> + <el-option label="鏈" value="0"></el-option> + <el-option label="鍒濆" value="1"></el-option> + <el-option label="绂诲" value="2"></el-option> + <el-option label="鍐嶅" value="3"></el-option> + + </el-select> + </template> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鎴风睄鍦板潃" prop="spouseAddress" label-width="70px"> + <el-input v-model="marryList.spouseAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + + + </el-form> + </el-col> + </el-container> + </div> + <div style="padding-left:100px;padding-top:15px;width: 30%;"> + <el-container> + <el-col :data="marryList" @selection-change="handleSelectionChange"> + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> + <el-row :span="16"> + <el-form-item label="鎬у埆" prop="spouseSex" label-width="40px"> + + <template v-if="!isEditing"> + <el-input v-model="marryList.spouseSex === '鐢�' ? inds='鐢�':inds='濂�'" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input> + </template> + <template v-else> + <el-select v-model="inds" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" :disabled="dsb"> + <el-option label="鐢�" value='鐢�'></el-option> + <el-option label="濂�" value='濂�'></el-option> + </el-select> + </template> + + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="姘戞棌" prop="spouseNation" label-width="40px"> + <el-input v-model="marryList.spouseNation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="鑱旂郴鐢佃瘽" prop="spousePhone" label-width="70px"> + <el-input v-model="marryList.spousePhone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> + </el-input> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="缁撳鏃堕棿" prop="spouseMarryTime" label-width="70px"> + <el-date-picker v-model="marryList.spouseMarryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + </el-row> + </el-form> + </el-col> + </el-container> + </div> + + <div style="padding-left:400px;padding-top:30px" > + <el-container > + + + <el-row :gutter="10" class="mb8" v-if="userId != 2"> + <el-col > + <el-button + plain + @click="handleEdit()" + style="width: 80px;height: 32px;background: #E0EEFE;" + v-if="isShow" + v-hasPermi="['system:role:edit']" + >缂栬緫</el-button> + <el-button v-if="isShow_2" style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">瀹屾垚</el-button> + <br> + </el-col> - </el-container> - </div> - <div style="padding-left:200px"> - <el-container> - <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - <el-form-item label="鎬у埆" prop="sex" label-width="40px"> - <el-input v-model="marryList.sex === 1 ? '鐢�':'濂�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="姘戞棌" prop="nation" label-width="40px"> - <el-input v-model="marryList.nation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鑱旂郴鐢佃瘽" prop="phone" label-width="70px"> - <el-input v-model="marryList.phone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="缁撳鏃堕棿" prop="marryTime" label-width="70px"> - <el-input v-model="marryList.marryTime" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - - - <div style="padding-left:400px;padding-top:30px" > - <el-container > + <el-col style="padding-top: 10px;"> + <el-button + plain + style="width: 80px;height: 32px;background: #D2F3E0;" + @click="handleExport" + v-hasPermi="['family:note:export']" + >瀵煎嚭</el-button></el-col> - - <el-row > - <el-button - type="primary" - @click="handleUpdate(scope.row)" - v-hasPermi="['system:role:edit']" - >缂栬緫</el-button> - - <br> - <el-button - type="primary" - @click="handleExport" - v-hasPermi="['family:note:export']" - >瀵煎嚭</el-button> - </el-row> - - </el-container> - </div> - <!-- </el-dialog> self:user:export--> - </el-container> - <h2 style="font-size:16px " >閰嶅伓鎯呭喌</h2> - <el-container> - <div style="padding-top:15px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="濮撳悕" prop="spouseName" label-width="40px"> - <el-input v-model="marryList.spouseName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍑虹敓鏃ユ湡" prop="spouseBirthday" label-width="70px"> - <el-input v-model="marryList.spouseBirthday" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="韬唤璇佸彿鐮�" prop="spouseId" label-width="85px"> - <el-input v-model="marryList.spouseId" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="濠氬Щ鐘跺喌" prop="spouseMarryStatus" label-width="70px"> - <el-input v-model="marryList.spouseMarryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鎴风睄鍦板潃" prop="spouseAddress" label-width="70px"> - <el-input v-model="marryList.spouseAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + <el-col style="padding-top: 10px;"> + <el-button + plain + style="width: 80px;height: 32px;background: #FFDDE3;" + v-print="'#printable-content'" + v-hasPermi="['family:note:export']" + >鎵撳嵃</el-button></el-col> - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:200px;padding-top:15px"> - <el-container> - <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - <el-form-item label="鎬у埆" prop="spouseSex" label-width="40px"> - <el-input v-model="marryList.spouseSex === 1 ? '鐢�':'濂�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="姘戞棌" prop="spouseNation" label-width="40px"> - <el-input v-model="marryList.spouseNation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鑱旂郴鐢佃瘽" prop="spousePhone" label-width="70px"> - <el-input v-model="marryList.spousePhone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="缁撳鏃堕棿" prop="marryTime" label-width="70px"> - <el-input v-model="marryList.marryTime" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - + </el-row> - - <div style="padding-left:30px;padding-top:30px" > - <el-container > - <!-- <template slot-scope="scope" v-if="scope.row.roleId !== 1">--> - <!-- <el-button--> - <!-- size="mini"--> - <!-- type="text"--> - <!-- icon="el-icon-edit"--> - <!-- @click="handleUpdate(scope.row)"--> - <!-- v-hasPermi="['system:role:edit']"--> - <!-- >淇敼</el-button>--> - - <!-- </template>--> - - - </el-container> - </div> - <!-- </el-dialog> self:user:export--> - </el-container> + </el-container> + </div> - <!-- <h2 style="font-size:16px " >鍓嶄换鎯呭喌</h2> - <el-container> - <div style="padding-top:15px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="marryList.oldSpouseList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="marryList.oldSpouseList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="濮撳悕" prop="name" label-width="40px"> - <el-input v-model="marryList.oldSpouseList.name" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鍑虹敓鏃ユ湡" prop="spouseBirthday" label-width="70px"> - <el-input v-model="marryList.spouseBirthday" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="韬唤璇佸彿鐮�" prop="spouseId" label-width="85px"> - <el-input v-model="marryList.spouseId" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="濠氬Щ鐘跺喌" prop="spouseMarryStatus" label-width="70px"> - <el-input v-model="marryList.spouseMarryStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鎴风睄鍦板潃" prop="spouseAddress" label-width="70px"> - <el-input v-model="marryList.spouseAddress" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + <div style="padding-left:30px;padding-top:30px" > + <el-container > - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:200px;padding-top:15px"> - <el-container> - <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"> - <el-row :span="16"> - <el-form-item label="鎬у埆" prop="spouseSex" label-width="40px"> - <el-input v-model="marryList.spouseSex === 1 ? '鐢�':'濂�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="姘戞棌" prop="spouseNation" label-width="40px"> - <el-input v-model="marryList.spouseNation " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="鑱旂郴鐢佃瘽" prop="spousePhone" label-width="70px"> - <el-input v-model="marryList.spousePhone" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="缁撳鏃堕棿" prop="marryTime" label-width="70px"> - <el-input v-model="marryList.marryTime" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - </el-form> - </el-col> - </el-container> - </div> - </el-container> --> + + </el-container> + </div> + <!-- </el-dialog> self:user:export--> + </el-container> + + <div v-if="showOldSpouse"> + <el-collapse v-model="activeNames" @change="handleChange"> + + <el-collapse-item name="1" > + <template v-slot:title> + <h2 style="font-size:16px ">鍓嶄换鎯呭喌</h2> + <div class="title-wrapper"> + <!-- <div> + <el-button class="button" size="mini" type="text" @click="handleAdd"> + <span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span></el-button> + </div> --> + + + </div> + </template> + <el-table :data="oldSpouseList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2; border-radius: 14px 14px 14px 14px;"> + <el-table-column label="濮撳悕" prop="name" sortable width="160" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.name }}</template> + <template v-else><el-input v-model="scope.row.name"></el-input></template> + </template> + </el-table-column> + <el-table-column label="鎬у埆" prop="sex" sortable width="80" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.sex }}</template> + <template v-else><el-select v-model="scope.row.sex" placeholder="璇烽�夋嫨"> + <el-option label="濂�" value='濂�'></el-option> + <el-option label="鐢�" value='鐢�'></el-option> + </el-select></template> + </template> + </el-table-column> + <el-table-column label="姘戞棌" prop="nation" sortable width="100" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.nation }}</template> + <template v-else><el-input v-model="scope.row.nation"></el-input></template> + </template> + </el-table-column> + <el-table-column label="鍑虹敓鏃ユ湡" prop="birthday" sortable width="150" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.birthday }}</template> + <template v-else><el-date-picker v-model="scope.row.birthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd"> + </el-date-picker></template> + </template> + </el-table-column> + <el-table-column label="鎴风睄鍦板潃" prop="address" sortable width="180" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.address }}</template> + <template v-else><el-input v-model="scope.row.address"></el-input></template> + </template> + </el-table-column> + <el-table-column label="韬唤璇佸彿" prop="idNo" sortable width="180" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.idNo }}</template> + <template v-else><el-input v-model="scope.row.idNo"></el-input></template> + </template> + </el-table-column> + <el-table-column label="宸ヤ綔鍦板潃" prop="address" sortable width="180" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.address }}</template> + <template v-else><el-input v-model="scope.row.address"></el-input></template> + </template> + </el-table-column> + + + <el-table-column label="濠氬Щ鐘舵��" prop="marryStatus" sortable width="100" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit" > + <span v-if="scope.row.marryStatus== 0">鏈</span> + <span v-if="scope.row.marryStatus== 1">鍒濆</span> + <span v-if="scope.row.marryStatus== 2">绂诲</span> + <span v-if="scope.row.marryStatus== 3">鍐嶅</span></template> + <template v-else> <el-select v-model="qianren" placeholder="璇烽�夋嫨" @change="getMarryStatus"> + <el-option v-for="item in qianrenOptions" + :key="item.value" :label="item.label" :value="item.value"/> + </el-select></template> + </template> + </el-table-column> + + + <el-table-column label="缁撳鏃堕棿" prop="marryTime" sortable width="150" align="center" > + <template slot-scope="scope"> + <template v-if="!scope.row.isEdit">{{ scope.row.marryTime }}</template> + <template v-else><el-date-picker v-model="scope.row.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd"> + </el-date-picker></template> + </template> + </el-table-column> + <!-- 鎿嶄綔 --> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" v-if="userId != 2"> + <template slot-scope="scope" v-if="scope.row.roleId !== 1"> + <el-button size="mini" type="text" icon="el-icon-edit" v-if="!editStatus[scope.row.id]" + @click="editRow(scope.row)" v-hasPermi="['system:role:edit']">淇敼</el-button> + <el-button size="mini" type="text" + v-if="editStatus[scope.row.id]" @click="saveRowmarryList(scope.row)">淇濆瓨</el-button> + <el-button size="mini" type="text" icon="el-icon-delete" + @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + </el-collapse-item> + + </el-collapse> + </div> <h2 style="font-size:16px " >鐢熻偛鎯呭喌</h2> - + <el-container> - <div style="padding-left:0px" > - <el-container > - <el-col > - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" - v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" > - <el-row :span="16"> - <el-form-item label="鐢熻偛鎯呭喌" prop="bearStatus" label-width="80px"> - <el-input v-model="marryList.bearStatus" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="棰嗗彇銆婅鍒掔敓鑲叉湇鍔℃墜鍐屻��" prop="handbookStatus" label-width="180px"> - <el-input v-model="marryList.handbookStatus ===1 ? '鏄�':'鍚�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="棰嗗彇銆婄嫭鐢熷瓙濂宠瘉銆�" prop="oneBorn" label-width="150px"> - <el-input v-model="marryList.oneBorn ===1 ? '鏄�':'鍚�' " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - + <div style="padding-left:0px" > + <el-container > + <el-col > + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" + :data="marryList" @selection-change="handleSelectionChange" > + <el-row :span="16"> + <el-form-item label="鐢熻偛鎯呭喌" prop="bearStatus" label-width="80px"> + <template v-if="!isEditing"> + <el-input v-if="marryList.bearStatus===0" placeholder="鏈敓鑲�" style="" :disabled="dsb"></el-input> + <el-input v-if="marryList.bearStatus===1" placeholder="鍦ㄥ瓡" :disabled="dsb"></el-input> + <el-input v-if="marryList.bearStatus===2" placeholder="宸茬敓鑲�" :disabled="dsb"></el-input> + </template> + <template v-else> + <el-select v-model="bear" placeholder="璇烽�夋嫨鐢熻偛鎯呭喌" clearable :style="{width: '100%'}"> + <el-option label="鏈敓鑲�" value='0'></el-option> + <el-option label="鍦ㄥ瓡" value='1'></el-option> + <el-option label="宸茬敓鑲�" value='2'></el-option> + </el-select> + </template> - </el-form> - </el-col> - </el-container> - </div> - <div style="padding-left:200px; padding-top: 58px; "> - <el-container> - <el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange"> - <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" > + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="棰嗗彇銆婅鍒掔敓鑲叉湇鍔℃墜鍐屻��" prop="handbookStatus" label-width="180px"> + <template v-if="!isEditing"> + <el-input v-if="marryList.handbookStatus===0" placeholder="鍚�" style="" :disabled="dsb"></el-input> + <el-input v-if="marryList.handbookStatus===1" placeholder="鏄�" :disabled="dsb"></el-input> - <el-row :span="16" > - <el-form-item label="棰嗚瘉鏃堕棿" prop="handbookTime" label-width="70px"> - <el-input v-model="marryList.handbookTime " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> - <el-row :span="16"> - <el-form-item label="棰嗚瘉鏃堕棿" prop="oneBornTime" label-width="70px"> - <el-input v-model="marryList.oneBornTime" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> - </el-input> - </el-form-item> - </el-row> + </template> + <template v-else> + <el-select v-model="handsj" placeholder="璇烽�夋嫨鏄�/鍚�" clearable :style="{width: '100%'}"> + <el-option label="鍚�" value='0'></el-option> + <el-option label="鏄�" value='1'></el-option> + </el-select> + </template> - </el-form> - </el-col> - </el-container> - </div> - + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="棰嗗彇銆婄嫭鐢熷瓙濂宠瘉銆�" prop="oneBorn" label-width="150px"> + <template v-if="!isEditing"> + <el-input v-if="marryList.oneBorn===0" placeholder="鍚�" style="" :disabled="dsb"></el-input> + <el-input v-if="marryList.oneBorn===1" placeholder="鏄�" :disabled="dsb"></el-input> - - <div style="padding-left:400px;padding-top:30px" > - </div> - <!-- </el-dialog> self:user:export--> - </el-container> - - </div> - </template> - - <script> - import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; - import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; - - - - //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁� --鎺ュソ浜� - import {listMarry} from "@/api/marry/index"; - import { delFamilyevent, uploadPic } from '../../api/bignote' - import { blobValidate } from '../../utils/ruoyi' - - export default { - name: "show", - dicts: ['sys_normal_disable'], - data() { - return { - - // 閬僵灞� - disabled: false, - - loading: true, - formData:[], - // 閫変腑鏁扮粍 - ids: [], - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - //澶村儚涓婁紶 - showBtnDealImg:true, - noneBtnImg:false, - limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲� - //涓汉淇℃伅鏁版嵁 - marryList:[], - fit:['fill'], - - oldSpouseList:[], - //涓嬫媺瀹炵幇 - activeNames:['1'], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // open:true, - // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� - openDataScope: false, - menuExpand: false, - menuNodeAll: false, - deptExpand: true, - deptNodeAll: false, - // 鏃ユ湡鑼冨洿 - dateRange: [], - // 鏁版嵁鑼冨洿閫夐」 - fot:[".jpg",".jif"], - fileList:[ - ], - fileListOther:[ - - ], - dsb:true, - btn:false, - - - formDat: { - //涓汉鍩烘湰淇℃伅 - name:undefined, - oldName:undefined, - sex:undefined, - nationality:undefined, - nation:undefined, - maritalStatus:undefined, - phoneNumber:undefined, - idNum:undefined, - locationAddress:undefined, - alwaysAddress:undefined, - locationPolice:undefined, - alwaysPolice:undefined, - outStatus:undefined, - idNo:undefined, - unit:undefined, - position:undefined, - politicalOutlook:undefined, - img:undefined, - fatherId:undefined, - momId:undefined, - birthday:undefined, - familyId:undefined, - - - //涓昏瀛︿範鍙婂伐浣滅粡鍘� - id:undefined, - userId:undefined, - startDate:undefined, - content:undefined, - witness:undefined, - remark: undefined, - //瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐� - relation:undefined, - //鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐� - cerName:undefined, - validityDate:undefined, - ownStatus:undefined, - //鍑哄浗锛堝锛夋儏鍐� - destination:undefined, - cause:undefined, - url: undefined, + </template> + <template v-else> + <el-select v-model="onebear" placeholder="璇烽�夋嫨鏄�/鍚�" clearable :style="{width: '100%'}"> + <el-option label="鍚�" value='0'></el-option> + <el-option label="鏄�" value='1'></el-option> + </el-select> + </template> + </el-form-item> + </el-row> + + + </el-form> + </el-col> + </el-container> + </div> + <div style="padding-left:200px; padding-top: 58px; "> + <el-container> + <el-col :data="marryList" @selection-change="handleSelectionChange"> + <el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left" > + + <el-row :span="16" > + <el-form-item label="棰嗚瘉鏃堕棿" prop="handbookTime" label-width="70px"> + <el-date-picker v-model="marryList.handbookTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + </el-row> + <el-row :span="16"> + <el-form-item label="棰嗚瘉鏃堕棿" prop="oneBornTime" label-width="70px"> + <el-date-picker v-model="marryList.oneBornTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + </el-row> + + </el-form> + </el-col> + </el-container> + </div> + + + + <div style="padding-left:400px;padding-top:30px" > + </div> + <!-- </el-dialog> self:user:export--> + </el-container> + + <h2 style="font-size:16px " >闇�澹版槑鐨勬儏鍐�</h2> + <el-container> + <el-input v-model="marryList.notion " placeholder="" clearable :style="{width: '80%'}" :disabled="dsb"> </el-input> + </el-container> + <h2 style="font-size:16px " >澶囨敞</h2> + <el-container> + <el-input v-model="marryList.remark " placeholder="" clearable :style="{width: '80%'}" :disabled="dsb"> </el-input> + </el-container> + + <!-- 鏂板 --> + + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> + <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px"> + <el-form-item label="濮撳悕" prop="name"> + <el-input v-model="formDat.name" placeholder="璇疯緭鍏ュ鍚�" clearable :style="{width: '100%'}" ></el-input> + </el-form-item> + + <el-form-item label="鎬у埆" prop="sex"> + <el-select v-model="formDat.sex" placeholder="璇烽�夋嫨鎬у埆" clearable :style="{width: '100%'}" > + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" + ></el-option> + </el-select> + </el-form-item> + <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday"> + <el-date-picker v-model="formDat.birthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + <el-form-item label="姘戞棌" prop="nation"> + <el-input v-model="formDat.nation" placeholder="璇疯緭鍏ユ皯鏃�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> + <el-form-item label="韬唤璇佸彿" prop="idNo"> + <el-input v-model="formDat.idNo" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> + <el-form-item label="鎵嬫満鍙风爜" prop="phone"> + <el-input v-model="formDat.phone" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{width: '100%'}" > + </el-input> + </el-form-item> + <el-form-item label="鍦板潃" prop="address"> + <el-input v-model="formDat.address" placeholder="璇疯緭鍏ュ湴鍧�" clearable :style="{width: '100%'}" ></el-input> + </el-form-item> + <el-form-item label="濠氬Щ鐘舵��" prop="marryStatus"> + <el-select v-model="formDat.marryStatus" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}" > + <el-option v-for="(item, index) in typeOptions1" :key="index" :label="item.label" :value="item.value" + ></el-option> + </el-select> + </el-form-item> + <el-form-item label="缁撳鏃堕棿" prop="marryTime"> + <el-date-picker v-model="formDat.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd"> + </el-date-picker> + </el-form-item> + + + + + </el-form> + <h4 class="form-header"> </h4> + + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitDataScope">纭� 瀹�</el-button> + <el-button @click="cancelData">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; +import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; +import {listMarry,updateMarry,delMarryOld,addMarryOld,updateMarryOld} from "@/api/marry/index"; +import { blobValidate } from '../../utils/ruoyi' +import {getInfo} from "@/api/login"; + +export default { + name: "ZMarry", + dicts: ['sys_normal_disable'], + data() { + return { + qianren:undefined, +userId: undefined, + showOldSpouse:false,//鏄剧ず鍓嶄换淇℃伅 + // 閬僵灞� + disabled: false, + isEditing:false, + inds: undefined, + sinds: undefined, + loading: false, + formData:[], + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + //澶村儚涓婁紶 + showBtnDealImg:true, + noneBtnImg:false, + limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲� + //涓汉淇℃伅鏁版嵁 + marryList:{ + id:undefined, + name:undefined, + sex:undefined, + birthday:undefined, + nation:undefined, + idNo:undefined, + phone:undefined, + marryStatus:undefined, + marryTime:undefined, + address:undefined, + bearStatus:undefined, + handbookStatus:undefined, + handbookTime:undefined, + oneBorn:undefined, + oneBornTime:undefined, + notion:undefined, + remark:undefined, + spouseName:undefined, + spouseSex:undefined, + spouseBirthday:undefined, + spouseIdNo:undefined, + spouseAddress:undefined, + spouseMarryStatus:undefined, + spouseNation:undefined, + spouseMarryTime:undefined, + spousePhone:undefined, + }, + fit:['fill'], + + //涓嬫媺瀹炵幇 + activeNames:['1'], + // 寮瑰嚭灞傛爣棰� + title: "", + iddd:undefined, + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // open:true, + // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� + bear:undefined, + handsj:undefined, + onebear:undefined, + mrs:undefined, + smrs:undefined, + openDataScope: false, + menuExpand: false, + menuNodeAll: false, + deptExpand: true, + deptNodeAll: false, + // 鏃ユ湡鑼冨洿 + dateRange: [], + // 鏁版嵁鑼冨洿閫夐」 + // 鏁版嵁鑼冨洿閫夐」 + fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx', + '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng','.M4A'], + + fileList:[ + ], + fileListOther:[ + + ], + editStatus: {}, + dsb:true, + btn:false, + isShow:true, + isShow_2:false, + oldSpouseList:{ + name:undefined, + sex:undefined, + birthday:undefined, + nation:undefined, + idNo:undefined, + phone:undefined, + marryStatus:undefined, + marryTime:undefined, + address:undefined, + }, + formDat: { + //鍓嶄换淇℃伅 + name:undefined, + sex:undefined, + birthday:undefined, + nation:undefined, + idNo:undefined, + phone:undefined, + marryStatus:undefined, + marryTime:undefined, + address:undefined, + }, + // 鑿滃崟鍒楄〃 + menuOptions: [], + // 閮ㄩ棬鍒楄〃 + deptOptions: [], + // 鏌ヨ鍙傛暟 + queryParams: { + + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + defaultProps: { + children: "children", + label: "label" + }, + // 琛ㄥ崟鏍¢獙 + rules: { + idNo: [{ + // required: true, + message: '璇疯緭鍏ヨ韩浠借瘉鍙风爜', + trigger: 'blur' + }], + name: [{ + // required: true, + message: '璇疯緭鍏ュ鍚�', + trigger: 'blur' + }], + birthday: [{ + // required: true, + message: '璇烽�夋嫨鏃ユ湡', + trigger: 'change' + }], + marryStatus: [{ + // required: true, + message: '璇烽�夋嫨濠氬Щ鐘跺喌', + trigger: 'change' + }], + marryTime: [{ + // required: true, + message: '璇烽�夋嫨缁撳鏃堕棿', + trigger: 'change' + }], + + }, + typeOptions: [ { + value: '濂�', + label: '濂�', + }, + { + value: '鐢�', + label: '鐢�', + }], + typeOptions1: [ { + value: '0', + label: '鏈', + }, + { + value: '1', + label: '鍒濆', }, - // 鑿滃崟鍒楄〃 - menuOptions: [], - // 閮ㄩ棬鍒楄〃 - deptOptions: [], - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 5, - startDate:undefined, - content:undefined, - witness:undefined, + { + value: '2', + label: '绂诲', }, - // 琛ㄥ崟鍙傛暟 - form: {}, - defaultProps: { - children: "children", - label: "label" - }, - // 琛ㄥ崟鏍¢獙 - rules: { - //鍩烘湰淇℃伅 - nickName: [{ - // required: true, - message: '璇疯緭鍏ュ鍚�', - trigger: 'blur' - }], - oldName: [{ - // required: true, - message: '璇疯緭鍏ユ浘鐢ㄥ悕', - trigger: 'blur' - }], - idNum: [{ - // required: true, - message: '璇疯緭鍏ヨ韩浠借瘉鍙�', - trigger: 'blur' - }], - nationality: [{ - // required: true, - message: '璇疯緭鍏ュ浗绫�', - trigger: 'blur' - }], - maritalStatus: [{ - // required: true, - message: '璇疯緭鍏ユ皯鏃�', - trigger: 'blur' - }], - locationAddress: [{ - // required: true, - message: '璇疯緭鍏ユ埛绫嶅湴鍧�', - trigger: 'blur' - }], - alwaysAddress: [{ - // required: true, - message: '璇疯緭鍏ュ父浣忓湴鍧�', - trigger: 'blur' - }], - unit: [{ - // required: true, - message: '璇疯緭鍏ュ崟浣�', - trigger: 'blur' - }], - position: [{ - // required: true, - message: '璇疯緭鍏ヨ亴鍔¤亴绉�', - trigger: 'blur' - }], - locationPolice: [{ - // required: true, - message: '璇疯緭鍏ユ埛绫嶅湴鍏畨鏈哄叧', - trigger: 'blur' - }], - alwaysPolice: [{ - // required: true, - message: '璇疯緭鍏ュ父浣忓湴鍏畨鏈哄叧', - trigger: 'blur' - }], - - //涓昏瀛︿範鍙婂伐浣滅粡鍘� - startDate: [{ - required: true, - message: '璇疯緭鍏ヨ捣濮嬫棩鏈�', - trigger: 'blur' - }], - content: [{ - required: true, - message: '璇疯緭鍏ヤ富瑕佸涔犵粡鍘嗐�佸伐浣滃崟浣嶅強浠昏亴鎯呭喌', - trigger: 'blur' - }], - witness: [{ - required: true, - message: '璇疯緭鍏ヨ瘉鏄庝汉', - trigger: 'blur' - }], - - }, - typeOptions: [], - }; - }, - created() { - this.getList() - }, - methods: { + { + value: '3', + label: '鍐嶅', + },], - - // 鍙栨秷鎸夐挳 - cancelData() { - this.open = false; - this.reset(); - }, - //涓嬫媺 - handleChange(val) { - console.log(val); - }, - - // edit(row){ - // const id= row.id; - // this.reset(); - // this.title='缂栬緫涓汉淇℃伅'; - // this.$router.push('/self/self/edit/' + id); - // }, - //涓汉鑷紶 - handleClick(tab, event) { - // console.log(tab, event); - this.getAutobiographyInfor(); - if(tab.name == 0) { - - } - - //鏍规嵁涓嶅悓鏃舵鐨勪釜浜鸿嚜浼� - getAutobiographyTermList(this.queryParams).then(response => { - // alert(123) - // console.log(response.data) - this.AutobiographyTermList = response.data; - this.total = response.data.total; - this.loading = false; - }); - - getAutobiographyList(this.queryParams).then(response => { - // alert(123) - // console.log(response.data) - this.AutobiographyList = response.data; - this.total = response.data.total; - this.loading = false; - }); - }, - - - - - /** 鏌ヨ瑙掕壊鍒楄〃 */ - - - getList() { - this.loading = true; - - //涓汉淇℃伅 - listMarry(this.queryParams).then(response => { - // alert(123) - // console.log(response.data) - this.marryList = response.data; - this.total = response.data.total; - this.loading = false; - } - ); - listMarry(this.queryParams).then(response => { - // alert(123) - // console.log(response.data) - this.oldSpouseList = response.data; - this.total = response.data.total; - this.loading = false; - } - ); - - }, - - //鍥剧墖鐨勪笂浼犲強涓婁紶鎸夐挳闅愯棌 - - - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級 - cancelDataScope() { - this.openDataScope = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - if (this.$refs.menu != undefined) { - this.$refs.menu.setCheckedKeys([]); - } - this.menuExpand = false, - this.menuNodeAll = false, - this.deptExpand = true, - this.deptNodeAll = false, - this.form = { - roleId: undefined, - roleName: undefined, - roleKey: undefined, - roleSort: 0, - status: "0", - menuIds: [], - deptIds: [], - menuCheckStrictly: true, - deptCheckStrictly: true, - remark: undefined - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { - this.dateRange = []; - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.id) - console.log(this.ids) - this.single = selection.length!=1 - this.multiple = !selection.length - }, - - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞涓汉淇℃伅"; - }, - - - /** 鏌ョ湅璇︾粏淇℃伅 */ - handleCheck(row){ - const id = row.id; - this.$router.push("/self/self/edit/" + id); - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - const id = row.id; - let jd = true - - this.$router.push({ - path:"/self/marry/edit/" + id, - query:{ - detail:jd - } - }); - }, - - handleRemoveFile(file) { - alert(23) - }, - handleRemove(file) { - alert("鎿嶄綔鎴愬姛") - }, - handlePictureCardPreview(file) { - this.dialogImageUrl = file.url; - this.dialogVisible = true; - }, - //鐐瑰嚮涓嬭浇鍑芥暟 - handleDownload(url) { - var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; - - let lens = formData.path.split(".") - let suffix = lens[lens.length-1] - download(formData).then(async (response) => { - const isLogin = await blobValidate(response); - let nt = new Date().getTime() - let filename = 'selfevent_'+nt+'.'+suffix - const blob = new Blob([response]) - saveAs(blob, filename) - }) - }, - - /** 鏌ヨ鑷紶淇℃伅 */ - getAutobiographyInfor() - { - let _this = this - getAutobiography().then(response=>{ - - response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ - _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) - }) - }) - }, - /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ - submitDataScope: function() { - - let ul = this.fileList.map(function (elem){ - return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - }).join(",") - let uls = this.fileListOther.map(function (elem){ - return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"") - }).join(",") - this.formDat.url = ul+","+uls - this.$refs["elForm"].validate(valid => { - if (valid) { - - addIndividual(this.formDat).then(response => { - this.$modal.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - }); - }, - requestUpload(params) - { - var file = params.file; - var formData = new FormData(); - formData.append('uploadFile', file); - let _this = this - - uploadPic(formData).then(response => { - let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length) - - if(_this.fot.includes(pth) === true) + qianrenOptions:[ { - _this.fileList.push({name:response.data.fileName, "url":response.data.url}) - - } - - else{ - _this.fileListOther.push({name:response.data.fileName, url:response.data.url}) - - } - }) - - }, - /** 鍒犻櫎涓汉缁忓巻鎸夐挳鎿嶄綔 */ - handleExperienceDelete(row) { - const Ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { - return delExperience(Ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 鍒犻櫎鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐垫寜閽搷浣� */ - handleCertificateDelete(row) { - const Ids = row.id || this.ids; - this.$modal.confirm('鏄惁纭鍒犻櫎搴忓彿涓�"' + Ids + '"鐨勬暟鎹」锛�').then(function() { - return delCertificate(Ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('/self/user/export', { - ...this.queryParams - }, `self_${new Date().getTime()}.xlsx`) + value: '0', + label: '鏈', + }, + { + value: '1', + label: '鍒濆', + }, + { + value: '2', + label: '绂诲', + }, + { + value: '3', + label: '鍐嶅', + } + ], + + + }; + }, + created() { + this.getList() + this.getInfo() + }, + methods: { + getInfo(){ + console.log('-----------------') + getInfo().then(response=>{ + console.log(response.user.roles[0].roleId,'roleID') + this.userId = response.user.roles[0].roleId + }) + }, + handleMarryStatusChange() { + // 鍒ゆ柇褰撳墠閫変腑鐨勫濮荤姸鎬佹槸鍚︿负鍐嶅 + if (this.mrs === '3') { + this.showOldSpouse = true; + } else { + this.showOldSpouse = false; } + + }, + + //鎬у埆 + getSrc1(sex) { + if (sex === '濂�') { + return '濂�' + }else { + return '鐢�' + } + }, + + // 鍙栨秷鎸夐挳 + cancelData() { + this.open = false; + this.reset(); + + }, + //涓嬫媺 + handleChange(val) { + console.log(val); + }, + + + + + + /** 鏌ヨ瑙掕壊鍒楄〃 */ + + + getList() { + this.loading = true; + //涓汉淇℃伅 + listMarry().then(response => { + + if(response.data.length === 0){ + this.loading = false; + this.marryList={}; + this.oldSpouseList = {}; + console.log(this.marryList) + } + else{ + this.marryList = response.data; + this.oldSpouseList = this.marryList.oldSpouseList; + console.log(111) + console.log("淇℃伅") + console.log(this.marryList,'1111111111111111111'); + this.iddd = this.marryList.id + console.log(this.iddd,'2222222222222') + //alert(this.marryList.bearStatus) + if(this.marryList.marryStatus===3){ + this.showOldSpouse = true; + } else{ + this.showOldSpouse = false; + } + this.loading = false; + + } + + } + ); + + + }, + + //鍥剧墖鐨勪笂浼犲強涓婁紶鎸夐挳闅愯棌 + + + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級 + cancelDataScope() { + this.openDataScope = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + if (this.$refs.menu != undefined) { + this.$refs.menu.setCheckedKeys([]); + } + this.menuExpand = false, + this.menuNodeAll = false, + this.deptExpand = true, + this.deptNodeAll = false, + this.form = { + roleId: undefined, + roleName: undefined, + roleKey: undefined, + roleSort: 0, + status: "0", + menuIds: [], + deptIds: [], + menuCheckStrictly: true, + deptCheckStrictly: true, + remark: undefined + }; + this.resetForm("elForm"); + }, + + + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "鏂板濠氬Щ淇℃伅"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate() { + + let jd = true + + // this.$router.push({ + // path:"/self/marry/edit/" + id, + // query:{ + // detail:jd + // } + // }); + }, + // 缂栬緫鎸夐挳 + handleEdit() + { + this.dsb = false + this.btn = true + this.isShow=false + this.isShow_2=true + this.isEditing=true + if(this.marryList.marryStatus == 0) + this.mrs = '鏈' + else if(this.marryList.marryStatus == 1) + this.mrs = '鍒濆' + else if(this.marryList.marryStatus == 2) + this.mrs = '绂诲' + else + this.mrs = '鍐嶅'// this.isEdit=false + + if(this.marryList.spouseMarryStatus == 0) + this.smrs = '鏈' + else if(this.marryList.spouseMarryStatus == 1) + this.smrs = '鍒濆' + else if(this.marryList.spouseMarryStatus == 2) + this.smrs = '绂诲' + else + this.smrs = '鍐嶅' + if(this.marryList.bearStatus == 0) + this.bear = '鏈敓鑲�' + else if(this.marryList.bearStatus == 1) + this.bear = '鍦ㄥ瓡' + else if(this.marryList.bearStatus == 2) + this.bear = '宸茬敓鑲�' + + if(this.marryList.oneBorn == 0) + this.onebear = '鍚�' + else if(this.marryList.oneBorn == 1) + this.onebear = '鏄�' + + if(this.marryList.handbookStatus == 0) + this.handsj = '鍚�' + else if (this.marryList.handbookStatus == 1) + this.handsj = '鏄�' + + }, + + handleRemoveFile(file) { + alert(鎿嶄綔鎴愬姛) + }, + handleRemove(file) { + alert("鎿嶄綔鎴愬姛") + }, + handlePictureCardPreview(file) { + this.dialogImageUrl = file.url; + this.dialogVisible = true; + }, + //鐐瑰嚮涓嬭浇鍑芥暟 + handleDownload(url) { + var formData = {'path':"/"+url.replace(process.env.VUE_APP_BASE_TRUE_API,"")}; + + let lens = formData.path.split(".") + let suffix = lens[lens.length-1] + download(formData).then(async (response) => { + const isLogin = await blobValidate(response); + let nt = new Date().getTime() + let filename = 'selfevent_'+nt+'.'+suffix + const blob = new Blob([response]) + saveAs(blob, filename) + }) + }, + + + /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ + submitDataScope: function() { + let _this = this + this.$refs["elForm"].validate(valid => { + if (valid) { + console.log(this.formDat) + addMarryOld(this.formDat).then(response => { + // marryList.oldSpouseList.push(this.formDat); + this.$modal.msgSuccess("鏂板鎴愬姛"); + _this.formDat = {} + this.open = false; + this.getList(); + }); + } + }); + }, + + editRow(row) { + + if(row.marryStatus == '0') + this.qianren = '鏈' + else if(row.marryStatus == '1') + this.qianren = '鍒濆' + else if(row.marryStatus == '2') + this.qianren = '绂诲' + else + this.qianren = '鍐嶅'// this.isEdit=false + this.$set(row, 'isEdit', true); + this.$set(this.editStatus, row.id, true); + }, + //淇敼鍚庣殑淇濆瓨 + + submitForm() { + if(this.mrs!=undefined) + this.marryList.marryStatus = parseInt(this.mrs) + if(this.smrs!=undefined) + this.marryList.spouseMarryStatus = parseInt(this.smrs) + + if(this.bear!=undefined) + this.marryList.bearStatus = parseInt(this.bear) + + this.marryList.oneBorn = parseInt(this.onebear) + this.marryList.handbookStatus =parseInt(this.handsj) + this.marryList.sex = this.sinds + this.marryList.spouseSex = this.inds + console.log(this.marryList,'marryListmarryListmarryListmarryList') + // this.marryList.id = this.iddd + this.$refs['elForm'].validate(valid => { + // alert(valid) + if (valid) { + if (this.marryList.id !== undefined) { + updateMarry(this.marryList).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + // this.open = false; + this.btn=false + this.isEditing = false + this.dsb = true + this.isShow_2=false + this.isShow = true + this.getList() + + }).catch(error => { + console.error(error); + this.$modal.msgError("淇敼澶辫触"); + }); + } else { + this.$modal.msgSuccess("淇敼澶辫触"); + + } + } + }) + this.getList() + // 鍒锋柊椤甸潰 + // window.location.reload(); + }, + getMarryStatus(value){ + // alert(value) + if(value == '0') + this.qianren = '鏈' + else if(value == '1') + this.qianren = '鍒濆' + else if(value == '2') + this.qianren = '绂诲' + else + this.qianren = '鍐嶅'// this.isEdit=false + }, + //鍓嶄换淇敼 + saveRowmarryList(row) { + this.$refs['elForm'].validate(valid => { + + console.log(this.oldSpouseList,'oldSpouseListoldSpouseListoldSpouseListoldSpouseList') + if (valid) { + + if(this.qianren == '鏈') + row.marryStatus = 0 + else if(this.qianren == '鍒濆') + row.marryStatus = 1 + else if(this.qianren == '绂诲') + row.marryStatus = 2 + else + row.marryStatus = 3 + this.marryList.oldSpouseList = this.oldSpouseList + + const foundIndex = this.oldSpouseList.findIndex(item => item.id === row.id); + if (foundIndex !== -1) { + + this.marryList.oldSpouseList[foundIndex].marryStatus = Number(this.marryList.oldSpouseList[foundIndex].marryStatus) + // alert(this.marryList.oldSpouseList[foundIndex].marryStatus) + + const updatedData = Object.assign({}, this.marryList.oldSpouseList[foundIndex], row); + updateMarryOld(updatedData).then(response => { + + this.oldSpouseList = this.marryList.oldSpouseList + this.$modal.msgSuccess("淇敼鎴愬姛"); + console.log(updatedData,'updatedDataupdatedDataupdatedData') + console.log(response,'responseresponseresponseresponse') + this.getList(); + // console.log(this.oldSpouseList) + }).catch(error => { + this.$modal.msgError("淇敼澶辫触"); + console.log(error); + }); + } else { + this.$modal.msgError("淇敼澶辫触"); + } + } + }); + this.$set(row, 'isEdit', false); + this.$set(this.editStatus, row.id, false); + }, +handleSelectionChange() +{}, + //闅旇鍙樿壊 + tableRowClassName({ row, rowIndex }) { + if (rowIndex % 2 == 0) { + return "statistics-warning-row1"; + } else { + return "statistics-warning-row"; + } + }, + /** 鍒犻櫎鍓嶄换 */ + handleDelete(row) { + // console.log(this.oldSpouseList,'123123123123') + const id = row.id || this.oldSpouseList.id + + console.log(id) + + this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() { + return delMarryOld(id); + }).then((res) => { + console.log(res) + // this.oldSpouseList = this.oldSpouseList.filter(item => item.id !== id); + // this.marryList.oldSpouseList=this.oldSpouseList + // console.log(this.marryList.oldSpouseList,'oldSpouseListoldSpouseListoldSpouseList1') + + // console.log(this.oldSpouseList,'oldSpouseListoldSpouseListoldSpouseList2') + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + this.getList(); + console.log(this.marryList.oldSpouseList,'oldSpouseListoldSpouseListoldSpouseList1') + // window.location.reload(); + }).catch(() => {}); + }, + + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('/self/user/export', { + ...this.queryParams + }, `self_${new Date().getTime()}.xlsx`) } - }; - </script> - - \ No newline at end of file + } +}; +</script> +<style> +.el-table__row.statistics-warning-row { + background: #E0EEFE; + +} +.el-table__row.statistics-warning-row1 { + background: #FFEFF2; + +} +.button { + background:center no-repeat url('../../assets/icons/add1.png') ; + margin-left: 69.5vw; + +}</style> -- Gitblit v1.9.1