From bcac500a760877dc9140f1f381739793706c1af6 Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期五, 10 十一月 2023 10:29:38 +0800 Subject: [PATCH] 修改图片大小 --- ruoyi-ui/src/views/self/show.vue | 403 ++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 240 insertions(+), 163 deletions(-) diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue index df1df64..e9a7273 100644 --- a/ruoyi-ui/src/views/self/show.vue +++ b/ruoyi-ui/src/views/self/show.vue @@ -1,5 +1,5 @@ <template> - <div class="app-container"> + <div class="app-container" id="printable-content"> <!-- 鍒锋柊椤甸潰 --> <!-- <MyComponent :key="componentKey" />--> <!-- 鍥炲埌椤堕儴--> @@ -8,11 +8,40 @@ class="el-icon-top" ></el-button> </el-backtop> - <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;"> + <h1 style="font-size:21px;padding-top:30px;display: flex;"> <span>涓汉绠�鍘�</span> + <div class="button-container" > + <el-button + size="mini" + style="background: #E0EEFE; + border-radius: 7px 7px 7px 7px;opacity: 1; margin-left: 20px;" + @click="handleEdit()" + v-if="isShow" + v-hasPermi="['system:role:edit']" + >缂栬緫</el-button> + <el-button v-if="isShow_2" size="mini" + style=" width: 67px;height: 27px;background:#E0EEFE; + border-radius: 7px 7px 7px 7px;opacity: 1;margin-left: 20px; "@click="submitForm" :disabled="dsb">瀹屾垚</el-button> + + <el-button + size="mini" + style=" width: 67px;height: 27px;background: #D2F3E0; + border-radius: 7px 7px 7px 7px;opacity: 1;margin-left: 20px; " + @click="handleExport" + v-hasPermi="['family:note:export']" + >瀵煎嚭</el-button> + + <el-button + size="mini" + style=" width: 67px;height: 27px;background: #FFDDE3; + border-radius: 7px 7px 7px 7px;opacity: 1; margin-left: 20px;" + v-print="'#printable-content'" + v-hasPermi="['family:note:export']" + >鎵撳嵃</el-button> + </div> <div style="display: flex; align-items: center;"> - <el-button size="mini" type="text" @click="toMemo" v-hasPermi="['person:information:memo']"> - <div class="form" ><el-icon style="padding-right:110px;"></el-icon> + <el-button size="mini" type="text" @click="toMemo" v-hasPermi="['person:information:memo']" style="margin-left: 20px"> + <div class="form" ><el-icon style="padding-right:100px;"></el-icon> <span class="text" style="width: 69px;height: 26px;font-size: 16px; font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">涓汉璁颁簨鏈�</span></div> </el-button> @@ -27,19 +56,19 @@ <el-col > <el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left" v-loading="loading" :data="individualList" @selection-change="handleSelectionChange" > - <el-row :span="5"> + <el-row :span="6"> <el-form-item label="濮撳悕" prop="nickName" label-width="40px"> <el-input v-model="individualList.nickName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> </el-row> - <el-row :span="5"> + <el-row :span="6"> <el-form-item label="鏇剧敤鍚�" prop="oldName" label-width="60px"> <el-input v-model="individualList.oldName" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> </el-form-item> </el-row> - <el-row :span="5"> + <el-row :span="6"> <el-form-item label="韬唤璇佸彿" prop="idNum" label-width="70px"> <el-input v-model="individualList.idNum" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"> </el-input> @@ -49,7 +78,7 @@ </el-col> </el-container> </div> - <div style="padding-left:30px"> + <div style="padding-left:60px"> <el-container> <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange"> <el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left"> @@ -84,7 +113,7 @@ </el-col> </el-container> </div> - <div style="padding-left:30px"> + <div style="padding-left:60px"> <el-container> <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange"> <el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left":disabled="dsb"> @@ -116,7 +145,7 @@ </el-col> </el-container> </div> - <div style="padding-left:30px;padding-top:30px"> + <div style="padding-left:100px;padding-top:30px"> <el-col :span="6" :data="individualList"> <div class="block" :model="individualList"> <div v-if="!isEditing"> @@ -167,29 +196,7 @@ </div> <div style="padding-left:30px;padding-top:30px" > - <el-container > - <el-row > - <el-button - type="primary" - @click="handleEdit()" - v-if="isShow" - v-hasPermi="['system:role:edit']" - >缂栬緫</el-button> - <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">瀹屾垚</el-button> - <br> - <el-button - type="primary" - @click="handleExport" - v-hasPermi="['family:note:export']" - >瀵煎嚭</el-button> - <br> - <el-button - type="primary" - v-hasPermi="['family:note:export']" - >鎵撳嵃</el-button> - </el-row> - </el-container> </div> <!-- </el-dialog> self:user:export--> </el-container> @@ -221,7 +228,7 @@ </el-col> </el-container> </div> - <div style="padding-left:30px"> + <div style="padding-left:60px"> <el-container> <el-col v-loading="loading" :data="individualList" @selection-change="handleSelectionChange"> <el-form ref="elForm" :model="individualList" :rules="rules" size="medium" label-position="left"> @@ -280,7 +287,7 @@ <el-collapse-item name="1" > <template v-slot:title> <div class="title-wrapper"> - 涓昏瀛︿範鍙婂伐浣滅粡鍘� + <div class="left-content">涓昏瀛︿範鍙婂伐浣滅粡鍘�</div> <div> <el-button class="button" size="mini" type="text" @click="showDialog('open')" > <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button> @@ -291,13 +298,18 @@ <el-table-column label="寮�濮嬫棩鏈�" prop="startDate" sortable width="250" align="center" > <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.startDate }}</template> - <template v-else><el-input v-model="scope.row.startDate" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else> + <el-date-picker v-model="scope.row.startDate" 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="endDate" sortable width="250" align="center" > <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.endDate }}</template> - <template v-else><el-input v-model="scope.row.endDate" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else><el-date-picker v-model="scope.row.endDate" 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="content" sortable width="350" align="center" > @@ -329,10 +341,11 @@ <el-collapse-item name="2" > <template v-slot:title> <div class="title-wrapper"> - 瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐� + <div class="left-content">瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�</div> <div> - <el-button class="button2" size="mini" type="text" @click="showDialog('relation1')"> - <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button></div> + <el-button class="button" size="mini" type="text" @click="showDialog('relation1')"> + <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button> + </div> </div> </template> <el-table v-loading="loading" :data="relationList" @selection-change="handleSelectionChange" @@ -383,8 +396,8 @@ <el-collapse-item name="4"> <template v-slot:title> <div class="title-wrapper"> - 鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐� - <el-button class="button4" size="mini" type="text" @click="showDialog('certificate')"> + <div class="left-content">鎸佹湁璇佷欢鎯呭喌</div> + <el-button class="button" size="mini" type="text" @click="showDialog('certificate')"> <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button> </div> </template> @@ -417,13 +430,19 @@ <el-table-column label="寮�濮嬫椂闂�" prop="startTime" sortable width="230" align="center"> <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template> - <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else> + <el-date-picker v-model="scope.row.startTime" 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="endTime" sortable width="230" align="center"> <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template> - <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else> + <el-date-picker v-model="scope.row.endTime" 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"> @@ -442,8 +461,8 @@ <el-collapse-item name="5"> <template v-slot:title> <div class="title-wrapper"> - 鍑哄浗锛堝锛夋儏鍐� - <el-button class="button5" size="mini" type="text" @click="showDialog('abroad')"> + <div class="left-content">鍑哄浗锛堝锛夋儏鍐�</div> + <el-button class="button" size="mini" type="text" @click="showDialog('abroad')"> <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn></el-button> </div> </template> @@ -452,13 +471,19 @@ <el-table-column label="寮�濮嬫椂闂�" prop="startTime" sortable width="200" align="center"> <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.startTime }}</template> - <template v-else><el-input v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else> + <el-date-picker v-model="scope.row.startTime" 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="endTime" sortable width="200" align="center"> <template slot-scope="scope"> <template v-if="!scope.row.isEdit">{{ scope.row.endTime }}</template> - <template v-else><el-input v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡"></el-input></template> + <template v-else> + <el-date-picker v-model="scope.row.endTime" 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="destination" sortable width="300" align="center" > @@ -485,39 +510,42 @@ </el-table-column> </el-table> </el-collapse-item> + <!-- 鑷紶--> + <el-collapse-item name="6"> + <template v-slot:title> + <div class="title-wrapper"> + <div class="left-content">鑷紶</div> + <div> + <el-button size='mini' type="text" class="button" @click="showDialog('autobiography')" > + <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> + </el-button> + </div> + </div> + </template> + <el-contain> + <div> + <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" + v-loading="loading" :data="AutobiographyList" > + <el-tab-pane v-for="(item, index) in AutobiographyList" + :key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'宀�'+'('+item.term+')'"> + <div>{{ item.content }}</div> + <el-button size='mini' type="text" class="btn_edit" @click="editAutobiography(item)" style='position: absolute;right:40px;top:5px;'> + <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> + </el-button> + + <el-button size="mini" type="text" class="btn_del" @click="handleAutobiography(item)" style='position: absolute;right:10px;top:5px;'> + <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> + </el-button> + + </el-tab-pane> + </el-tabs></div> + </el-contain> + </el-collapse-item> + </el-collapse> - <!-- 鑷紶--> - <div style="padding-top:30px"> - <el-container> - <div style="width:100%"><h2 style="font-size:15px" >鑷紶</h2></div> - </el-container> - <div style='position: relative;'> - <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" - v-loading="loading" :data="AutobiographyList" > - <el-tab-pane v-for="(item, index) in AutobiographyList" - :key='item.id' :label="item.ageBegin+'~'+item.ageEnd+'宀�'+'('+item.term+')'"> - <div v-if="item.term === '濠村効'"> {{item.content}}</div> - <div v-if="item.term === '骞煎効'"> {{item.content}}</div> - <div v-if="item.term === '灏忓'"> {{item.content}}</div> - <div v-if="item.term === '鍒濅腑'"> {{item.content}}</div> - <div v-if="item.term === '楂樹腑'"> {{item.content}}</div> - <div v-if="item.term === '澶у'"> {{item.content}}</div> - <div v-if="item.term === '鐮旂┒鐢�'"> {{item.content}}</div> - <div v-if="item.term === '宸ヤ綔'"> {{item.content}}</div> - <div v-if="item.term === '缁撳鍚�'"> {{item.content}}</div> - <el-button size='mini' type="text" class="btn_edit" @click="editData(item)" style='position: absolute;right:10px;top:5px;'> - <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> - </el-button> - </el-tab-pane> - </el-tabs> - <el-button size='mini' type="text" class="btn_autobiography" @click="showDialog('autobiography')" style='position: absolute;right:10px;top:5px;'> - <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn> - </el-button> - </div> - </div> <pagination v-show="total>0" @@ -528,13 +556,17 @@ /> <!-- 鏂板涓昏缁忓巻淇℃伅閰嶇疆瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="dialogVisible.open" width="900px" append-to-body> + <el-dialog title="鏂板涓昏缁忓巻淇℃伅" :visible.sync="dialogVisible.open" width="900px" append-to-body> <el-form ref="elForm1" :model="formDat" :rules="rules" size="medium" label-width="140px"> <el-form-item label="寮�濮嬫棩鏈�" prop="startDate"> - <el-input v-model="formDat.startDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input> + <el-date-picker v-model="formDat.startDate" 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="endDate"> - <el-input v-model="formDat.endDate" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input> + <el-date-picker v-model="formDat.endDate" 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="content"> <el-input v-model="formDat.content" type="textarea" :rows="5" placeholder="璇疯緭鍏ヤ富瑕佸涔犵粡鍘嗐�佸伐浣滃崟浣嶅強浠昏亴鎯呭喌" clearable :style="{width: '100%'}" > @@ -554,7 +586,7 @@ </div> </el-dialog> <!-- 鏂板瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐典俊鎭厤缃璇濇 --> - <el-dialog :title="title" :visible.sync="dialogVisible.relation1" width="900px" append-to-body> + <el-dialog title="鏂板瀹跺涵鎴愬憳鍙婁富瑕佺ぞ浼氬叧绯绘儏鍐�" :visible.sync="dialogVisible.relation1" width="900px" append-to-body> <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px"> <el-form-item label="涓庢湰浜哄叧绯�" prop="relation"> <el-input v-model="formDat.relation" placeholder="璇疯緭鍏ヤ笌鏈汉鍏崇郴" clearable :style="{width: '100%'}" ></el-input> @@ -584,18 +616,20 @@ <el-button @click="cancelData">鍙� 娑�</el-button> </div> </el-dialog> - <!-- 鏂板鎸佹湁鍑哄叆澧冭瘉浠舵儏鍐典俊鎭厤缃璇濇 --> - <el-dialog :title="title" :visible.sync="dialogVisible.certificate" width="900px" append-to-body> + <!-- 鏂板鎸佹湁璇佷欢鎯呭喌淇℃伅閰嶇疆瀵硅瘽妗� --> + <el-dialog title="鏂板鎸佹湁璇佷欢鎯呭喌" :visible.sync="dialogVisible.certificate" width="900px" append-to-body> <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px"> <el-form-item label="璇佷欢鍚嶇О" prop="cerName"> <el-input v-model="formDat.cerName" placeholder="璇疯緭鍏ヨ瘉浠跺悕绉�" clearable :style="{width: '100%'}" > </el-input> </el-form-item> <el-form-item label="璇佷欢绫诲瀷" prop="type"> - <el-select v-model="formDat.type" placeholder="璇烽�夋嫨绫诲瀷" clearable :style="{width: '100%'}" > + <el-select v-model="formDat.type" placeholder="璇烽�夋嫨璇佷欢绫诲瀷" clearable :style="{width: '100%'}" > <el-option v-for="(item, index) in typeOption" :key="index" :label="item.label" :value="item.value" ></el-option> </el-select> + <el-input v-model="newOption" v-if="showInput" placeholder="鑻ユ湭鍦ㄤ笂杩伴�夐」涓壘鍒板搴旂被鍨嬶紝璇峰湪姝よ緭鍏ユ柊鐨勮瘉浠剁被鍨�" @change="addNewOption"></el-input> + </el-form-item> <el-form-item label="鎸佹湁鎯呭喌" prop="ownStatus"> <el-input v-model="formDat.ownStatus" placeholder="璇疯緭鍏ユ寔鏈夋儏鍐�" clearable :style="{width: '100%'}" > @@ -606,11 +640,14 @@ </el-input> </el-form-item> <el-form-item label="寮�濮嬫棩鏈�" prop="startTime"> - <el-input v-model="formDat.startTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input> - </el-form-item> + <el-date-picker v-model="formDat.startTime" 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="endTime"> - <el-input v-model="formDat.endTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input> - </el-form-item> + <el-date-picker v-model="formDat.endTime" 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> @@ -620,14 +657,16 @@ </div> </el-dialog> <!-- 鏂板鍑哄浗锛堝锛夋儏鍐典俊鎭厤缃璇濇 --> - <el-dialog :title="title" :visible.sync="dialogVisible.abroad" width="900px" append-to-body> + <el-dialog title="鏂板鍑哄浗锛堝锛夋儏鍐典俊鎭�" :visible.sync="dialogVisible.abroad" width="900px" append-to-body> <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px"> <el-form-item label="寮�濮嬫棩鏈�" prop="startTime"> - <el-input v-model="formDat.startTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" ></el-input> - </el-form-item> + <el-date-picker v-model="formDat.startTime" 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="endTime"> - <el-input v-model="formDat.endTime" type='date' placeholder='閫夋嫨鏃ユ湡' clearable :style="{width: '100%'}" > - </el-input> + <el-date-picker v-model="formDat.endTime" 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="destination"> <el-input v-model="formDat.destination" type="textarea" :rows="5" placeholder="璇疯緭鍏ユ墍鍒板浗瀹舵垨鑰呭湴鍖�" clearable :style="{width: '100%'}" > @@ -666,10 +705,12 @@ <span> 宀� </span> </el-form-item> <el-form-item label="鏃舵湡锛�" prop="term"> - <el-select v-model="formDat.term" placeholder="璇烽�夋嫨鏃舵湡" clearable :style="{width: '50%'}" > - <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value" - ></el-option> - </el-select> +<!-- <el-select v-model="formDat.term" placeholder="璇烽�夋嫨鏃舵湡" clearable :style="{width: '50%'}" >--> +<!-- <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"--> +<!-- ></el-option>--> +<!-- </el-select>--> + <el-input v-model="formDat.term" placeholder="璇疯緭鍏ユ椂鏈�" clearable :style="{width: '100%'}" > + </el-input> </el-form-item> <el-form-item label="鍐呭缂栬緫锛�" prop="content"> <el-input v-model="formDat.content" type="textarea" :rows="5" placeholder="" clearable :style="{width: '100%'}" > @@ -686,7 +727,6 @@ </div> </el-dialog> - </div> </template> @@ -701,8 +741,8 @@ listExperience, addExperience, updateExperience, delExperience, getIndividualRelation, addRelation, updateRelation, delRelation, getCertificateList, addCertificate, updateCertificate, delCertificate, - getAbroadList, addAbroad, updateAbroad, delAbroad, - getAutobiographyList, getAutobiographyTermList, addAutobiography,updateAutobiography, + getAbroadList, addAbroad, updateAbroad, delAbroad, listType, + getAutobiographyList, getAutobiographyTermList, addAutobiography, updateAutobiography,delAutobiography, getCategory, } from "@/api/self/index"; import { delFamilyevent, uploadPic } from '../../api/bignote' @@ -713,9 +753,7 @@ export default { name: "show", dicts: ['sys_normal_disable'], - // components: { - // MyComponent - // }, + data() { return { // 閬僵灞� @@ -755,6 +793,7 @@ relationList:[], //鍑哄叆澧冭瘉浠舵儏鍐� certificateList:[], + typeList:[], //鍑哄浗鎯呭喌 AbroadList:[], @@ -786,8 +825,6 @@ }, // 寮瑰嚭灞傛爣棰� title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, // open:true, // 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛� @@ -965,7 +1002,7 @@ //鑷紶 term: [{ required: true, - message: '璇烽�夋嫨鏃舵湡', + message: '璇疯緭鍏ユ椂鏈�', trigger: 'blur' }], ageBegin: [{ @@ -982,16 +1019,9 @@ }, selectedOption:'', typeOptions:[], - typeOption: [{ - value:'鎶ょ収', - label:'鎶ょ収' - },{ - value:'閫氳璇�', - label:'閫氳璇�' - },{ - value:'韬唤璇�', - label:'韬唤璇�' - }], + typeOption:[], + newOption: undefined, + showInput: true }; }, created() { @@ -1021,7 +1051,7 @@ //涓嬫媺 handleChange(activeNames) { - // console.log(val); + // console.log(activeNames); this.reset(); }, showDialog(dialogName) { @@ -1046,6 +1076,11 @@ // 鎵撳紑寮圭獥 this.dialogVisible.autobiography = true; }, + editAutobiography(item) { + this.isEdit1 = true; + this.dialogVisible.autobiography = true; + this.formDat = { ...item }; + }, //闅旇鍙樿壊 tableRowClassName({ row, rowIndex }) { @@ -1067,7 +1102,14 @@ return '鈥斺�斺�斺�斺�斺��' } }, - +//绫诲埆 + addNewOption() { + const newOption = this.newOption.trim(); + if (newOption && !this.typeOption.includes(newOption)) { + this.typeOption.push(newOption); + this.$set(this.formDat, 'type', newOption); // 鏇存柊formDat.type鐨勫�间负鏂扮殑閫夐」 + } + }, /** 鏌ヨ瑙掕壊鍒楄〃 */ getList() { this.loading = true; @@ -1078,7 +1120,7 @@ // alert(123) // console.log(response.data) this.experienceList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; } ); @@ -1087,7 +1129,7 @@ // alert(123) // console.log(response.data) this.relationList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; } ); @@ -1096,7 +1138,7 @@ // alert(123) // console.log(response.data) this.individualList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; } ); @@ -1105,7 +1147,7 @@ // alert(123) // console.log(response.data) this.certificateList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; } ); @@ -1114,7 +1156,7 @@ // alert(123) // console.log(response.data) this.AbroadList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; } ); @@ -1123,7 +1165,7 @@ // alert(123) // console.log(response.data) this.AutobiographyList = response.data; - this.total = response.data.total; + // this.total = response.data.total; this.loading = false; }); @@ -1135,6 +1177,32 @@ // this.total = response.data.total; // this.loading = false; // }); + listType(this.queryParams).then(response => { + this.typeList = response.data; + // this.total = response.data.total; + // console.log( this.typeList ) + // 鍦ㄥ洖璋冨嚱鏁颁腑璋冪敤 getTypeOptions() + this.getTypeOptions(); + this.loading = false; + } + ); + }, + getTypeOptions() { + const filteredOptions = this.typeList.filter(item => typeof item === 'string' && item !== ''); + // 鍒涘缓涓�涓┖瀵硅薄鐢ㄤ簬瀛樺偍鍞竴鐨勫瓧绗︿覆閫夐」 + const uniqueOptions = {}; + // 鏋勫缓涓嬫媺閫夐」鍒楄〃 + this.typeOption = filteredOptions.reduce((options, option) => { + if (!uniqueOptions[option]) { + uniqueOptions[option] = true; + options.push({ + label: option, + value: option + }); + } + return options; + }, []); + }, //鍥剧墖鐨勪笂浼犲強涓婁紶鎸夐挳闅愯棌 @@ -1215,12 +1283,6 @@ }); }, - handleRemoveFile(file) { - alert(23) - }, - handleRemove(file) { - alert("323") - }, handlePictureCardPreview(file) { this.dialogImageUrl = file.url; this.dialogVisible = true; @@ -1259,24 +1321,23 @@ getAutobiographyInfor() { let _this = this - getCategory().then(response=>{ - + getCategory().then(response => { // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{ // _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]}) // }) response.data.itemValues.replace("{", "").replace("}", "").split(",").map(elem => { const label = elem.split(":")[0].trim(); const value = parseInt(elem.split(":")[1].trim()); - _this.typeOptions.push({ "label": label, "value": value }); - // this.getSrc1(value) - }) - }) - // if(AutobiographyList.ageEnd==null){ - // this.AgeEnd='?' - // }else{ - // this.AgeEnd=this.ageEnd - // } + // 鍒ゆ柇 typeOptions 鏁扮粍涓槸鍚﹀凡瀛樺湪鐩稿悓鐨� value + if (!_this.typeOptions.some(option => option.value === value)) { + _this.typeOptions.push({ "label": label, "value": value }); + } + // console.log(_this.typeOptions) + // _this.getSrc1(value) + }); + }); + }, /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */ @@ -1349,14 +1410,14 @@ this.$refs["elForm"].validate(valid => { if (valid) { // 鏍规嵁鍊兼壘鍒伴�変腑鐨勯�夐」瀵硅薄 - const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term); + // const selectedOption = this.typeOptions.find(option => option.value === this.formDat.term); if (this.isEdit1) { // 鎵ц淇敼鎿嶄綔 updateAutobiography(this.formDat).then(response => { // 灏嗛�変腑閫夐」鐨勬枃鏈缃负"term"瀛楁鐨勫�� - this.formDat.term = selectedOption.label; - this.formDat.id = selectedOption.id; + // this.formDat.term = selectedOption.value; + // this.formDat.id = selectedOption.id; console.log("1") this.$modal.msgSuccess("淇敼鎴愬姛"); this.dialogVisible.autobiography = false; @@ -1370,7 +1431,7 @@ } else { // 鎵ц鏂板鎿嶄綔 addAutobiography(this.formDat).then(response => { - this.formDat.term = selectedOption.label; + // this.formDat.term = selectedOption.label; this.$modal.msgSuccess("鏂板鎴愬姛"); this.dialogVisible.autobiography = false; this.getList(); @@ -1438,6 +1499,7 @@ // 鍒锋柊椤甸潰 // window.location.reload(); }, + //澶村儚淇敼 uploadImage() { const inputElement = document.createElement("input"); inputElement.type = "file"; @@ -1630,6 +1692,16 @@ this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }).catch(() => {}); }, + /** 鍒犻櫎涓汉鑷紶鎸夐挳鎿嶄綔 */ + handleAutobiography(row) { + const Ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鏁版嵁椤癸紵').then(function() { + return delAutobiography(Ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => {}); + }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { @@ -1641,7 +1713,7 @@ }; </script> -<style > +<style scoped=""> /*.uoloadSty {*/ /* width:110px;*/ /* height:110px;*/ @@ -1665,39 +1737,44 @@ background: #FFEFF2; } -/*.co-item{*/ -/* background-color: #EBAFB4;*/ -/*}*/ + .el-collapse-item__header { background-color:#FEF7FC; + width: 100%; } .title-wrapper { display: flex; justify-content: space-between; + align-items: center; + width: calc(100% - 50px); +} +.left-content { + + width: 100%; } .btn_autobiography{ background:center no-repeat url('../../assets/icons/add1.png') ; + margin-left: 76vw; } .btn_edit{ background:center no-repeat url('../../assets/icons/edit.png') ; } - +.btn_del{ + background:center no-repeat url('../../assets/images/鍒犻櫎2.png') ; +} +.button-container { + text-align: right; + display: flex; + justify-content: flex-end; + align-items: center; + flex-grow: 1; +} .button { background:center no-repeat url('../../assets/icons/add1.png') ; - margin-left: 69.5vw; - -} -.button2 { - background: center no-repeat url('../../assets/icons/add1.png') ; - margin-left: 66vw; -} -.button4 { - background: center no-repeat url('../../assets/icons/add1.png') ; - margin-left: 69.5vw; -} -.button5 { - background:center no-repeat url('../../assets/icons/add1.png') ; - margin-left: 71vw; + /*margin-right: -10px ;*/ + flex-shrink: 0; + width: 30px; + height: 28px; } .form{ background:center/11% no-repeat url('../../assets/icons/form.png') ; -- Gitblit v1.9.1