Browse Source

更新导入message

cornyuan 7 months ago
parent
commit
12d71f7fe4
1 changed files with 130 additions and 153 deletions
  1. 130 153
      src/views/recruit/postSkill.vue

+ 130 - 153
src/views/recruit/postSkill.vue

@@ -58,52 +58,64 @@
 			确认导入
 			</el-button>
 		</div>
-				<!-- <div style="width: 100%;text-align: right;">
-					<div class="excel-import-container">
-						<el-upload
-							class="upload-excel"
-							action="#"
-							:auto-upload="false"
-							:on-change="handleFileChange"
-							:on-remove="handleFileRemove"
-							:file-list="fileList"
-							accept=".xlsx,.xls"
-							drag
-						>
-						<i class="el-icon-upload"></i>
-						<div class="el-upload__text">
-							将文件拖到此处,或<em>点击上传</em>
-						</div>
-						<div class="el-upload__tip" slot="tip">
-							仅支持.xls/.xlsx格式文件,单个文件大小不超过10MB
-						</div>
-						</el-upload>
-						<br></br>
-						<el-button
-							type="primary"
-							icon="el-icon-upload2"
-							@click="handleImport"
-							:disabled="!fileList.length"
-							style="margin-top: 20px;"
-							>
-							确认导入
-						</el-button>
-						<el-button style="margin-bottom: 20px;" size="" type="primary" @click="cancel">刷新
-						</el-button>
-						<el-button style="margin:10px;" size="" type="primary" icon="document"
-							:disabled="!isAuth('positionList:add')" @click="classAdd(1)">添加
-						</el-button>
-					</div>
-				</div> -->
-				<!-- 职业方向-->
-			<el-table v-loading="tableDataLoading" :data="tableData.records">
+		<!-- 职业方向-->
+		<el-table v-loading="tableDataLoading" :data="tableData.records">
+			<el-table-column prop="postSkillId" label="编号" width="160">
+			</el-table-column>
+			<el-table-column prop="postSkillName" label="职业方向">
+			</el-table-column>
+			<el-table-column prop="sort" label="排序">
+			</el-table-column>
+			<el-table-column prop="isEnable" label="状态" >
+				<template slot-scope="scope">
+					<el-switch v-model="scope.row.isEnable" @change="change(scope.row.postSkillId,scope.row.isEnable,scope.row)"
+						:disabled="!isAuth('positionList:update')" :active-value="openValue2"
+						:inactive-value="closeValue2" active-color="#13ce66" inactive-color="#ff4949">
+					</el-switch>
+				</template>
+			</el-table-column>
+			<!-- <el-table-column prop="ruleClassifyId"  label="岗位ID" width="160">
+			</el-table-column> -->
+			<el-table-column prop="ruleClassifyName" label="岗位名称" >
+			</el-table-column>
+			<el-table-column prop="updateTime" label="更新时间" width="180">
+			</el-table-column>
+			<el-table-column label="操作" prop="id" width="200" fixed='right' align="center">
+				<template slot-scope="scope">
+					<el-button size="mini" type="primary" style="margin: 5px;"
+						@click="classList(scope.row,2)">职业技能列表
+					</el-button>
+					<el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')" style="margin: 5px;"
+						@click="classAdd(0,scope.row)">修改
+					</el-button>
+					<el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')" style="margin: 5px;"
+						@click="classdelete(scope.row)">删除
+					</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+		<div style="text-align: center;margin-top: 10px;">
+			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
+				layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
+			</el-pagination>
+		</div>
+		<!-- </el-tab-pane> -->
+		<!--    图片展示-->
+		<el-dialog title="二级岗位列表" :visible.sync="dialogVisible" width="70%" center>
+			<div style="margin:2% 0;display: inline-block;">
+				<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="classAdd(2)">
+					添加
+				</el-button>
+			</div>
+			<el-table v-loading="tableDataLoading4" :data="stationList.records">
 				<el-table-column prop="postSkillId" label="编号" width="160">
 				</el-table-column>
-				<el-table-column prop="postSkillName" label="职业方向">
+				<el-table-column prop="postSkillName" label="职业技能">
 				</el-table-column>
 				<el-table-column prop="sort" label="排序">
 				</el-table-column>
-				<el-table-column prop="isEnable" label="状态" >
+				<el-table-column prop="isEnable" label="状态">
 					<template slot-scope="scope">
 						<el-switch v-model="scope.row.isEnable" @change="change(scope.row.postSkillId,scope.row.isEnable,scope.row)"
 							:disabled="!isAuth('positionList:update')" :active-value="openValue2"
@@ -111,126 +123,77 @@
 						</el-switch>
 					</template>
 				</el-table-column>
-				<!-- <el-table-column prop="ruleClassifyId"  label="岗位ID" width="160">
+				<!-- <el-table-column prop="ruleClassifyId" label="岗位ID" >
 				</el-table-column> -->
 				<el-table-column prop="ruleClassifyName" label="岗位名称" >
 				</el-table-column>
 				<el-table-column prop="updateTime" label="更新时间" width="180">
 				</el-table-column>
-				<el-table-column label="操作" prop="id" width="200" fixed='right' align="center">
+				<el-table-column label="操作" fixed='right' width="180">
 					<template slot-scope="scope">
-						<el-button size="mini" type="primary" style="margin: 5px;"
-							@click="classList(scope.row,2)">职业技能列表
-						</el-button>
-						<el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')" style="margin: 5px;"
-							@click="classAdd(0,scope.row)">修改
+						<el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')"
+							@click="classAdd(0,scope.row,2)">修改
 						</el-button>
-						<el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')" style="margin: 5px;"
-							@click="classdelete(scope.row)">删除
+						<el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')"
+							@click="stationDelete(scope.row)">删除
 						</el-button>
 					</template>
 				</el-table-column>
 			</el-table>
 			<div style="text-align: center;margin-top: 10px;">
-				<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-					:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
-					layout="total,sizes, prev, pager, next,jumper" :total="tableData.total">
+				<el-pagination @size-change="handleSizeChangeGw" @current-change="handleCurrentChangeGw"
+					:page-sizes="[5, 10, 15, 20]" :page-size="size1" :current-page="page1"
+					layout="total,sizes, prev, pager, next,jumper" :total="stationList.total">
 				</el-pagination>
 			</div>
-			<!-- </el-tab-pane> -->
-			<!--    图片展示-->
-			<el-dialog title="二级岗位列表" :visible.sync="dialogVisible" width="70%" center>
-				<div style="margin:2% 0;display: inline-block;">
-					<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="classAdd(2)">
-						添加
-					</el-button>
-				</div>
-				<el-table v-loading="tableDataLoading4" :data="stationList.records">
-					<el-table-column prop="postSkillId" label="编号" width="160">
-					</el-table-column>
-					<el-table-column prop="postSkillName" label="职业技能">
-					</el-table-column>
-					<el-table-column prop="sort" label="排序">
-					</el-table-column>
-					<el-table-column prop="isEnable" label="状态">
-						<template slot-scope="scope">
-							<el-switch v-model="scope.row.isEnable" @change="change(scope.row.postSkillId,scope.row.isEnable,scope.row)"
-								:disabled="!isAuth('positionList:update')" :active-value="openValue2"
-								:inactive-value="closeValue2" active-color="#13ce66" inactive-color="#ff4949">
-							</el-switch>
-						</template>
-					</el-table-column>
-					<!-- <el-table-column prop="ruleClassifyId" label="岗位ID" >
-					</el-table-column> -->
-					<el-table-column prop="ruleClassifyName" label="岗位名称" >
-					</el-table-column>
-					<el-table-column prop="updateTime" label="更新时间" width="180">
-					</el-table-column>
-					<el-table-column label="操作" fixed='right' width="180">
-						<template slot-scope="scope">
-							<el-button size="mini" type="primary" :disabled="!isAuth('positionList:update')"
-								@click="classAdd(0,scope.row,2)">修改
-							</el-button>
-							<el-button size="mini" type="danger" :disabled="!isAuth('positionList:delete')"
-								@click="stationDelete(scope.row)">删除
-							</el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-				<div style="text-align: center;margin-top: 10px;">
-					<el-pagination @size-change="handleSizeChangeGw" @current-change="handleCurrentChangeGw"
-						:page-sizes="[5, 10, 15, 20]" :page-size="size1" :current-page="page1"
-						layout="total,sizes, prev, pager, next,jumper" :total="stationList.total">
-					</el-pagination>
-				</div>
-			</el-dialog>
-			<!-- 添加、修改职业技能 -->
-			<el-dialog :title="titles" :visible.sync="dialogFormVisible9" center>
-				<div style="margin-bottom: 10px;position: relative;">
-					<div style="width: 200px;display: inline-block;text-align: right;position: absolute;top: 0;">所属岗位:</div>
-					<div class="ruleitem" style="display: inline-block;margin-left: 200px;">
-						<div>
-							<span>一级岗位分类:<el-radio v-for="(item,index) in yijiData" :key="index" v-model="yijiid"
-									:label="item.ruleClassifyId"
-									@change="yijiBtn(yijiid)">{{item.ruleClassifyName}}</el-radio></span>
-						</div>
-						<div v-if="yijiid!=''">
-							<span>二级级岗位分类:<el-radio v-for="(item,index) in erjiData" :key="index" v-model="erjiId"
-									:label="item.ruleClassifyId"
-									@change="erjiBtn(erjiId)">{{item.title}}</el-radio></span>
-						</div>
-						<div v-if="erjiId!=''">
-							<span>岗位名称:<el-radio v-for="(item,index) in sanjiData" :key="index" v-model="sanjiTypr"
-									:label="item.ruleClassifyId">{{item.ruleClassifyName}}</el-radio></span>
-						</div>
+		</el-dialog>
+		<!-- 添加、修改职业技能 -->
+		<el-dialog :title="titles" :visible.sync="dialogFormVisible9" center>
+			<div style="margin-bottom: 10px;position: relative;">
+				<div style="width: 200px;display: inline-block;text-align: right;position: absolute;top: 0;">所属岗位:</div>
+				<div class="ruleitem" style="display: inline-block;margin-left: 200px;">
+					<div>
+						<span>一级岗位分类:<el-radio v-for="(item,index) in yijiData" :key="index" v-model="yijiid"
+								:label="item.ruleClassifyId"
+								@change="yijiBtn(yijiid)">{{item.ruleClassifyName}}</el-radio></span>
+					</div>
+					<div v-if="yijiid!=''">
+						<span>二级级岗位分类:<el-radio v-for="(item,index) in erjiData" :key="index" v-model="erjiId"
+								:label="item.ruleClassifyId"
+								@change="erjiBtn(erjiId)">{{item.title}}</el-radio></span>
+					</div>
+					<div v-if="erjiId!=''">
+						<span>岗位名称:<el-radio v-for="(item,index) in sanjiData" :key="index" v-model="sanjiTypr"
+								:label="item.ruleClassifyId">{{item.ruleClassifyName}}</el-radio></span>
 					</div>
 				</div>
+			</div>
 
-				<div style="margin-bottom: 10px;" v-if="parentId==0">
-					<span style="width: 200px;display: inline-block;text-align: right;">职业方向名称:</span>
-					<el-input style="width:50%;" v-model="postSkillName" type="text" placeholder="请输入职业方向名称"></el-input>
-				</div>
-				<div style="margin-bottom: 10px;" v-if="parentId!=0">
-					<span style="width: 200px;display: inline-block;text-align: right;">职业技能名称:</span>
-					<el-input style="width:50%;" v-model="postSkillName" type="text" placeholder="请输入职业技能名称"></el-input>
-				</div>
+			<div style="margin-bottom: 10px;" v-if="parentId==0">
+				<span style="width: 200px;display: inline-block;text-align: right;">职业方向名称:</span>
+				<el-input style="width:50%;" v-model="postSkillName" type="text" placeholder="请输入职业方向名称"></el-input>
+			</div>
+			<div style="margin-bottom: 10px;" v-if="parentId!=0">
+				<span style="width: 200px;display: inline-block;text-align: right;">职业技能名称:</span>
+				<el-input style="width:50%;" v-model="postSkillName" type="text" placeholder="请输入职业技能名称"></el-input>
+			</div>
 
-				<div style="margin-bottom: 10px;display:flex;">
-					<span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
-					<el-input-number size="medium" v-model="sort"></el-input-number>
-				</div>
-				<div style="margin-bottom: 10px;display:flex;">
-					<span style="width: 200px;display: inline-block;text-align: right;">状态:</span>
-					<el-radio-group v-model="gameStatus">
-						<el-radio :label="1">启用</el-radio>
-						<el-radio :label="0">禁用</el-radio>
-					</el-radio-group>
-				</div>
-				<div slot="footer" class="dialog-footer">
-					<el-button @click="dialogFormVisible9 = false">取 消</el-button>
-					<el-button type="primary" @click="refuseto1()">确 定</el-button>
-				</div>
-			</el-dialog>
+			<div style="margin-bottom: 10px;display:flex;">
+				<span style="width: 200px;display: inline-block;text-align: right;">排序:</span>
+				<el-input-number size="medium" v-model="sort"></el-input-number>
+			</div>
+			<div style="margin-bottom: 10px;display:flex;">
+				<span style="width: 200px;display: inline-block;text-align: right;">状态:</span>
+				<el-radio-group v-model="gameStatus">
+					<el-radio :label="1">启用</el-radio>
+					<el-radio :label="0">禁用</el-radio>
+				</el-radio-group>
+			</div>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="dialogFormVisible9 = false">取 消</el-button>
+				<el-button type="primary" @click="refuseto1()">确 定</el-button>
+			</div>
+		</el-dialog>
 
 		<!-- </el-tabs> -->
 	</div>
@@ -754,16 +717,30 @@
 					}).then(({
 						data
 					}) => {
-						this.$message({
-							message: data.msg,
-							type: 'success',
-							duration: 1500,
-							onClose: () => {
-									this.stationClass()
-									// this.stationClass2()
-								// this.dialogVisibleS = false
-							}
-						})
+						if(data.code == 0){
+							this.$message({
+								message: data.msg,
+								type: 'success',
+								duration: 1500,
+								onClose: () => {
+										this.stationClass()
+										// this.stationClass2()
+									// this.dialogVisibleS = false
+								}
+							})
+						}else{
+							this.$message({
+								message: data.msg,
+								type: 'error',
+								duration: 1500,
+								onClose: () => {
+										this.stationClass()
+										// this.stationClass2()
+									// this.dialogVisibleS = false
+								}
+							})
+							return
+						}
 
 					})