Commit ca91c78d authored by 李苏's avatar 李苏 💬

修改字段

parent 78106698
import request from 'common/src/utils/request'
export function QueryBm(query) {
return request({
url: 'jcsj/ubm/query',
method: 'post',
data: query||{}
})
}
export function AddBm(query) {
return request({
url: 'jcsj/ubm/add',
method: 'post',
data: query||{}
})
}
export function DeleteBm(query) {
return request({
url: 'jcsj/ubm/delete',
method: 'post',
data: query||{}
})
}
export function UpdateBm(query) {
return request({
url: 'jcsj/ubm/update',
method: 'post',
data: query||{}
})
}
export function qtBm(query) {
return request({
url: 'jcsj/ubm/record/qt',
method: 'post',
data: query||{}
})
}
...@@ -16,11 +16,16 @@ ...@@ -16,11 +16,16 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="责任人" ref="fzrid" prop="type"> <el-form-item label="负责人" ref="ybfzrid" prop="type">
<personSelector :label="form.username||'暂无'" @selected='selected' ></personSelector> <personSelector :label="form.username||'暂无'" @selected='selected' ></personSelector>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="预备负责人" ref="fzrid" prop="type">
<personSelector :label="form.ybfzrName||'暂无'" @selected='ybselected' ></personSelector>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="上级部门" ref="pid" prop="type"> <el-form-item label="上级部门" ref="pid" prop="type">
<el-select style="width: 100%;" v-model="form.pid" placeholder=""> <el-select style="width: 100%;" v-model="form.pid" placeholder="">
<el-option v-for="(item,index) in bmList" :key="item.id" :label="item.bmmc" :value="item.id"></el-option> <el-option v-for="(item,index) in bmList" :key="item.id" :label="item.bmmc" :value="item.id"></el-option>
...@@ -65,6 +70,8 @@ ...@@ -65,6 +70,8 @@
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/ /* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: { form: {
ybfzrName:'',
ybfzrid:'',
pid:'', pid:'',
bz:'', bz:'',
bmmc:'', bmmc:'',
...@@ -74,11 +81,13 @@ ...@@ -74,11 +81,13 @@
rules: { rules: {
bmid: [{ bmid: [{
required: true, required: true,
trigger: 'blur' trigger: 'blur',
message: '请输入部门编码'
}, ], }, ],
bmmc: [{ bmmc: [{
required: true, required: true,
trigger: 'blur' trigger: 'blur',
message: '请输入部门名称'
}] }]
} }
} }
...@@ -86,6 +95,9 @@ ...@@ -86,6 +95,9 @@
methods: { methods: {
selected(row){ selected(row){
this.form.fzrid=row.id this.form.fzrid=row.id
},
ybselected(row){
this.form.ybfzrid=row.id
} }
} }
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
/* 引入需要的接口*/ /* 引入需要的接口*/
import { import {
QueryBm, QueryBm,
QueryApptype, // QueryApptype,
AddBm, AddBm,
DeleteBm, DeleteBm,
UpdateBm, UpdateBm,
qtBm qtBm
} from "common/src/api/system/dmgSystem.js"; } from "@/api/basicData/organizationalManagement.js";
/* edit页面*/ /* edit页面*/
import Edit from './edit' import Edit from './edit'
import {tableMixin} from 'common' import {tableMixin} from 'common'
...@@ -47,19 +47,7 @@ ...@@ -47,19 +47,7 @@
name: 'appVersion', name: 'appVersion',
/* 初始额外赋值*/ /* 初始额外赋值*/
async mounted() { async mounted() {
await this.$asRun(
[QueryApptype(),
res => {
var data = res['data']['records'];
let typeMap = []
for (var i in data) {
typeMap[data[i].id] = data[i].name
}
this.systemType = data
this.typeMap = typeMap
}
]
)
this.$refs['TablePager'].pageQuery() this.$refs['TablePager'].pageQuery()
}, },
data() { data() {
...@@ -68,7 +56,7 @@ ...@@ -68,7 +56,7 @@
/*需要的额外参数 */ /*需要的额外参数 */
typeMap: [], typeMap: [],
systemType: [], systemType: [],
baseUrl: 'kzzx/bm', baseUrl: 'jcsj/ubm',
/* 查询参数*/ /* 查询参数*/
queryParams: {}, queryParams: {},
/* 表格标题对应参数*/ /* 表格标题对应参数*/
...@@ -87,6 +75,11 @@ ...@@ -87,6 +75,11 @@
label: '负责人', label: '负责人',
width: '120' width: '120'
}, },
{
prop: 'ybfzrName',
label: '预备负责人',
width: '120'
},
{ {
prop: 'tyrq', prop: 'tyrq',
label: '停用日期', label: '停用日期',
......
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
this.subjectList=oList.map(item=>{ this.subjectList=oList.map(item=>{
let newobj=Object.create({}) let newobj=Object.create({})
newobj.id=item.id newobj.id=item.id
newobj.score=item.score||'暂无分值' newobj.ans=item.ans
newobj.score=item.score||2
newobj.type=type[item.type] newobj.type=type[item.type]
newobj.subject=item.cont||'未设置问题' newobj.subject=item.cont||'未设置问题'
newobj.options=Object.create({}) newobj.options=Object.create({})
...@@ -100,16 +101,21 @@ ...@@ -100,16 +101,21 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// this.$message({
// type: 'success',
// message: '试卷提交成功!'
// });
/* 计算*/
let sjdf=0
console.log(this.subjectList) console.log(this.subjectList)
this.$message({ this.subjectList.forEach(item=>{
type: 'success', /* 单选题*/
message: '试卷提交成功!' sjdf++
});
})
this.$warning(`您获得了${sjdf}分!`)
}).catch(() => { }).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
}); });
} }
}, },
......
...@@ -28,93 +28,114 @@ ...@@ -28,93 +28,114 @@
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</div> </div>
<!-- 判断题 --> <!-- 判断题 -->
<div v-if="type=='PDT'" class="options"> <div v-if="type=='PDT'" class="options">
<div class="item" :key="index" v-for="(item,index) in options"> <div class="item" :key="index" v-for="(item,index) in options">
<el-radio v-model="value" :label="index"> {{`${index}.${item}`}}</el-radio> <el-radio v-model="value" :label="index"> {{`${index}.${item}`}}</el-radio>
</div> </div>
</div> </div>
<!-- 答案显示-->
<!-- <br>
<span>结果:错误</span>
<br>
<span>本题答案是:A,B,C</span>
<br>
<span>答案解析:钝角</span> -->
</div> </div>
</template> </template>
<script> <script>
export default{ export default {
updated() { updated() {
if(this.type=='DXTS'){ if (this.type == 'DXTS') {
this.app.subjectList[this.index-1].value=this.valueList let valueList=_.cloneDeep(this.valueList)
}else{ this.app.subjectList[this.index - 1].value=valueList.sort((s1, s2)=>{
this.app.subjectList[this.index-1].value=this.value let a1 = s1.toUpperCase();
let a2 = s2.toUpperCase();
if (a1 < a2) {
return -1;
}
if (a1 > a2) {
return 1;
}
return 0;
}).join(',')
/* 排序*/
} else {
this.app.subjectList[this.index - 1].value = this.value
} }
}, },
mounted() { mounted() {
this.type=='TKT'&&$(this.$el).find('[name=tktinput]').change(e=>{ this.type == 'TKT' && $(this.$el).find('[name=tktinput]').change(e => {
this.value=$(this.$el).find('[name=tktinput]').val()||'' this.value = $(this.$el).find('[name=tktinput]').val() || ''
this.app.subjectList[this.index-1].value=this.value this.app.subjectList[this.index - 1].value = this.value
}) })
}, },
props:{ props: {
app:{ app: {
type:Object, type: Object,
default:()=>{ default: () => {
return {} return {}
} }
}, },
index:{ index: {
default:1 default: 1
}, },
subject:{ subject: {
type:String, type: String,
default:'对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。' default: '对于线性表(7,34,55,25,64,46,20,10)进行散列存储时,若选用H(K)=K %9作为散列函数,则散列地址为1的元素有()个。'
}, },
score:{ score: {
type:String, // type:String,
default:'2' default: '2'
}, },
type:{ type: {
type:String, type: String,
default:'DXT' default: 'DXT'
}, },
options:{ options: {
type:Object, type: Object,
default:()=>{ default: () => {
return{ return {
A:'1个', A: '1个',
B:'2个', B: '2个',
C:'3个', C: '3个',
D:'4个' D: '4个'
} }
} }
} }
}, },
data(){ data() {
return{ return {
value:'', value: '',
valueList:[], valueList: [],
} }
}, },
methods:{ methods: {
transTKT(val,fn){ transTKT(val, fn) {
let nval let nval
let template=`<input type='text' name='tktinput' class='tktinput'>` let template = `<input type='text' name='tktinput' class='tktinput'>`
/* 判断有无()*/ /* 判断有无()*/
val.indexOf('()')==-1?( nval=val+template):( nval=val.replace('()',template)) val.indexOf('()') == -1 ? (nval = val + template) : (nval = val.replace('()', template))
return nval return nval
} }
}, },
filters:{ filters: {
typeName(val){ typeName(val) {
let typeArry={ let typeArry = {
'DXT':'(单选题)', 'DXT': '(单选题)',
'DXTS':'(多选题)', 'DXTS': '(多选题)',
'TKT':'(填空题)', 'TKT': '(填空题)',
'PDT':'(判断题)' 'PDT': '(判断题)'
} }
let nval=typeArry[val] let nval = typeArry[val]
return nval||'其他' return nval || '其他'
}, },
typeScore(val){ typeScore(val) {
let nval=`(${val}分)` let nval = `(${val}分)`
return nval return nval
} }
} }
...@@ -123,42 +144,49 @@ ...@@ -123,42 +144,49 @@
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.el-radio__label{ .el-radio__label {
font-size: 13px; font-size: 13px;
color:rgb(119, 119, 119); color: rgb(119, 119, 119);
} }
input{
input {
border: none; border: none;
outline: none; outline: none;
} }
input:focus{
input:focus {
border: none; border: none;
} }
.tktinput:focus{
.tktinput:focus {
border: 0px; border: 0px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.tktinput{
.tktinput {
border: 0px; border: 0px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
color: #888; color: #888;
} }
.examMain{
.examMain {
margin-top: 30px; margin-top: 30px;
height: 100%; height: 100%;
width: 100%; width: 100%;
font-size: 14px; font-size: 14px;
overflow: auto; overflow: auto;
.options{
.options {
padding: 10px; padding: 10px;
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.item{
.item {
padding-left: 20%; padding-left: 20%;
width: 50%; width: 50%;
line-height: 20px; line-height: 20px;
} }
} }
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment