|
@@ -98,6 +98,12 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column min-width="120" align="center" prop="createTime" label="上传时间"></el-table-column>
|
|
<el-table-column min-width="120" align="center" prop="createTime" label="上传时间"></el-table-column>
|
|
|
|
+ <el-table-column fixed="right" align="center" label="操作" width="160px" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="primary" size="small" @click="handleClickViewCite(scope.row, 'view')">查看</el-button>
|
|
|
|
+ <el-button v-if="scope.row.status=='12' || scope.row.status=='22'" type="success" size="small" @click="handleClickViewCite(scope.row, 'edit')">修改</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<div class="myPage">
|
|
<div class="myPage">
|
|
@@ -219,7 +225,7 @@
|
|
<el-button size="small" type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button size="small" type="primary" @click="submitForm">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog title="上传表彰" :visible.sync="dialogVisibleCite" width="40%">
|
|
|
|
|
|
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogVisibleCite" width="40%">
|
|
<el-form :rules="rulesCite" ref="dataFormCite" :model="dataFormCite" label-width="100px">
|
|
<el-form :rules="rulesCite" ref="dataFormCite" :model="dataFormCite" label-width="100px">
|
|
<el-form-item label="表彰类型:" prop="type">
|
|
<el-form-item label="表彰类型:" prop="type">
|
|
<el-select clearable size="small" style="width: 95%;" v-model="dataFormCite.type" placeholder="请选择表彰类型">
|
|
<el-select clearable size="small" style="width: 95%;" v-model="dataFormCite.type" placeholder="请选择表彰类型">
|
|
@@ -253,7 +259,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
|
|
|
+ <span v-if="dialogStatus!='view'" slot="footer" class="dialog-footer">
|
|
<el-button size="small" type="primary" @click="submitFormCite">确 定</el-button>
|
|
<el-button size="small" type="primary" @click="submitFormCite">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -319,7 +325,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script scoped>
|
|
<script scoped>
|
|
-import { certificatePage, certificateUpload, notice, certificatType, dictList, allUserList, citeList, uploadCite, trainList, uploadTrain,editTrain } from "@/api/allApi";
|
|
|
|
|
|
+import { certificatePage, certificateUpload, notice, certificatType, dictList, allUserList, citeList, uploadCite, editCite, trainList, uploadTrain,editTrain } from "@/api/allApi";
|
|
import { handleTree } from '@/utils/index'
|
|
import { handleTree } from '@/utils/index'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -448,6 +454,32 @@ export default {
|
|
content: '',
|
|
content: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ handleClickViewCite(row, val) {
|
|
|
|
+ if(row.groupUsers && row.groupUsers.length>0){
|
|
|
|
+ let groupIds = [];
|
|
|
|
+ for (let i in row.groupUsers) {
|
|
|
|
+ groupIds.push(row.groupUsers[i].loginId);
|
|
|
|
+ }
|
|
|
|
+ row.groupIds = groupIds;
|
|
|
|
+ }
|
|
|
|
+ this.dataFormCite = Object.assign({}, row);
|
|
|
|
+ if (row.files) {
|
|
|
|
+ let files = row.files;
|
|
|
|
+ this.dataFormCite.files = [];
|
|
|
|
+ for (let i in files) {
|
|
|
|
+ let url = files[i].url;
|
|
|
|
+ let name = files[i].oldName;
|
|
|
|
+
|
|
|
|
+ this.dataFormCite.files.push({
|
|
|
|
+ name: name,
|
|
|
|
+ url: url,
|
|
|
|
+ response: { error: "0", data: { url: url } },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.dialogVisibleCite = true;
|
|
|
|
+ this.dialogStatus = val;
|
|
|
|
+ },
|
|
handleClickView(row, val) {
|
|
handleClickView(row, val) {
|
|
if(row.trainees && row.trainees.length>0){
|
|
if(row.trainees && row.trainees.length>0){
|
|
let traineeIds = [];
|
|
let traineeIds = [];
|
|
@@ -681,7 +713,13 @@ export default {
|
|
submitFormCite() {
|
|
submitFormCite() {
|
|
this.$refs['dataFormCite'].validate((valid) => {
|
|
this.$refs['dataFormCite'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- uploadCite(this.dataFormCite)
|
|
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (valid) {
|
|
|
|
+ if(this.dialogStatus=='create'){
|
|
|
|
+ uploadCite(this.dataFormCite)
|
|
.then((response) => {
|
|
.then((response) => {
|
|
this.dialogVisibleCite = false;
|
|
this.dialogVisibleCite = false;
|
|
this.$notify({
|
|
this.$notify({
|
|
@@ -697,6 +735,25 @@ export default {
|
|
this.getDataListCite();
|
|
this.getDataListCite();
|
|
})
|
|
})
|
|
.catch(() => { });
|
|
.catch(() => { });
|
|
|
|
+ }
|
|
|
|
+ if(this.dialogStatus=='edit'){
|
|
|
|
+ editCite(this.dataFormCite)
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.dialogVisibleCite = false;
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: "成功",
|
|
|
|
+ message: "表彰修改成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ duration: 2000,
|
|
|
|
+ });
|
|
|
|
+ this.dataFormCite.type = [];
|
|
|
|
+ this.dataFormCite.fileIds = '';
|
|
|
|
+ this.dataFormCite.files = [];
|
|
|
|
+ this.listQueryCite.page = 1;
|
|
|
|
+ this.getDataListCite();
|
|
|
|
+ })
|
|
|
|
+ .catch(() => { });
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|